all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: pquessev@gmail.com
Cc: emacs-devel@gnu.org
Subject: Re: browse-url and URL handlers (MS-Windows)
Date: Wed, 05 Oct 2022 10:11:54 +0200	[thread overview]
Message-ID: <87czb61xv1.fsf@gnu.org> (raw)
In-Reply-To: <825yh1b5si.fsf@gmail.com>

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



  parent reply	other threads:[~2022-10-05  8:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czb61xv1.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=pquessev@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.