]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/transient_autocreated_tagbase_is_not_transient_autoindexed.mdwn
ikiwiki (3.20140916) unstable; urgency=low
[ikiwiki.git] / doc / bugs / transient_autocreated_tagbase_is_not_transient_autoindexed.mdwn
1     mkdir -p ikiwiki-tag-test/raw/a_dir/ ikiwiki-tag-test/rendered/
2     echo '\[[!taglink a_tag]]' > ikiwiki-tag-test/raw/a_dir/a_page.mdwn
3     ikiwiki --verbose --plugin tag --plugin autoindex --plugin mdwn --set autoindex_commit=0 --set tagbase=tag --set tag_autocreate=1 --set tag_autocreate_commit=0 ikiwiki-tag-test/raw/ ikiwiki-tag-test/rendered/
4     ls -al ikiwiki-tag-test/raw/.ikiwiki/transient/
5     ls -al ikiwiki-tag-test/rendered/tag/
6
7 Shouldn't `ikiwiki-tag-test/raw/.ikiwiki/transient/tag.mdwn` and `ikiwiki-tag-test/rendered/tag/index.html` exist?
8
9 [[!tag patch users/smcv/ready]]
10 [[!template id=gitbranch branch=smcv/ready/autoindex author=smcv
11   browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/autoindex]]
12 [[!template id=gitbranch branch=smcv/ready/autoindex-more-often author=smcv
13   browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/autoindex-more-often]]
14
15 > To have a starting point to (maybe) change this, my `ready/autoindex`
16 > branch adds a regression test for the current behaviour, both with
17 > and without `autoindex_commit` enabled. It also fixes an unnecessary
18 > and potentially harmful special case for the transient directory.
19 >
20 > The fact that files in underlays (including transient files) don't
21 > trigger autoindexing is deliberate. However, this is the second
22 > request to change this behaviour: the first was
23 > [[!debbug 611068]], which has a patch from Tuomas Jormola.
24 > On that bug report, Joey explains why it's undesirable
25 > for the original behaviour of autoindex (when the
26 > index isn't transient).
27 >
28 > I'm not sure whether the same reasoning still applies when the
29 > index is transient, though (`autoindex_commit => 0`),
30 > because the index pages won't be cluttering up people's
31 > git repositories any more? My `autoindex-more` branch changes
32 > the logic so it will do what you want in the `autoindex_commit => 0`
33 > case, and amends the appropriate regression test. --[[smcv]]
34
35 >> the autoindex-more-often branch looks good to me in general.
36 >>
37 >> i do have doubts about the 3ba2ef1a patch ("remove unnecessary special case
38 >> for transient underlay"): now that we consider the complete transient
39 >> directory as well, the sequence in which the refresh hooks are called starts
40 >> to matter, and pages created by other plugins in a similar fashion as by
41 >> autoindex will only be included the next time refresh gets called.
42 >>
43 >> *addendum:* i just found where i discussed the issue of fighting transient
44 >> pages last, it was on [[todo/alias directive]]. the example cited there
45 >> (conflicts with autotag) would probably work here as well. (imagine a
46 >> `tags/project/completed` and a `tags/project/inprogress` exist, and a page
47 >> is tagge `tags/project`. will that be an autoindex or an autotag?)
48 >>
49 >> --[[chrysn]]
50
51 >>> That's a fair point. I think what happens is down to commit vs. refresh
52 >>> timing.
53 >>>
54 >>> If pages tagged t/p/c, t/p/i and t/p are all created between one
55 >>> refresh and the next, with none of those tag pages existing, I think the
56 >>> answer is that they would all be autotags, because until t/p/c and
57 >>> t/p/i are created, there's no reason to need t/p as an autoindex.
58 >>>
59 >>> If there were already pages tagged t/p/c and t/p/i at the previous
60 >>> refresh, then t/p would already be an autoindex, and that's a
61 >>> valid page, so autotagging wouldn't touch it.
62 >>>
63 >>> I can't see much reason to prefer one over the other; the ideal answer
64 >>> is probably to have a tag-cloud *and* a list of child pages, but this
65 >>> seems a weird enough thing to do that I'd be OK with a wiki user
66 >>> having to disambiguate it themselves. "Whichever automatic process
67 >>> happens first, happens" is at least easy to explain, and I consider
68 >>> both autoindices and autotags to be time-saving conveniences rather
69 >>> than something fundamental. --s
70
71 >>>> i think a behavior that does the right thing when there is a right thing
72 >>>> and *something* when there is ambiguity is ok for now; especially, it's
73 >>>> not up to the autoindex branch to come up with a solution to the general
74 >>>> problem. --[[chrysn]]
75
76 >>>>> [[Merged|done]] --[[smcv]]