help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Making browse-url-firefox more robust?


From: Felix Dietrich
Subject: Re: Making browse-url-firefox more robust?
Date: Wed, 06 Apr 2022 02:50:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Tim Landscheidt <tim@tim-landscheidt.de> writes:

> I have set browse-url-browser-function to
> 'browse-url-firefox (and browse-url-firefox-arguments to
> '("-P" "default")) and it works reasonably fine: I see a
> link in Gnus or elsewhere in Emacs, I click on it, the link
> opens in a new tab in Firefox.
>
> Where it becomes a nuisance is when I don't need to open one
> link, but many, for example generated by some database query
> or generator function:
>
> | (dotimes (i 100)
> |   (browse-url (format "https://some.url/%d"; i)))
>
> In this case, each call to browse-url launches a separate,
> memory-hungry Firefox instance which tries to connect to the
> initial instance and either succeeds or fails after some
> time in which my system is essentially unusable.

If you go to <about:preferences>, what does the option “Open links in tabs
instead of new windows” under General/Tabs say?  The corresponding
configuration settings under <about:config> are:

    - browser.link.open_newwindow
      + 1 :: Open links in the current tab.
      + 2 :: Open links in a new window.
      + 3 :: Open links in a new tab.

    - browser.link.open_newwindow.override.external
      + -1 :: Use the value browser.link.open_newwindow.
      + Other values have the same meaning as for
        browser.link.open_newwindow.

For one of calls you can also use the “--new-tab” switch (starting with
a double or a single dash, does not seem to matter) to Firefox:

    firefox --new-tab URL

There also is an analogous “--new-window” switch.

Links:

<https://kb.mozillazine.org/Browser.link.open_newwindow>
<https://wiki.mozilla.org/Firefox/CommandLineOptions#-new-tab_URL>

-- 
Felix Dietrich



reply via email to

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