[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] emacs-wiki-make-link and [[foo]]
From: |
Sacha Chua |
Subject: |
[emacs-wiki-discuss] emacs-wiki-make-link and [[foo]] |
Date: |
Mon, 27 Jun 2005 14:11:10 +0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
Hello, everyone!
(emacs-wiki-make-link "[[foo]]") used to return "[[foo]]", but
emacs-wiki/77 took out the emacs-wiki-wiki-link-target code because it
was screwing up Interwiki names. This caused a bug with planner-multi
and non-wiki names, which were formerly easily supported. I didn't run
into this until now because I don't update my dev emacs-wiki very
often. <sheepish grin> Kudos to Romain Francoise for pointing out this
bug. Fixing it in emacs-wiki means not having to make changes to
planner-multi and other code that relies on emacs-wiki-make-link
trying to do the right thing.
Here's a patch to restore the right behavior.
--- orig/emacs-wiki.el
+++ mod/emacs-wiki.el
@@ -1066,6 +1066,8 @@
(let ((case-fold-search nil))
(unless name
(setq name (emacs-wiki-wiki-visible-name link)))
+ (when (string-match "^\\[\\[\\([^]]+\\)\\]" link)
+ (setq link (match-string 1 link)))
(when (equal name link)
(setq name nil))
(if name
--
Sacha Chua <address@hidden> - open source geekette
http://sacha.free.net.ph/ - PGP Key ID: 0xE7FDF77C
interests: emacs, gnu/linux, personal information management, CS ed
sachac on irc.freenode.net#emacs . YM: sachachua83
- [emacs-wiki-discuss] emacs-wiki-make-link and [[foo]],
Sacha Chua <=