From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: emacs-devel@gnu.org
Subject: Suggested default change for browse-url-browser-function
Date: Mon, 08 Nov 2010 22:13:10 +0100 [thread overview]
Message-ID: <m3k4knbjtl.fsf@quimbies.gnus.org> (raw)
I was wondering where to plug in the correct mailto: behaviour in
shr.el, and it strikes me that perhaps this should be left to
browse-url, since that's controlling all the other url-browsing
behaviour.
So with that in mind, I propose the following change. It means that
anybody who uses browse-url on a mailto: link in Emacs will end up in
Message mode by default instead of popping up a browser.
The downside to doing it this way is that (I think) many people have
already set `browse-url-browser-function' to something else, so changing
the default won't actually have any significant effect, and mailto:
links still won't work for many people.
=== modified file 'lisp/net/browse-url.el'
*** lisp/net/browse-url.el 2010-10-09 00:52:12 +0000
--- lisp/net/browse-url.el 2010-11-08 20:51:32 +0000
***************
*** 214,226 ****
:group 'external
:group 'comm)
;;;###autoload
(defcustom browse-url-browser-function
! (cond
! ((memq system-type '(windows-nt ms-dos cygwin))
! 'browse-url-default-windows-browser)
! ((memq system-type '(darwin)) 'browse-url-default-macosx-browser)
! (t 'browse-url-default-browser))
"Function to display the current buffer in a WWW browser.
This is used by the `browse-url-at-point', `browse-url-at-mouse', and
`browse-url-of-file' commands.
--- 214,230 ----
:group 'external
:group 'comm)
+ (autoload 'message-mailto "message")
+
;;;###autoload
(defcustom browse-url-browser-function
! `(("\\`mailto:" . message-mailto)
! ("." .
! `(cond
! ((memq system-type '(windows-nt ms-dos cygwin))
! 'browse-url-default-windows-browser)
! ((memq system-type '(darwin)) 'browse-url-default-macosx-browser)
! (t 'browse-url-default-browser))))
"Function to display the current buffer in a WWW browser.
This is used by the `browse-url-at-point', `browse-url-at-mouse', and
`browse-url-of-file' commands.
***************
*** 260,266 ****
(function :tag "Your own function")
(alist :tag "Regexp/function association list"
:key-type regexp :value-type function))
! :version "21.1"
:group 'browse-url)
(defcustom browse-url-netscape-program "netscape"
--- 264,270 ----
(function :tag "Your own function")
(alist :tag "Regexp/function association list"
:key-type regexp :value-type function))
! :version "24.1"
:group 'browse-url)
(defcustom browse-url-netscape-program "netscape"
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
next reply other threads:[~2010-11-08 21:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 21:13 Lars Magne Ingebrigtsen [this message]
2010-11-08 21:55 ` Suggested default change for browse-url-browser-function Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3k4knbjtl.fsf@quimbies.gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).