From cc6ead1d81eacc75914eedb49c8773d6624cca33 Mon Sep 17 00:00:00 2001 From: tschwinge Date: Tue, 8 Jun 2010 14:04:00 +0000 Subject: File issue. --- doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn (limited to 'doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn') diff --git a/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn b/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn new file mode 100644 index 000000000..c29eb994f --- /dev/null +++ b/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn @@ -0,0 +1,10 @@ +With the current HEAD (b10d353490197b576ef7bf2e8bf8016039efbd2d), +globbing in `tagged()` pagespecs doesn't work for me. For example, +`tagged(*)` doesn't match any pages. (It does in this wiki installation +here, though.) + +I did not yet do any testing to figure out when this broke. + +--[[tschwinge]] + +[[!map pages="*/a* and tagged(*ose)"]] -- cgit v1.2.3 From 73bb42ccf0e3240f8fecc9a543bfff435bb27a02 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Jun 2010 14:53:22 -0400 Subject: response --- doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn') diff --git a/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn b/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn index c29eb994f..76bf740fb 100644 --- a/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn +++ b/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn @@ -8,3 +8,9 @@ I did not yet do any testing to figure out when this broke. --[[tschwinge]] [[!map pages="*/a* and tagged(*ose)"]] + +> Are you sure that `tagged()` ever matches pages there? Take globbing +> out of the equasion. +> +> This could be as simple as you having not rebuilt the wiki +> on upgrade to the version that tracks tagged links. --[[Joey]] -- cgit v1.2.3 From 215538aa58801a6a136029ff9ef4c632b72cf12e Mon Sep 17 00:00:00 2001 From: tschwinge Date: Wed, 9 Jun 2010 06:39:26 +0000 Subject: Yes, is a globbing issue. --- doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn') diff --git a/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn b/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn index 76bf740fb..55669e5c8 100644 --- a/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn +++ b/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn @@ -14,3 +14,16 @@ I did not yet do any testing to figure out when this broke. > > This could be as simple as you having not rebuilt the wiki > on upgrade to the version that tracks tagged links. --[[Joey]] + +>> Yes, it is a globbing issue: + +>> \[[!map pages="tagged(open_i*ue_gdb)" show=title]] + +>> ... doesn't show anything. + +>> \[[!map pages="tagged(open_issue_gdb)" show=title]] + +>> ... does show a map of eight pages. Also, it's working fine on the +>> autotags pages. + +>> --[[tschwinge]] -- cgit v1.2.3 From ba9b808c898a556541057ac9f524db2de2a33d77 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Jun 2010 14:04:42 -0400 Subject: remove example blog tag pages Autotag will create them as needed. Avoids some complexity. --- debian/changelog | 2 ++ doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn | 3 +++ doc/examples/blog/tags/life.mdwn | 4 ---- doc/examples/blog/tags/tech.mdwn | 4 ---- 4 files changed, 5 insertions(+), 8 deletions(-) delete mode 100644 doc/examples/blog/tags/life.mdwn delete mode 100644 doc/examples/blog/tags/tech.mdwn (limited to 'doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn') diff --git a/debian/changelog b/debian/changelog index 9a10332ea..a0ea9c156 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ ikiwiki (3.20100518.3) UNRELEASED; urgency=low * creation_day() etc use local time, not gmtime. To match calendars, which use local time. * img: Fill in missing height or width when scaling image. + * Remove example blog tag pages; allow autotag creation to create them + when used. -- Joey Hess Mon, 31 May 2010 20:44:17 -0400 diff --git a/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn b/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn index 55669e5c8..9a55c0673 100644 --- a/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn +++ b/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn @@ -27,3 +27,6 @@ I did not yet do any testing to figure out when this broke. >> autotags pages. >> --[[tschwinge]] + +>>> Only way I can reproduce something like this is if tagbase is not set. +>>> --[[Joey]] diff --git a/doc/examples/blog/tags/life.mdwn b/doc/examples/blog/tags/life.mdwn deleted file mode 100644 index e1614dbdc..000000000 --- a/doc/examples/blog/tags/life.mdwn +++ /dev/null @@ -1,4 +0,0 @@ -[[!meta title="tag life"]] - -[[!inline pages="tagged(tags/life)" actions="no" archive="yes" -feedshow=10]] diff --git a/doc/examples/blog/tags/tech.mdwn b/doc/examples/blog/tags/tech.mdwn deleted file mode 100644 index 398146cdb..000000000 --- a/doc/examples/blog/tags/tech.mdwn +++ /dev/null @@ -1,4 +0,0 @@ -[[!meta title="tag tech"]] - -[[!inline pages="tagged(tags/tech)" actions="no" archive="yes" -feedshow=10]] -- cgit v1.2.3 From cdf4292846e6fe0fb877809ef0906ff6bddf6bf9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Jun 2010 14:33:49 -0400 Subject: Fix support for globbing in tagged() pagespecs. The linktype check was being done on the relativised link target, but %typedlinks uses the same link targets as %links, so that didn't work. I think the bug only appeared when tagbase was not set. This bugfix also let me factor out the common typedlink checking code. --- IkiWiki.pm | 8 +++++--- debian/changelog | 1 + doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn') diff --git a/IkiWiki.pm b/IkiWiki.pm index e2a3d216f..27fa4ca17 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2397,18 +2397,20 @@ sub match_link ($$;@) { unless $links && @{$links}; my $bestlink = IkiWiki::bestlink($from, $link); foreach my $p (@{$links}) { + next unless (! defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p}); + if (length $bestlink) { - if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p}) && $bestlink eq IkiWiki::bestlink($page, $p)) { + if ($bestlink eq IkiWiki::bestlink($page, $p)) { return IkiWiki::SuccessReason->new("$page links to $link$qualifier", $page => $IkiWiki::DEPEND_LINKS, "" => 1) } } else { - if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p}) && match_glob($p, $link, %params)) { + if (match_glob($p, $link, %params)) { return IkiWiki::SuccessReason->new("$page links to page $p$qualifier, matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) } my ($p_rel)=$p=~/^\/?(.*)/; $link=~s/^\///; - if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p_rel}) && match_glob($p_rel, $link, %params)) { + if (match_glob($p_rel, $link, %params)) { return IkiWiki::SuccessReason->new("$page links to page $p_rel$qualifier, matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) } } diff --git a/debian/changelog b/debian/changelog index a0ea9c156..38beca395 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ ikiwiki (3.20100518.3) UNRELEASED; urgency=low * img: Fill in missing height or width when scaling image. * Remove example blog tag pages; allow autotag creation to create them when used. + * Fix support for globbing in tagged() pagespecs. -- Joey Hess Mon, 31 May 2010 20:44:17 -0400 diff --git a/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn b/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn index 9a55c0673..fba332949 100644 --- a/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn +++ b/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn @@ -29,4 +29,5 @@ I did not yet do any testing to figure out when this broke. >> --[[tschwinge]] >>> Only way I can reproduce something like this is if tagbase is not set. +>>> I have fixed a bug there, see if it works for you? >>> --[[Joey]] -- cgit v1.2.3 From 0fbec10a42c0b6ae3111d5a5d5488cd5d573f554 Mon Sep 17 00:00:00 2001 From: tschwinge Date: Thu, 10 Jun 2010 08:54:46 +0000 Subject: Fixed. --- doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn') diff --git a/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn b/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn index fba332949..f9cb37487 100644 --- a/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn +++ b/doc/bugs/pagespec:_tagged__40____41____44___globbing.mdwn @@ -31,3 +31,6 @@ I did not yet do any testing to figure out when this broke. >>> Only way I can reproduce something like this is if tagbase is not set. >>> I have fixed a bug there, see if it works for you? >>> --[[Joey]] + +>>>> This is now indeed [[fixed|done]] (thanks!) -- even though I already +>>>> did have tagbase set. -- cgit v1.2.3