emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Scott Randby <srandby@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Firefox 36 and Links
Date: Thu, 26 Feb 2015 18:50:08 -0500	[thread overview]
Message-ID: <54EFB130.2090208@gmail.com> (raw)
In-Reply-To: <87bnkgi7xi.fsf@alphaville.usersys.redhat.com>

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 <srandby@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?

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))))))

  reply	other threads:[~2015-02-26 23:50 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 [this message]
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

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=54EFB130.2090208@gmail.com \
    --to=srandby@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).