* browse-url and URL type dependent actions
@ 2009-03-27 22:49 Crni Gorac
2009-03-29 12:55 ` Crni Gorac
0 siblings, 1 reply; 4+ messages in thread
From: Crni Gorac @ 2009-03-27 22:49 UTC (permalink / raw)
To: help-gnu-emacs
Am trying to change my ~/.emacs so that browse-url will start mutt on
"mailto:" links, and Firefox on other types of links. There is an
example in browse-url source code:
(setq browse-url-browser-function '(("^mailto:" . browse-url-mail)
("." . browse-url-firefox)))
However, instead of "browse-url-mail", I think I'd need to put "browse-
url-generic" in, and then also somehow to direct this function that
mutt should be launched (probably trough somehow setting "browse-url-
generic-program" and "browse-url-generic-args", preferably in some
kind of localized manner). Any suggestion on how to accomplish this
properly?
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: browse-url and URL type dependent actions
2009-03-27 22:49 browse-url and URL type dependent actions Crni Gorac
@ 2009-03-29 12:55 ` Crni Gorac
2009-03-30 20:01 ` Nikolaj Schumacher
[not found] ` <mailman.4266.1238443274.31690.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 4+ messages in thread
From: Crni Gorac @ 2009-03-29 12:55 UTC (permalink / raw)
To: help-gnu-emacs
On Mar 28, 12:49 am, Crni Gorac <cgo...@gmail.com> wrote:
> Am trying to change my ~/.emacs so that browse-url will start mutt on
> "mailto:" links, and Firefox on other types of links. There is an
> example in browse-url source code:
> (setq browse-url-browser-function '(("^mailto:" . browse-url-mail)
> ("." . browse-url-firefox)))
> However, instead of "browse-url-mail", I think I'd need to put "browse-
> url-generic" in, and then also somehow to direct this function that
> mutt should be launched (probably trough somehow setting "browse-url-
> generic-program" and "browse-url-generic-args", preferably in some
> kind of localized manner). Any suggestion on how to accomplish this
> properly?
In the meantime, came up with following:
(setq browse-url-generic-program "/usr/bin/xterm")
(setq browse-url-generic-args '("-e" "mutt"))
(setq browse-url-browser-function '(("^mailto:" . browse-url-
generic)
("." . browse-url-firefox)))
which works fine. Now, I'm wondering is it possible to somehow made
these assignments to "browse-url-generic-program" and "browse-url-
generic-args" to be "local" for handling "mailto" case? What if I
want multiple cases, and want to use different "generic" browsers for
them?
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: browse-url and URL type dependent actions
2009-03-29 12:55 ` Crni Gorac
@ 2009-03-30 20:01 ` Nikolaj Schumacher
[not found] ` <mailman.4266.1238443274.31690.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 4+ messages in thread
From: Nikolaj Schumacher @ 2009-03-30 20:01 UTC (permalink / raw)
To: Crni Gorac; +Cc: help-gnu-emacs
Crni Gorac <cgorac@gmail.com> wrote:
> In the meantime, came up with following:
> (setq browse-url-generic-program "/usr/bin/xterm")
> (setq browse-url-generic-args '("-e" "mutt"))
> (setq browse-url-browser-function '(("^mailto:" . browse-url-
> generic)
> ("." . browse-url-firefox)))
> which works fine. Now, I'm wondering is it possible to somehow made
> these assignments to "browse-url-generic-program" and "browse-url-
> generic-args" to be "local" for handling "mailto" case?
Try something like this:
(defun browse-url-mutt (url &optional new-window)
(let ((browse-url-generic-program "/usr/bin/xterm")
(browse-url-generic-args '("-e" "mutt")))
(browse-url-generic url new-window)))
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: browse-url and URL type dependent actions
[not found] ` <mailman.4266.1238443274.31690.help-gnu-emacs@gnu.org>
@ 2009-03-31 5:54 ` Crni Gorac
0 siblings, 0 replies; 4+ messages in thread
From: Crni Gorac @ 2009-03-31 5:54 UTC (permalink / raw)
To: help-gnu-emacs
On Mar 30, 10:01 pm, Nikolaj Schumacher <m...@nschum.de> wrote:
>
> Try something like this:
>
> (defun browse-url-mutt (url &optional new-window)
> (let ((browse-url-generic-program "/usr/bin/xterm")
> (browse-url-generic-args '("-e" "mutt")))
> (browse-url-generic url new-window)))
Works like charm, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-31 5:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 22:49 browse-url and URL type dependent actions Crni Gorac
2009-03-29 12:55 ` Crni Gorac
2009-03-30 20:01 ` Nikolaj Schumacher
[not found] ` <mailman.4266.1238443274.31690.help-gnu-emacs@gnu.org>
2009-03-31 5:54 ` Crni Gorac
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).