When openning a link in an Emacs buffer (via the browse-url command) each time the command is run the browser takes priority and steals focus from Emacs.
How can I change this behavior? I would like firefox to simply open the link in the background, is that possible?
As you are using Firefox, it will most likely be the
browse-url-firefoxfunction which is being called, and you do have some ability to configure default arguments (see the docstring), but I don’t see anything obviously useful infirefox --help.It sounds like the
browser.tabs.loadDivertedInBackgroundsetting in Firefox controls this behaviour, however. Access that fromabout:configand set it totrue.