emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: browse-url and URL handlers (MS-Windows)


From: Tassilo Horn
Subject: Re: browse-url and URL handlers (MS-Windows)
Date: Wed, 05 Oct 2022 10:11:54 +0200
User-agent: mu4e 1.9.1; emacs 29.0.50

Pascal Quesseveur <pquessev@gmail.com> writes:

Hi Pascal,

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

Yes, your analysis is correct.

> That means that for a URL which is not identified as HTML browse-url
> calls browse-url-emacs.

Not quite: browse-url--non-html-file-url-p is non-nil only for file://
URLs which target a non-HTML file.  In that case, browse-url-emacs will
find the file in the respective mode, e.g., image-mode for images.  That
doesn't seem awfully wrong to me.  It prefers opening files in emacs
rather than external programs, that's for sure.

But if you prefer having them opened by the preferred windows program,
add

  (setq browse-url-handlers
        '((browse-url--non-html-file-url-p
           . browse-url-default-windows-browser)))

to your init file.

If you feel that the default value is totally wrong, please file a bug
report so that this can be discussed.

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]