Re: [O] Firefox 36 and Links

2015-03-01 Thread Stefan-W. Hahn
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.



[O] Firefox 36 and Links

2015-02-26 Thread Scott Randby
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:


https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#-remote_remote_command

As a result, web links in an org file no longer open in Firefox when I 
click on them. This is mentioned as a comment at the following link:


  https://bugzilla.mozilla.org/show_bug.cgi?id=1080319#c19

I found a patch here:

  http://comments.gmane.org/gmane.emacs.bugs/99694

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 see that the patch has been put into 24.5, but I'd prefer to use a 
stable version of Emacs.


I'm confused about how to proceed. Should I wait for the next stable 
release of Emacs, or is there a solution I can use now?


Scott Randby



Re: [O] Firefox 36 and Links

2015-02-26 Thread Scott Randby

On 02/26/2015 06:33 PM, Nick Dokos wrote:

Nick Dokos ndo...@gmail.com writes:


Scott Randby sran...@gmail.com writes:


   http://comments.gmane.org/gmane.emacs.bugs/99694

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.



Oh, it's probably that gmane replaces @ signs with at to confuse
stupid address harvesters (which it will probably do to this message as
well :) ).

Try getting the patch from the emacs bug mailing list:

http://lists.gnu.org/archive/html/bug-gnu-emacs/2015-02/msg00751.html



... and if whitespace is a problem, try ignoring it:

  patch -p1 -l  browse-url.patch

or

  git apply --ignore-whitespace browse-url.patch

worked for me on 24.3.



I'm sorry, it appears that I don't have enough knowledge to do this 
correctly. I've been meaning to learn how to work with git, but I 
haven't been able to find the time to learn it. I don't install Emacs 
from git, so I'll just wait until the next version that fixes the 
problem comes out.










Re: [O] Firefox 36 and Links

2015-02-26 Thread Nick Dokos
Scott Randby sran...@gmail.com writes:

 ...
 I found a patch here:

   http://comments.gmane.org/gmane.emacs.bugs/99694

 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.


Does the patch not apply cleanly? Or it does, but the resulting function
does not work as expected? How exactly is it broken?

Nick





Re: [O] Firefox 36 and Links

2015-02-26 Thread Nick Dokos
Nick Dokos ndo...@gmail.com writes:

 Scott Randby sran...@gmail.com writes:

   http://comments.gmane.org/gmane.emacs.bugs/99694

 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.


 Oh, it's probably that gmane replaces @ signs with at to confuse
 stupid address harvesters (which it will probably do to this message as
 well :) ).

 Try getting the patch from the emacs bug mailing list:

 http://lists.gnu.org/archive/html/bug-gnu-emacs/2015-02/msg00751.html


... and if whitespace is a problem, try ignoring it:

 patch -p1 -l  browse-url.patch 

or

 git apply --ignore-whitespace browse-url.patch
 
worked for me on 24.3.