[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Browse-url and multi-display setups
From: |
Stefan Monnier |
Subject: |
Browse-url and multi-display setups |
Date: |
Fri, 03 Nov 2006 17:04:07 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.90 (gnu/linux) |
I recently bump into a bug in browse-url: I was displaying my home Emacs
session on my laptop and tried to click on a URL link, expecting it to get
displayed in my browser (on my latop), but apparently nothing happened
(probably that it made my work's browser display the page: I'll know
when I get back to the office ;-).
The patch below should fix it.
OK to commit?
Stefan
--- browse-url.el 28 mai 2006 20:58:54 -0400 1.54
+++ browse-url.el 03 nov 2006 17:03:28 -0500
@@ -760,6 +760,12 @@
(interactive (browse-url-interactive-arg "URL: "))
(unless (interactive-p)
(setq args (or args (list browse-url-new-window-flag))))
+ (let ((process-environment (copy-sequence process-environment)))
+ ;; When connected to various displays, be careful to use the display of
+ ;; the currently selected frame, rather than the original start display,
+ ;; which may not even exist any more.
+ (if (stringp (frame-parameter (selected-frame) 'display))
+ (setenv "DISPLAY" (frame-parameter (selected-frame) 'display)))
(if (functionp browse-url-browser-function)
(apply browse-url-browser-function url args)
;; The `function' can be an alist; look down it for first match
@@ -770,7 +776,7 @@
(apply (cdr bf) url args)
(throw 'done t)))
(error "No browse-url-browser-function matching URL %s"
- url))))
+ url)))))
;;;###autoload
(defun browse-url-at-point (&optional arg)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Browse-url and multi-display setups,
Stefan Monnier <=