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

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

[emacs-wiki-discuss] Re: Extra brackets in Planner-Muse


From: Sacha Chua
Subject: [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse
Date: Sat, 05 Nov 2005 23:39:28 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Jim Ottaway <address@hidden> writes:

> Yes. I was a bit impetuous. I think, however, that the only other
> cases that would need including would be those matching a wiki-word
> regexp that did not match a planner date regexp. And perhaps the
> links could be normalized as explicit links as part of the function.
> How do the brackets get added in the first instance [if one starts
> out without them, I mean]? I can't track that down in the source.

I added the explicit check against what was then
emacs-wiki-name-regexp so that planner-multi wouldn't get confused by
tasks with non-link parentheses. Planner/emacs-wiki treated
explicit links, wiki words, and dates as links.

The extra brackets are getting introduced by muse-make-link, which
adds extra brackets in the call (muse-make-link "[[foo]]").
emacs-wiki-make-link used to extract the link (and possibly the
description) from the argument if it was an explicit link.

The following patch restores that behavior to muse-make-link.

--- orig/lisp/muse-mode.el
+++ mod/lisp/muse-mode.el
@@ -276,6 +276,9 @@
 
 (defun muse-make-link (link &optional name)
   "Return a link to LINK with NAME as the text."
+  (when (string-match muse-explicit-link-regexp link)
+    (unless name (setq name (match-string 2 link)))
+    (setq link (match-string 1 link)))
   (if (and name
            link
            (not (string= name ""))


-- 
Sacha Chua <address@hidden> - open source, free software geekette
http://sacha.free.net.ph/ - PGP Key ID: 0xE7FDF77C
interests: emacs, gnu/linux, personal information management, public speaking
sachac on irc.freenode.net#emacs . YM: sachachua83




reply via email to

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