From: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
To: Scott Randby <srandby@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Firefox 36 and Links
Date: Sun, 1 Mar 2015 09:09:01 +0100 [thread overview]
Message-ID: <20150301080901.GC22486@pille.home> (raw)
In-Reply-To: <54EF9CFC.4080605@gmail.com>
Mail von Scott Randby, Thu, 26 Feb 2015 at 17:23:56 -0500:
Hello,
> I know this isn't exactly a question about org, but it affects org,
> so I'm hoping someone on this list might be willing to help me.
>
> The -remote command line option has been removed from Firefox 36:
I ran in the same problem on linux.
> I can't get the patch to work with Emacs 24.3 or 24.2. This could be
> due to my very poor knowledge of elisp or that the patch isn't
> compatible with those versions of Emacs.
I worked around it with a little elisp:
#+BEGIN_SRC elisp
(use-package browse-url
:if running-linux
:init
(progn
(let ((str (shell-command-to-string "firefox -v")))
(when (and (string-match "Mozilla Firefox \\([0-9]+\\)\\.[0-9]+" str)
(>= (string-to-number (match-string 1 str)) 36))
(advice-add 'browse-url-firefox :around 'browse-url-firefox-version-36)
(message "Advice added for `browse-url-firefox' to call firefox >= v36")
))
)
:config
(progn
(defun browse-url-firefox-version-36 (orig-fun url &optional new-window)
"Linux version of firefox (>=v36.0) does not know the command
\"-remote openURL(...)\". So act in linux as on windows and
give just the requested URL as command line parameter."
(let ((system-type 'windows-nt))
(apply orig-fun url new-window)))
)
)
#+END_SRC
If you're not using "use-package" then the following minimal code will suffice:
#+BEGIN_SRC elisp
(require 'browse-url)
(advice-add 'browse-url-firefox :around 'browse-url-firefox-version-36)
(defun browse-url-firefox-version-36 (orig-fun url &optional new-window)
"Linux version of firefox (>=v36.0) does not know the command
\"-remote openURL(...)\". So act in linux as on windows and
give just the requested URL as command line parameter."
(let ((system-type 'windows-nt))
(apply orig-fun url new-window)))
#+END_SRC
With kinde regards,
Stefan
--
Stefan-W. Hahn It is easy to make things.
It is hard to make things simple.
prev parent reply other threads:[~2015-03-01 8:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 22:23 Firefox 36 and Links Scott Randby
2015-02-26 23:12 ` Nick Dokos
2015-02-26 23:50 ` Scott Randby
2015-02-26 23:23 ` Nick Dokos
2015-02-26 23:33 ` Nick Dokos
2015-02-27 0:04 ` Scott Randby
2015-03-01 8:09 ` Stefan-W. Hahn [this message]
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150301080901.GC22486@pille.home \
--to=stefan.hahn@s-hahn.de \
--cc=emacs-orgmode@gnu.org \
--cc=srandby@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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).