"Phillip Lord" <[EMAIL PROTECTED]> writes: > Incidentally, has anyone else had strange problems with protocols > when running emacs in batch? I've found that when changing > muse-url-protocols in a normal, interactive, emacs muse-url-regexp > gets updated correctly (even though I don't use custom to do > this). But in batch, it doesn't update. > > I was going to suggest deleting muse-url-regexp and replacing it > with a function for use instead (of course, there is nothing to stop > the function from storing the regexp it calculates, and then > checking each time to make sure that muse-url-protocols hasn't > changed). This way, muse would not be relying on a side-effect of > custom setting muse-url-protocol to keep things up to date.
Add the following to your configuration, after setting muse-url-protocols. (muse-update-url-regexp 'muse-url-protocols muse-url-protocols) One potential solution to this mess is to make a hook that gets called just before publishing (or in muse-mode, for displaying Muse files), and add all of these extra code snippets to it. I think I'll go with that. > (defun phil-muse-resolve-url-doi (url) > "Return the URL through doi proxy server" > (when (string-match "\\`doi:\\(.+\\)" url) > (concat "http://dx.doi.org/" > (match-string 1 url)))) > > (defun phil-muse-browse-url-doi (url) > (let ((doi-url (phil-muse-resolve-url-doi url))) > (when doi-url > (browse-url doi-url)))) I've added this, since you say it is fairly standard. > ;; interwiki protocol handling. This enables non wiki word type > ;; interwiki support, with a different local resolve. > ;; (adelete 'muse-url-protocols "iw:") > (add-to-list 'muse-url-protocols > '("iw:" phil-muse-browse-url-iw > phil-muse-resolve-url-iw)) Haven't taken a look at this yet. I will do so next week. -- Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/ Interests: Emacs Lisp, text markup, IRC, EMMS, anime, manga, Debian /` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #PurdueLUG |_] | \| |_| Jabber: mwolson_at_hcoop.net
pgpSqDeEwopLo.pgp
Description: PGP signature
_______________________________________________ emacs-wiki-discuss mailing list emacs-wiki-discuss@nongnu.org http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss