emacs-devel
[Top][All Lists]
Advanced

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

Should fancy-startup-screen really set browse-url-browser-function?


From: John Ankarström
Subject: Should fancy-startup-screen really set browse-url-browser-function?
Date: Thu, 09 Dec 2021 15:07:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (berkeley-unix)

The startup screen for GUI Emacs (fancy-startup-screen) apparently sets
browse-url-browser-function to eww-browse-url. The setting is
buffer-local, but it affects any commands that the user might manually
run from the startup screen.

For example, I have a command that I use for searching the web:

(defun misc-search-web (query)
 "Search the web with `browse-url'."
 (interactive "sQuery: ")
 (browse-url (format "https://www.google.com/search?q=%s&ie=UTF-8&gbv=1";
                     (url-encode-url query))))

It is bound to C-c w, and I make frequent use of it, but I have been
surprised that it opens eww sometimes (namely, when the startup screen
is active).

When users ask how to set the default browser for Emacs, they're often
told to customize browse-url-browser-function, but there's no mention in
the docstring of the fact that this variable is commonly(?) overridden.

(I say "commonly" not because I know it is common, but because the
built-in startup screen does so, which sets an example for others to
follow.)

Should fancy-startup-screen (and major modes in general) really override
browse-url-browser-function?




reply via email to

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