From: Matthias Meulien <orontee@gmail.com>
To: 41225@debbugs.gnu.org
Subject: bug#41225: [PATCH] Show bookmark list in new tab
Date: Wed, 13 May 2020 02:05:23 +0200 [thread overview]
Message-ID: <87eerok8cc.fsf@gmail.com> (raw)
[-- 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
next reply other threads:[~2020-05-13 0:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 0:05 Matthias Meulien [this message]
2020-08-08 11:47 ` bug#41225: [PATCH] Show bookmark list in new tab Lars Ingebrigtsen
2020-08-08 11:49 ` Lars Ingebrigtsen
2020-08-09 14:35 ` Matthias Meulien
2020-08-09 19:51 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eerok8cc.fsf@gmail.com \
--to=orontee@gmail.com \
--cc=41225@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).