unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Suggested default change for browse-url-browser-function
@ 2010-11-08 21:13 Lars Magne Ingebrigtsen
  2010-11-08 21:55 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-11-08 21:13 UTC (permalink / raw)
  To: emacs-devel

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Suggested default change for browse-url-browser-function
  2010-11-08 21:13 Suggested default change for browse-url-browser-function Lars Magne Ingebrigtsen
@ 2010-11-08 21:55 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-11-08 21:55 UTC (permalink / raw)
  To: emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> !   `(("\\`mailto:" . message-mailto)

`browse-url-mail' already exists, I found it later...  but the same
suggestion still stands, I guess -- change the default to use
`browse-url-mail' if we're being fed a mailto: url.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-08 21:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-08 21:13 Suggested default change for browse-url-browser-function Lars Magne Ingebrigtsen
2010-11-08 21:55 ` Lars Magne Ingebrigtsen

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).