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/ _______________________________________________ emacs-wiki-discuss mailing list emacs-wiki-discuss@nongnu.org http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss