[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-wiki-discuss] Re: transitioning to muse
From: |
Yvonne Thomson |
Subject: |
Re: [emacs-wiki-discuss] Re: transitioning to muse |
Date: |
Tue, 18 Oct 2005 09:39:33 +1000 |
User-agent: |
Wanderlust/2.14.0 (Africa) Emacs/21.3 Mule/5.0 (SAKAKI) |
At Mon, 17 Oct 2005 22:23:55 +0100,
Jim Ottaway wrote:
>
> I have just started using muse too, so I am doing similar
> translations.
>
> It looks as though the muse equivalents take a project name in their
> arguments, so the above would look something like:
>
> (defun w3m-wiki-bookmark-view (section)
> "View a section of the bookmark list"
> (interactive
> (list (muse-read-project-file "bookmarks" "Section: ")))
> (muse-project-find-file section "bookmarks")
> ...
This is the thing. That's what *I* thought, too. What you in fact get if
you try this and, say, enter a section name of emacs is:
muse-project-find-file: Wrong type argument: stringp, ("emacs")
I can't for the life of me work out what it's looking for.
> That's a great idea to use muse pages for w3m bookmarks. I suppose it
> is possible to add annotations to them? I would find something like
> that very useful: have you or will you be posting the code?
>
Exactly. Plus, if you were inclined, you could publish them really
easily.
Actually no, I haven't ever released the code. Most people I've floated
the idea to think I'm nuts. If I ever get it to work under muse, though,
I'll post it.
> muse-explicit-link-regexp's match group 2 has the description, so
> something like this, perhaps?
>
> (defadvice emacs-wiki-next-reference (after emacspeak pre act)
> "Speak the next reference "
> (dtk-stop)
> (emacspeak-auditory-icon 'scroll)
> (when (looking-at muse-explicit-link-regexp)
> (dtk-speak (match-string-no-properties 2))))
Ah, wouldn't it be nice if it was that easy? <grin>. For your
interest, and for anyone else who does a search and wants to know how
to do this, what I actually ended up with looked more like
this. Please try to ignore the atrocious formatting.
(defadvice muse-next-reference (after emacspeak pre act)
"Speak the next reference "
(dtk-stop)
(emacspeak-auditory-icon 'scroll)
(cond ((looking-at muse-explicit-link-regexp)
(if (match-string-no-properties 2)
(dtk-speak (match-string-no-properties 2))
(dtk-speak (match-string-no-properties 1))
)
)
((looking-at muse-implicit-link-regexp)
(dtk-speak(match-string-no-properties 1)))))
A very quick test on my planner files says this works, but god knows
if there are any other special cases to worry about.
Ah, isn't transitioning fun?