[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] escaped whitespaces in link names
From: |
Mario Peter |
Subject: |
[emacs-wiki-discuss] escaped whitespaces in link names |
Date: |
Sat, 30 Oct 2004 16:49:11 +0200 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) XEmacs/21.4 (Security Through Obscurity, linux) |
Hi everybody,
I recently realized, that 'name' in emacs-wiki-make-link in
emacs-wiki.el is treated by emacs-wiki-link-escape, which replaces
among others whitespaces with '%20'. So, for example, when creating a
task for planner in gnus I get 'E-Mail%20from%20Blabla'.
Isn't it better to leave the name of a wiki link how it is? In the
visiable part of a link there should be allowed any character, this
is IMO, what this syntax is for.
So, I changed the following to get my planner links working again:
--snip--
(defun emacs-wiki-make-link (link &optional name)
"Return a Wiki link to LINK with NAME as the text."
(let ((case-fold-search nil))
(unless name
(setq name (emacs-wiki-wiki-visible-name link)))
(setq link (emacs-wiki-wiki-link-target link))
(when (equal name link)
(setq name nil))
(if name
(if (and (string-match
(concat "^\\(?:" emacs-wiki-url-or-name-regexp "\\)$") link)
(string= name link))
name
(concat "[[" (emacs-wiki-link-escape link)
;; "][" (emacs-wiki-link-escape name t) "]]"))
"][" name "]]"))
;; No name
(if (string-match
(concat "^\\(?:" emacs-wiki-url-or-name-regexp "\\)$") link)
link
(concat "[[" (emacs-wiki-link-escape link) "]]")))))
--snap--
What do you think?
Mario
--
Mario Peter
de, pl, eng
http://www.mpeter.de
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [emacs-wiki-discuss] escaped whitespaces in link names,
Mario Peter <=