GNU bug report logs - #41225
[PATCH] Show bookmark list in new tab

Previous Next

Package: emacs;

Reported by: Matthias Meulien <orontee <at> gmail.com>

Date: Wed, 13 May 2020 00:06:02 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Matthias Meulien <orontee <at> gmail.com>
To: 41225 <at> debbugs.gnu.org
Subject: bug#41225: [PATCH] Show bookmark list in new tab
Date: Wed, 13 May 2020 02:05:23 +0200
[Message part 1 (text/plain, inline)]
A small patch that adds a customize choice to 
`tab-bar-new-tab-choice` in order to show bookmark list in new 
tab.

[0001-lisp-bookmark.el-Customize-choice-to-show-bookmark-l.patch (text/x-diff, inline)]
From 67bc218224a548699e974d3276f54ae698987d93 Mon Sep 17 00:00:00 2001
From: Matthias Meulien <orontee <at> gmail.com>
Date: Tue, 12 May 2020 21:51:40 +0200
Subject: [PATCH] lisp/bookmark.el: Customize choice to show bookmark list in a
 new tab

---
 etc/NEWS         |  5 +++++
 lisp/bookmark.el | 14 ++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index 01c584833b..f3725e954b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -348,6 +348,11 @@ symbol property to the browsing functions.  With a new command
 'browse-url-with-browser-kind', an URL can explicitly be browsed with
 either an internal or external browser.
 
+** bookmark
+
+When the 'bookmark.el' library is loaded, a customize choice is added
+to 'tab-bar-new-tab-choice' for new tab to show the bookmark list.
+
 ** vc-dir.el
 
 *** Support for bookmark.el.
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 0fa77ed322..3a8b07f241 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1666,6 +1666,20 @@ bookmark-bmenu-surreptitiously-rebuild-list
           (bookmark-bmenu-list)))))
 
 
+;;;###autoload
+(defun bookmark-bmenu-get-buffer ()
+  "Return the Bookmark List, building it if it doesn't exists.
+Don't affect the buffer ring order."
+  (cond
+     ((get-buffer bookmark-bmenu-buffer))
+     (t (save-excursion
+	  (save-window-excursion
+	    (bookmark-bmenu-list)
+	    (get-buffer bookmark-bmenu-buffer))))))
+
+(nconc (get 'tab-bar-new-tab-choice 'custom-type)
+       '((const :tag "Bookmark List" bookmark-bmenu-get-buffer)))
+
 ;;;###autoload
 (defun bookmark-bmenu-list ()
   "Display a list of existing bookmarks.
-- 
2.20.1

[Message part 3 (text/plain, inline)]
-- 
Matthias Meulien

This bug report was last modified 4 years and 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.