unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* browse-url and URL handlers (MS-Windows)
@ 2022-10-03  9:44 Pascal Quesseveur
  2022-10-03 20:42 ` Stefan Kangas
  2022-10-05  8:11 ` Tassilo Horn
  0 siblings, 2 replies; 25+ messages in thread
From: Pascal Quesseveur @ 2022-10-03  9:44 UTC (permalink / raw)
  To: emacs-devel

Hello,

On MS-Windows I had set browse-url-browser-function to a custom
function which calls 'rundll32 url.dll,FileProtocolHandler ...'  to
open the URL with the dedicated program. I had set that definition
some years ago and I am pretty sure it worked.

With 28.1 it appears that my function is no longer called. It seems to
me it comes from the fact that browse-url uses
browse-url-default-handlers which is defined as:

(("\\`mailto:" . browse-url--mailto)
 ("\\`man:" . browse-url--man)
 (browse-url--non-html-file-url-p . browse-url-emacs))

That means that for a URL which is not identified as HTML browse-url
calls browse-url-emacs. On my system that doesn't work when files are
not ASCII file (PNG, RTF, ...). I can define browse-url-handlers to
set a handler to open those files with an axternal program but I find
it annoying.

When called with a PREFIX browse-url calls
browse-url-secondary-browser-function which calls
browse-url-default-windows-browser. On MS-Windows that function calls
the MS-Windows system's default Web browser

(w32-shell-execute "open" ...)

and everything works as expected.

Why not always call browse-url-default-windows-browser in browse-url?
If I want to open a certain type of file with emacs, I can configure
the system to use emacsclient with that type of file.  IMO things
would be easier.


-- 
Pascal Quesseveur
pquessev@gmail.com




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

end of thread, other threads:[~2022-10-12  7:25 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-03  9:44 browse-url and URL handlers (MS-Windows) Pascal Quesseveur
2022-10-03 20:42 ` Stefan Kangas
2022-10-05  8:11 ` Tassilo Horn
2022-10-05 16:21   ` Pascal Quesseveur
2022-10-11 10:04   ` Pascal Quesseveur
2022-10-11 12:32     ` Augusto Stoffel
2022-10-11 15:31       ` Pascal Quesseveur
2022-10-11 16:36       ` Eli Zaretskii
2022-10-11 16:59         ` Pascal Quesseveur
2022-10-11 17:16           ` Eli Zaretskii
2022-10-12  7:20             ` Pascal Quesseveur
2022-10-11 17:45         ` Augusto Stoffel
2022-10-11 18:50         ` Stefan Monnier
2022-10-11 17:23       ` Lars Ingebrigtsen
2022-10-11 17:39         ` Eli Zaretskii
2022-10-11 18:04           ` Lars Ingebrigtsen
2022-10-11 18:21             ` Eli Zaretskii
2022-10-11 18:24               ` Lars Ingebrigtsen
2022-10-11 19:27                 ` Eli Zaretskii
2022-10-11 19:32                   ` Lars Ingebrigtsen
2022-10-12  6:54                     ` Pascal Quesseveur
2022-10-11 18:52             ` Lars Ingebrigtsen
2022-10-11 19:16               ` Eli Zaretskii
2022-10-12  7:25               ` Augusto Stoffel
2022-10-11 17:43         ` Augusto Stoffel

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