[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] bug report: screwed up all-digit anchors in http li
From: |
Vadim Nasardinov |
Subject: |
[emacs-wiki-discuss] bug report: screwed up all-digit anchors in http links |
Date: |
Fri, 7 Jan 2005 22:11:52 -0500 |
User-agent: |
KMail/1.7 |
There seems to be a bug in the emacs-wiki-wiki-link-target function
that mangles http links that contain an all-digit anchor. Consider
the following test wiki page (call it TestPage):
|#title Test Page
|
|[[http://mail.gnome.org/archives/desktop-devel-list/2004-December/thread.html#00424][link]]
(sans the leading pipes).
If I position the Emacs cursor on the fontified word "link" and hit
<return>, the following link opens up in my browser:
http://mail.gnome.org/archives/desktop-devel-list/2004-December/thread.html#note00424
The anchor "#00424" got replaced with "#note00424".
The offending piece of code seems to be this chunk in
emacs-wiki-wiki-link-target (defined in emacs-wiki.el):
;; Resolve numeric anchors to
;; `emacs-wiki-bare-digits-anchor-prefix'
(when (string-match "#\\([0-9]+\\)" name)
(setq name (replace-match
(concat "#"
emacs-wiki-bare-digits-anchor-prefix
(match-string 1 name))
t t name)))
M-x describe-variable emacs-wiki-bare-digits-anchor-prefix
has this to say:
emacs-wiki-bare-digits-anchor-prefix's value is "note"
Documentation:
Prefix to add to anchors composed only of digits.
Defined in `emacs-wiki'.
Mangling links in the above manner makes sense for those links that
have been auto-generated by, say, the emacs-wiki-contents-tag function
during publishing. However, it screws up regular http links that the
user types in by hand.
I'm running Michael's emacs-wiki 2.66.
Thanks,
Vadim
- [emacs-wiki-discuss] bug report: screwed up all-digit anchors in http links,
Vadim Nasardinov <=