emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] [bug #14229] emacs-wiki-visit-link finds wrong tag


From: Sergey Vlasov
Subject: [emacs-wiki-discuss] [bug #14229] emacs-wiki-visit-link finds wrong tag in some circumstances
Date: Fri, 19 Aug 2005 22:05:06 +0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.5) Gecko/20050127

URL:
  <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14229>

                 Summary: emacs-wiki-visit-link finds wrong tag in some
circumstances
                 Project: emacs-wiki, planner, and related modules
            Submitted by: vsu
            Submitted on: Птн 19.08.2005 at 22:05
                Category: emacs-wiki
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:

When using planner in its default configuration
(planner-reverse-chronological-notes set to t), after 10 or more notes are
added to a page, it is impossible to follow a link to the first note (Page#1)
- instead the point is set to the note #10 (or #11, if it exists before #10,
etc etc...).

However, the underlying problem is not specific to planner - it happens with
any emacs-wiki file.  The emacs-wiki-visit-link function finds the first tag
which name begins with the specified tag string, therefore if the file
contains a longer tag which has the name of a shorter tag as a prefix, and
that longer tag is located before the shorter one, the shorter tag cannot be
found.  E.g., if you make a page called TagBug containing:

#tag_long

#tag

then if you follow link to [[TagBug#tag]], point is set at #tag_long instead
of at #tag.

I have made a patch to fix this wrong behavior of emacs-wiki-visit-link; it
is attached.  The patch makes emacs-wiki-visit-link first look for the
requested tag name followed by whitespace or end-of-line; if such search
fails, the old way of looking for just a prefix is tried for backward
compatibility.





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Птн 19.08.2005 at 22:05  Name: 01_emacs-wiki-visit-link.patch  Size:
2,01KB   By: vsu
Fix emacs-wiki-visit-link to find the requested tag exactly
<http://savannah.nongnu.org/bugs/download.php?item_id=14229&item_file_id=2841>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14229>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]