Subject: | sepia.el following to L</Foo> link |
Date: | Wed, 04 Jan 2012 11:20:52 +1100 |
To: | bug-Sepia [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
In a foo.pod buffer containing
=head2 Foo
L</Foo>
and point on the L<, M-x sepia-pod-follow-link-at-point gives an error
Can't find anchor for /Foo.
It looks like it's using `search-forward' where re-search-forward may be
intended, and there's also a `match-beginning' without a "0" arg.
I get some joy from changing
(unless (search-forward (concat "^=.*" sec) nil t)
(error "Can't find anchor for %s." str))
(setq target (match-beginning)))
to
(unless (re-search-forward (concat "^=.*" (regexp-quote sec))
nil t)
(error "Can't find anchor for %s." str))
(setq target (match-beginning 0)))
Maybe the L<name/sec> part would be something similar too.
I wondered if the search should let-bind case-fold-search.
Case-insensitive might be friendly. When writing pod you'd probably
prefer to have the case in the link the same as the target, but some of
the pod converters etc might be forgiving.
--
The sigfile English idioms series:
"Putting all your eggs in one basket" -- protecting your assets
by putting them in one place you can watch carefully.