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

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

Re: [emacs-wiki-discuss] Re: Using subdirectories in Muse projects


From: Lindsay Todd
Subject: Re: [emacs-wiki-discuss] Re: Using subdirectories in Muse projects
Date: Tue, 23 May 2006 17:30:47 -0400
User-agent: Thunderbird 1.5.0.2 (X11/20060501)

Michael Olson wrote:
> Phillip Lord <address@hidden> writes:
>
>   
>> This doesn't do what you directly what you want; it does, however,
>> address a related problem and, indeed, I use it for subdirectories.
>>
>> It defines a new url type, which is like the interwiki support of
>> muse-wiki. You can also publish to a different directory structure
>> from the file space (which I do for historical reasons). So a link
>> like
>>
>> [[iw:home\emacs][hello]] will work from any of the individual muse
>> projects that I have.
>>     
>
> I've now added this to the experimental folder of Muse.  The idea is
> that it can move out of experimental into muse-protocols.el once 3.03
> is released.
>   
I've been experimenting with this.  Unless I've grossly misunderstood,
this seems to be a bit Windows-centric in its path handling -- it is
looking for a backslash to end the first path name component.  This
gives unexpected results with Linux.

I've attached a patch that delimits the first pathname component any
non-word character.

-- 
R. Lindsay Todd                      email: address@hidden
Senior Systems Programmer            phone: 518-276-2605
Rensselaer Polytechnic Institute     fax:   518-276-2809
Troy, NY 12180-3590                  WWW:   http://www.rpi.edu/~toddr

The views, opinions, and judgments expressed in this message are
solely those of the author. The message contents have not been
reviewed or approved by Rensselaer.

--- muse-protocol-iw.el.OLD     2006-05-23 17:00:42.000000000 -0400
+++ muse-protocol-iw.el 2006-05-23 17:24:36.000000000 -0400
@@ -43,7 +43,7 @@
         ("journal" "/journal/" "~/src/ht/home_website/journal")))
 
 (defun muse-resolve-url-iw (url)
-  (when (string-match "\\`iw:\\([a-zA-Z]*\\)\\\\\\(.+\\)" url)
+  (when (string-match "\\`iw:\\([a-zA-Z]*\\)\\W\\(.+\\)" url)
     (let* ((wiki-resolve
             (assoc (match-string 1 url)
                    muse-interwiki-protocol-alist))
@@ -53,7 +53,7 @@
 
 ;; this doesn't handle anchors properly yet.
 (defun muse-browse-url-iw (url)
-  (when (string-match "\\`iw:\\([a-zA-Z]*\\)\\\\\\(.+\\)#?\\(.*\\)" url)
+  (when (string-match "\\`iw:\\([a-zA-Z]*\\)\\W\\(.+\\)#?\\(.*\\)" url)
     (let* ((wiki-resolve
             (assoc (match-string 1 url)
                    muse-interwiki-protocol-alist))

reply via email to

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