diff options
author | http://lj.rossia.org/users/imz/ <http://lj.rossia.org/users/imz/@web> | 2009-05-18 17:26:32 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2009-05-18 17:26:32 -0400 |
commit | 10c82d48247989412a66fd849743ea1d98335ff1 (patch) | |
tree | d913e9dcfaa7b34182f9506a7eddd3370e98eadc | |
parent | b00f5a5f522ee4e9d48dc418d70852195d0262d7 (diff) | |
download | ikiwiki-10c82d48247989412a66fd849743ea1d98335ff1.tar ikiwiki-10c82d48247989412a66fd849743ea1d98335ff1.tar.gz |
A further development of the idea.
-rw-r--r-- | doc/todo/inlines_inheriting_links.mdwn | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/todo/inlines_inheriting_links.mdwn b/doc/todo/inlines_inheriting_links.mdwn index 5560b19c6..12531990c 100644 --- a/doc/todo/inlines_inheriting_links.mdwn +++ b/doc/todo/inlines_inheriting_links.mdwn @@ -5,10 +5,14 @@ Continuing the ideas in [[bugs/Inline doesn't wikilink to pages]]. I thought of a use case for another feature: making [[ikiwiki/directive/inline]] inherit the link relations of the included pages (optionally, say, with `inheritlinks=yes`). For example, if I want to list `elements/*` that have been linked to in any of `new_stuff/*`, I could try to write a [[ikiwiki/pagespec]] like `elements/* and backlink(new_stuff/*)`. -This is not yet possible, as discussed in [[todo/tracking_bugs_with_dependencies/]]. +This is not yet possible, as discussed in [[todo/tracking_bugs_with_dependencies]]. It would be possible to work around this limitation of pagespecs if it was possible to create a page `all_new_stuff` with `\[[!inline pages="new_stuff/*" inheritlinks=yes]]`: then the desired pagespec would be expressed as `elements/* and backlink(all_new_stuff)`. +> Or, instead of specifying whether to inherit at the place of the inline, add more relations (`inline`, `backinline`) and relation composition (say, `*`, or haskell-ish `$` in order not confuse with the glob `*`) and explicitly write in the pagespecs that you want to follow the inline relation backwards: `elements/* and backlink$backinline(all_new_stuff)` or, equivalently, if [["classes"|todo/tracking_bugs_with_dependencies]] are implemented in pagespecs: `elements/* and backlink(backinline(all_new_stuff))`. Of course, this suggestion requires the powerful extension to pagespecs, but it gives more flexibility, and the possibility to avoid redundant information: the same pagespec at two places -- the inline and the other matching construction. +> +> BTW, adding more relations -- the `inline` relation among them -- would satisfy [[the other feature request|bugs/Inline doesn't wikilink to pages]]. --Ivan Z. + This is not just an ugly workaround. The availability of this feature has some reason: the classes of pages you want to refer to "recursively" (in that kind of complex pagespecs) tend to have some meaning themselves. So, I might indeed want to have a page like `all_new_stuff`, it would be useful for me. And at the same time I would like to write pagespecs like `elements/* and backlink(all_new_stuff)` -- and using the proposed feature in [[todo/tracking_bugs_with_dependencies/]] would be less clean because then I would have to enter the same information at two places: the possibly complex pagespec in the inline. And having redundant information leads to inconsistency. So in a sense, in some or most cases, it would indeed be cleaner to "store" the definition of a class of pages referred to in complex pagespecs as a separate object. And the most natural representation for this definition of a class of pages (adhering to the principle of wiki that what you mean is entered/stored in its most natural representation, not through some hidden disconnected code) is making a page with an inline/map/or the like, so that at the same time you store the definition and you see what it is (the set of pages is displayed to you). |