In commit aaa72a3a8, Joey noted:
bestlink returns '' if no existing page matches a link. This propigated through inline and other plugins, causing uninitialized value warnings, and in some cases (when filecheck was enabled) making the whole directive fail.
Skipping the empty results fixes that, but this is papering over another problem: If the missing page is later added, there is not dependency information to know that the inline needs to be updated. Perhaps smcv will fix that later.
Potential ways this could be addressed:
Add a presence dependency on everything the reference could match: so if the
inlineis ona/b/cand the missing page ism, add a$depends_simple$DEPEND_PRESENCEdependency ona/b/c/m,a/b/m,a/m,mand (if configured)$config{userdir}/mMake the page names in
[[!inline pagenames=...]]count as wikilinks, changing the behaviour oflink()and backlinks, but causing appropriate rebuilds via the special cases inIkiWiki::RenderExtend the special cases in
IkiWiki::Renderto consider a superset of wikilinks, to whichpagenameswould add its named pages, without affectinglink()and backlinks
(Note that [[!inline pages=...]] cannot count as wikilinks, because
pagespecs can contain link(), so can't be evaluated until we know what
wikilinks exist, at which point it's too late to add more wikilinks.)
I think the presence dependency is probably the cleanest approach? --smcv
I think it was possibly a mistake to use wikilink style lookup for
pagenames. --Joey
I used the linking rules to make references to "nearby" pages convenient, but if you'd prefer "absolute" semantics, my
ready/literal-pagenamesbranch does that. For my main use-case forpagenames(album) it's fine either way. --smcv