[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30673: [PATCH] Allow `browse-url-emacs' to fetch url in same window.
From: |
Pierre Téchoueyres |
Subject: |
bug#30673: [PATCH] Allow `browse-url-emacs' to fetch url in same window. |
Date: |
Fri, 02 Mar 2018 01:14:03 +0100 |
User-agent: |
mu4e 1.1.0; emacs 26.0.91 |
Here is a patch to allow browse-url-emacs to be invoked in a way to
reuse the current window.
Could it be included into master branch ? I guess it's too late for
emacs-26.
Thanks
>From 8bd95d79c32b29bd11202ced04fd811d4a8f6119 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre=20T=C3=A9choueyres?= <pierre.techoueyres@free.fr>
Date: Thu, 1 Mar 2018 22:22:05 +0100
Subject: [PATCH] Allow `browse-url-emacs' to fetch url in same window.
* lisp/net/browse-url.el (browse-url-emacs): add same-window argument.
---
lisp/net/browse-url.el | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 98b0acfc0c..a8055d1dc9 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1243,18 +1243,14 @@ browse-url-epiphany-sentinel
(defvar url-handler-regexp)
;;;###autoload
-(defun browse-url-emacs (url &optional _new-window)
+(defun browse-url-emacs (url &optional same-window)
"Ask Emacs to load URL into a buffer and show it in another window."
(interactive (browse-url-interactive-arg "URL: "))
(require 'url-handlers)
(let ((file-name-handler-alist
(cons (cons url-handler-regexp 'url-file-handler)
file-name-handler-alist)))
- ;; Ignore `new-window': with all other browsers the URL is always shown
- ;; in another window than the current Emacs one since it's shown in
- ;; another application's window.
- ;; (if new-window (find-file-other-window url) (find-file url))
- (find-file-other-window url)))
+ (if same-window (find-file url) (find-file-other-window url))))
;;;###autoload
(defun browse-url-gnome-moz (url &optional new-window)
--
2.14.3
- bug#30673: [PATCH] Allow `browse-url-emacs' to fetch url in same window.,
Pierre Téchoueyres <=