((p "A thread directive is similar to the " (a (@ (href . "00001007720300")) "context directive") " by calculating zettel associated with a list of zettel identifier." " " "There are three thread directives, beginning with the keywords " (kbd "FOLGE") ", " (kbd "SEQUEL") ", and " (kbd "THREAD") ".") (p "With the help of the " (kbd "FOLGE") " directive, you can list all zettel that belong to the same " (@L (@H "“") "train of thought" (@H "”")) "." " " "It is possible to list all folge zettel only or only precursor zettel." " " "Additionally, you can specify the maximum number to be listed." " " "A " (kbd "FOLGE") " directive considers only the metadata keys only metadata keys " (a (@ (href . "00001006020000#folge")) (kbd "folge")) " and " (a (@ (href . "00001006020000#precursor")) (kbd "precursor")) ".") (p "Similarly, the " (kbd "SEQUEL") " directive allows you to list all " (@L (@H "“") "branching ideas" (@H "”")) " " "You can limit the search to only sequel or only prequel zettel, and you can also restrict the result size." " " "The " (kbd "SEQUEL") " directive works exclusively with the metadata keys " (a (@ (href . "00001006020000#sequel")) (kbd "sequel")) " and " (a (@ (href . "00001006020000#prequel")) (kbd "prequel")) ".") (p "The " (kbd "THREAD") " directive combines the functionality of the other two directives." " " "It lists all zettel (or a subset) that can be reached via the four metadata keys mentioned.") (p "Optionally yyou may specify additional parameters after the directive keyword, separated by space characters." " " "These include:") (ul (li (p (kbd "BACKWARD") ": Search for zettel only via backward links, i.e. " (kbd "precursor") " and/or " (kbd "prequel"))) (li (p (kbd "FORWARD") ": Search for zettel only via forward links, i.e. " (kbd "folge") " and/or " (kbd "sequel"))) (li (p (kbd "DIRECTED") ": Search for zettel only in the same direction as the one that led to the current zettel." " " "If the zettel is one of the initial zettel, search in both directions.") (p (kbd "DIRECTED") " is equivalent to " (kbd "FORWARD") " if the current zettel is a starting point of a " (kbd "folge") " and/or " (kbd "sequel") " sequence." " " "It is equivalent to " (kbd "BACKWARD") " at the end of such a sequence (or at the beginning of a " (kbd "precursor") " and/or " (kbd "prequel") " sequence).")) (li (p (kbd "MAX") ": Followed by one or more space characters and a positive integer, sets the maximum number of resulting Zettel (default: 0 = unlimited)"))) (p "If neither BACKWARD nor FORWARD is specified, the search includes both backward and forward links.") (p "If both " (kbd "BACKWARD") " and " (kbd "FORWARD") " are specified, the search for context zettel will be performed as " (kbd "DIRECTED") "." " " "Internally, " (kbd "DIRECTED") " is just a shorthand for specifying both " (kbd "BACKWARD") " and " (kbd "FORWARD") ".") (p "If any of the three direction specifiers " (kbd "BACKWARD") ", " (kbd "FORWARD") ", and " (kbd "DIRECTED") " is specified more than once, parsing of the thread directive is stopped." " " "All following text is then interpreted either as other directives or as a search term.") (p "The resulting list is sorted by the relative distance to the originating zettel.") (p "These directives may be specified only once as a query directive." " " "A second occurence of " (kbd "FOLGE") ", " (kbd "SEQUEL") " or " (kbd "THREAD") " is interpreted as a " (a (@ (href . "00001007701000")) "search expression") "."))