From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Pierre-Yves Luyten Newsgroups: gmane.emacs.devel Subject: [PATCH] open bookmark in other frame Date: Wed, 10 Oct 2018 22:14:02 +0200 Message-ID: <9d4a9ab3-d802-447e-3c74-81373b7e6101@luyten.fr> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------AD78A5F8D501D610490B343F" X-Trace: blaine.gmane.org 1539202344 18448 195.159.176.226 (10 Oct 2018 20:12:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2018 20:12:24 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 Cc: Karl Fogel To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 10 22:12:20 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAKqB-0004gU-Mp for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2018 22:12:19 +0200 Original-Received: from localhost ([::1]:58938 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAKsI-0004Zd-B6 for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2018 16:14:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAKsB-0004ZH-Qw for emacs-devel@gnu.org; Wed, 10 Oct 2018 16:14:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAKs6-000578-Dj for emacs-devel@gnu.org; Wed, 10 Oct 2018 16:14:23 -0400 Original-Received: from 9.mo68.mail-out.ovh.net ([46.105.78.111]:53080) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAKs2-0004t1-QG for emacs-devel@gnu.org; Wed, 10 Oct 2018 16:14:16 -0400 Original-Received: from player799.ha.ovh.net (unknown [10.109.159.154]) by mo68.mail-out.ovh.net (Postfix) with ESMTP id 55D75FDD8D for ; Wed, 10 Oct 2018 22:14:04 +0200 (CEST) Original-Received: from [192.168.4.20] (85-170-98-108.rev.numericable.fr [85.170.98.108]) (Authenticated sender: py@luyten.fr) by player799.ha.ovh.net (Postfix) with ESMTPSA id EDFDC5200AC; Wed, 10 Oct 2018 22:14:02 +0200 (CEST) Content-Language: en-US-large X-Ovh-Tracer-Id: 6740762746062942339 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudeigddugeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.78.111 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230323 Archived-At: This is a multi-part message in MIME format. --------------AD78A5F8D501D610490B343F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello, people sometimes use several frames, so i would like to make opening bookmark one shot. Attached patch adds two funcs, "bookmark-jump-other-frame" and the equivalent from the bookmarks menu, "bookmark-bmenu-other-frame" Regards Pierre-Yves --------------AD78A5F8D501D610490B343F Content-Type: text/x-patch; name="0001-lisp-bookmark.el-other-frame.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-lisp-bookmark.el-other-frame.patch" >From bdcf094e15a1a51a1f137e407cf36bd79b42947d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Luyten Date: Wed, 10 Oct 2018 21:48:07 +0200 Subject: [PATCH] * lisp/bookmark.el : other-frame bookmark-jump-other-frame bookmark-bmenu-other-frame --- lisp/bookmark.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 58a279473d..3973e3b80e 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1124,6 +1124,13 @@ DISPLAY-FUNC would be `switch-to-buffer-other-window'." bookmark-current-bookmark))) (bookmark-jump bookmark 'switch-to-buffer-other-window)) +(defun bookmark-jump-other-frame (bookmark) + "Jump to BOOKMARK in another frame. See `bookmark-jump' for more." + (interactive + (list (bookmark-completing-read "Jump to bookmark (in another frame)" + bookmark-current-bookmark))) + (bookmark-jump bookmark 'view-buffer-other-frame)) + (defun bookmark-jump-noselect (bookmark) "Return the location pointed to by BOOKMARK (see `bookmark-jump'). @@ -1567,6 +1574,7 @@ unique numeric suffixes \"<2>\", \"<3>\", etc." (define-key map "\C-c\C-c" 'bookmark-bmenu-this-window) (define-key map "f" 'bookmark-bmenu-this-window) (define-key map "\C-m" 'bookmark-bmenu-this-window) + (define-key map "F" 'bookmark-bmenu-other-frame) (define-key map "o" 'bookmark-bmenu-other-window) (define-key map "\C-o" 'bookmark-bmenu-switch-other-window) (define-key map "s" 'bookmark-bmenu-save) @@ -1702,6 +1710,8 @@ Bookmark names preceded by a \"*\" have annotations. \\[bookmark-bmenu-this-window] -- select this bookmark in place of the bookmark menu buffer. \\[bookmark-bmenu-other-window] -- select this bookmark in another window, so the bookmark menu bookmark remains visible in its window. +\\[bookmark-bmenu-other-frame] -- select this bookmark in another frame, + so the bookmark menu bookmark remains visible in its window. \\[bookmark-bmenu-switch-other-window] -- switch the other window to this bookmark. \\[bookmark-bmenu-rename] -- rename this bookmark (prompts for new name). \\[bookmark-bmenu-relocate] -- relocate this bookmark's file (prompts for new file). @@ -1970,6 +1980,11 @@ With a prefix arg, prompts for a file to save them in." (let ((bookmark (bookmark-bmenu-bookmark))) (bookmark--jump-via bookmark 'switch-to-buffer-other-window))) +(defun bookmark-bmenu-other-frame () + "Select this line's bookmark in other frame, leaving bookmark menu visible." + (interactive) + (let ((bookmark (bookmark-bmenu-bookmark))) + (bookmark--jump-via bookmark 'view-buffer-other-frame))) (defun bookmark-bmenu-switch-other-window () "Make the other window select this line's bookmark. -- 2.19.0 --------------AD78A5F8D501D610490B343F--