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

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

[emacs-wiki-discuss] Re: 'planner-set-sym-and-url-regexp' erase 'muse-ur


From: drkm
Subject: [emacs-wiki-discuss] Re: 'planner-set-sym-and-url-regexp' erase 'muse-url-regexp'
Date: Mon, 25 Jul 2005 02:58:08 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (windows-nt)

drkm writes:

>   BTW, why Planner does use its own protocol list?  Is not
> 'muse-url-regexp', with a 'muse-add-url' function, enough?

  It could be fine, too, if 'muse-url-regexp' store formating
functions, as 'planner-url-protocols' does.  I have this in my
~/.emacs.el:

    (defun drkm-plan:browse-url-usenet (url)
      "Jump to the Usenet article URL, via Google Groups."
      (let ((url (drkm-plan:resolve-url-usenet url)))
        (when url
          (browse-url url))))

    (defun drkm-plan:resolve-url-usenet (url)
      "Return the correct Google Groups address for the Usenet article URL."
      (when (string-match "^USENET:\\(.+\\)" url)
        (concat "http://groups.google.com/groups?selm=";
                (match-string 1 url))))

    (eval-after-load 'planner
      '(planner-add-protocol "USENET"
                             'drkm-plan:browse-url-usenet
                             'drkm-plan:resolve-url-usenet))

  At this time, the links look like:

    &lt;<a href="usenet:...">USENET:...</a>&gt;

  With such a system for 'muse-url-regexp', I could use these for
properly publish my pages in HTML.  To have something like:

    &lt;<a href="http://groups.google.com/groups?selm=...";>...</a>&gt;

  Maybe is possible with Muse projects?

--drkm





reply via email to

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