unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] open bookmark in other frame
@ 2018-10-10 20:14 Pierre-Yves Luyten
  2018-10-10 20:16 ` Marcin Borkowski
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Pierre-Yves Luyten @ 2018-10-10 20:14 UTC (permalink / raw)
  To: emacs-devel; +Cc: Karl Fogel

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

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

[-- Attachment #2: 0001-lisp-bookmark.el-other-frame.patch --]
[-- Type: text/x-patch, Size: 2820 bytes --]

From bdcf094e15a1a51a1f137e407cf36bd79b42947d Mon Sep 17 00:00:00 2001
From: Pierre-Yves Luyten <py@luyten.fr>
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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-11-09  0:54 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-10 20:14 [PATCH] open bookmark in other frame Pierre-Yves Luyten
2018-10-10 20:16 ` Marcin Borkowski
2018-10-10 21:35   ` Karl Fogel
2018-10-11 11:42     ` Pierre-Yves Luyten
2018-10-10 22:06 ` Drew Adams
2018-10-11  7:19   ` Karl Fogel
2018-10-11 11:30     ` Pierre-Yves Luyten
2018-10-11 13:35     ` Drew Adams
2018-10-11 21:50   ` Pierre-Yves Luyten
2018-10-11 22:04     ` Drew Adams
2018-10-12 19:45       ` Pierre-Yves Luyten
2018-10-12 21:23         ` Karl Fogel
2018-10-14 19:45           ` Pierre-Yves Luyten
2018-10-16  2:09             ` Karl Fogel
2018-10-16  9:51               ` Pierre-Yves Luyten
2018-10-16  2:10             ` Karl Fogel
2018-11-02 18:55             ` Karl Fogel
2018-11-04 21:10               ` Pierre-Yves Luyten
2018-11-09  0:54                 ` Karl Fogel
2018-10-13 15:04 ` Stephen Leake

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).