From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Randby Subject: Re: Firefox 36 and Links Date: Thu, 26 Feb 2015 18:50:08 -0500 Message-ID: <54EFB130.2090208@gmail.com> References: <54EF9CFC.4080605@gmail.com> <87bnkgi7xi.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR8C7-0007B1-Jk for emacs-orgmode@gnu.org; Thu, 26 Feb 2015 18:50:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YR8C4-00050T-2J for emacs-orgmode@gnu.org; Thu, 26 Feb 2015 18:50:15 -0500 Received: from mail-ie0-x234.google.com ([2607:f8b0:4001:c03::234]:35204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR8C3-00050L-SD for emacs-orgmode@gnu.org; Thu, 26 Feb 2015 18:50:11 -0500 Received: by iecrl12 with SMTP id rl12so23040631iec.2 for ; Thu, 26 Feb 2015 15:50:11 -0800 (PST) Received: from [192.168.1.100] (cpe-184-56-99-2.neo.res.rr.com. [184.56.99.2]) by mx.google.com with ESMTPSA id sd7sm194799igb.20.2015.02.26.15.50.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Feb 2015 15:50:10 -0800 (PST) In-Reply-To: <87bnkgi7xi.fsf@alphaville.usersys.redhat.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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 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))))))