unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41225: [PATCH] Show bookmark list in new tab
@ 2020-05-13  0:05 Matthias Meulien
  2020-08-08 11:47 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Matthias Meulien @ 2020-05-13  0:05 UTC (permalink / raw)
  To: 41225

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

A small patch that adds a customize choice to 
`tab-bar-new-tab-choice` in order to show bookmark list in new 
tab.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-bookmark.el-Customize-choice-to-show-bookmark-l.patch --]
[-- Type: text/x-diff, Size: 1642 bytes --]

From 67bc218224a548699e974d3276f54ae698987d93 Mon Sep 17 00:00:00 2001
From: Matthias Meulien <orontee@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


[-- Attachment #3: Type: text/plain, Size: 22 bytes --]


-- 
Matthias Meulien

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

end of thread, other threads:[~2020-08-09 19:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13  0:05 bug#41225: [PATCH] Show bookmark list in new tab Matthias Meulien
2020-08-08 11:47 ` Lars Ingebrigtsen
2020-08-08 11:49   ` Lars Ingebrigtsen
2020-08-09 14:35   ` Matthias Meulien
2020-08-09 19:51     ` Lars Ingebrigtsen

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).