[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Firefox 36 and Links
From: |
Scott Randby |
Subject: |
Re: [O] Firefox 36 and Links |
Date: |
Thu, 26 Feb 2015 18:50:08 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Since I don't really know how to apply a patch properly, I tried the
following.
1. I found the lines in browse-url.el that the message discusses,
deleted the "-" lines and added the "+" lines.
2. I tried C-x C-e and I tried putting the new browse-url.el file into
the lisp/net directory (getting rid of the old browse-url files) and
restarting Emacs, but I get this message when I click on a link in an
org file:
Wrong type argument: stringp, nil
On 02/26/2015 06:12 PM, Nick Dokos wrote:
Scott Randby <address@hidden> 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?
Since I don't really know how to apply a patch properly, I tried the
following.
1. I found the lines in browse-url.el that the message discusses,
deleted the "-" lines and added the "+" lines.
2. I tried C-x C-e (which returns browse-url-firefox with no errors) and
then I tried putting the new browse-url.el file into the lisp/net
directory (getting rid of the old browse-url files) and restarting
Emacs, but both ways give this message when I click on a link in an org
file:
Wrong type argument: stringp, nil
Honestly, I have no idea if what I tried is even reasonable.
Here is the relevant code in the new browse-url.el file after I deleted
and added:
(defun browse-url-firefox (url &optional new-window)
"Ask the Firefox WWW browser to load URL.
Default to the URL around or before point. The strings in
variable `browse-url-firefox-arguments' are also passed to
Firefox.
When called interactively, if variable
`browse-url-new-window-flag' is non-nil, load the document in a
new Firefox window, otherwise use a random existing one. A
non-nil interactive prefix argument reverses the effect of
`browse-url-new-window-flag'.
If `browse-url-firefox-new-window-is-tab' is non-nil, then
whenever a document would otherwise be loaded in a new window, it
is loaded in a new tab in an existing window instead.
When called non-interactively, optional second argument
NEW-WINDOW is used instead of `browse-url-new-window-flag'.
On MS-Windows systems the optional `new-window' parameter is
ignored. Firefox for Windows does not support the \"-remote\"
command line parameter. Therefore, the
`browse-url-new-window-flag' and `browse-url-firefox-new-window-is-tab'
are ignored as well. Firefox on Windows will always open the requested
URL in a new window."
(interactive (browse-url-interactive-arg "URL: "))
(setq url (browse-url-encode-url url))
(let* ((process-environment (browse-url-process-environment))
(use-remote
(not (memq system-type '(windows-nt ms-dos))))
(process
(apply 'start-process
(concat "firefox " url) nil
browse-url-firefox-program
(append
browse-url-firefox-arguments
(if use-remote
(list
(if (browse-url-maybe-new-window new-window)
(if browse-url-firefox-new-window-is-tab
"--new-tab"
"--new-window"))
url)
(list url))))))
;; If we use -remote, the process exits with status code 2 if
;; Firefox is not already running. The sentinel runs firefox
;; directly if that happens.
(when use-remote
(set-process-sentinel process
`(lambda (process change)
(browse-url-firefox-sentinel process ,url))))))