[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-wiki-discuss] Re: minor bug in planner-vm
From: |
Chris McMahan |
Subject: |
Re: [emacs-wiki-discuss] Re: minor bug in planner-vm |
Date: |
Tue, 6 Sep 2005 08:04:15 -0400 |
Thanks for the fix Michael!
On a related note, I hacked a quick function to return only the
visible portion of a vm link (Email from xxxxx), and in isolation, it
works just fine. On publishing, however, I'm seeing the hidden portion
of the vm link instead.
Is there an issue when a resolve-url function returns only text and no
URL? I understand from the description below that this is the behavior
when set to nil, I'm just trying to get a handle on the behavior when
the text is specified.
Here's the function:
(defun planner-vm-resolve-url (url)
"Display only the text portion of the url, since links to internal
mail are useless within a web page"
(when (string-match muse-explicit-link-regexp url)
(concat "vm " (match-string 2 url))))
(planner-add-protocol "vm://" 'planner-vm-browse-url 'planner-vm-resolve-url)
- Chris
Michael Olson writes:
>Chris McMahan <address@hidden> writes:
>
>> With the latest muse implementation, I was getting publishing errors
>> when the resolve function in planner-add-prototol was set to nil
>>
>> (planner-add-protocol "vm://" 'planner-vm-browse-url nil)
>>
>> So setting it to
>> (planner-add-protocol "vm://" 'planner-vm-browse-url 'identity)
>>
>> was basically a work-around to get the publishing working again.
>>
>> I have to agree that the link itself is not a good idea. A function to
>> just display the text-portion of the link might be best.
>
>Aha! I neglected to read the part of the documentation for
>muse-url-protocols that said:
>
>"RESOLVE-FUN should accept URL as an argument and return the final
>URL, or nil if no URL should be included."
> ^^^
>
>This behavior should now be fixed with the following two patches.
>Thanks for the report!
>
>2005-09-04 17:07:07 GMT Michael Olson <address@hidden> patch-221
>
> Summary:
> Make info:// and man:// not publish a link, handle insert URL edge case.
> Revision:
> muse--main--1.0--patch-221
>
> * lisp/muse-protocols.el (muse-url-protocols): info:// and man:// should
> publish only the description, not the URL.
>
> * lisp/muse-publish.el (muse-publish-insert-url): Handle case where we
> get nil from muse-publish-url by not inserting any text.
>
> modified files:
> ChangeLog lisp/muse-protocols.el lisp/muse-publish.el
>
>
>2005-09-04 17:02:21 GMT Michael Olson <address@hidden> patch-220
>
> Summary:
> If a URL has a resolve function of nil, publish the description only.
> Revision:
> muse--main--1.0--patch-220
>
> * lisp/muse-mode.el (muse-visit-link-default): Make sure we search for a
> complete tag.
>
> * lisp/muse-protocols.el (muse-url-protocols): Improve customization
> interface.
> (muse-resolve-url): If nil is given as the resolve function, return
> nil.
>
> * lisp/muse-publish.el (muse-publish-url): If the URL resolves as nil,
> insert the description instead of the original URL.
>
> modified files:
> ChangeLog lisp/muse-mode.el lisp/muse-protocols.el
> lisp/muse-publish.el
>
>--
>Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
>Interests: anime, Debian, XHTML, wiki, Emacs Lisp
> /` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #pulug
> |_] | \| |_| Jabber: mwolson_at_hcoop.net
>_______________________________________________
>emacs-wiki-discuss mailing list
>address@hidden
>http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
--
================================
Chris McMahan | address@hidden
================================