From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Matthias Meulien Newsgroups: gmane.emacs.bugs Subject: bug#41225: [PATCH] Show bookmark list in new tab Date: Wed, 13 May 2020 02:05:23 +0200 Message-ID: <87eerok8cc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="65610"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: 41225@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 13 02:06:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYeuZ-000GwH-Cu for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 May 2020 02:06:11 +0200 Original-Received: from localhost ([::1]:41738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYeuY-0006x5-B8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 May 2020 20:06:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYeuQ-0006wj-Vp for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 20:06:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45352) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYeuQ-00031O-Mk for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 20:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jYeuQ-0006Nx-G3 for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 20:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matthias Meulien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 May 2020 00:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41225 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158932833124501 (code B ref -1); Wed, 13 May 2020 00:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 May 2020 00:05:31 +0000 Original-Received: from localhost ([127.0.0.1]:56898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYetv-0006N7-GL for submit@debbugs.gnu.org; Tue, 12 May 2020 20:05:31 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYett-0006Mz-Fg for submit@debbugs.gnu.org; Tue, 12 May 2020 20:05:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYett-0006uj-Bj for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 20:05:29 -0400 Original-Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:33112) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYetr-00029p-VV for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 20:05:29 -0400 Original-Received: by mail-wm1-x332.google.com with SMTP id d207so7584975wmd.0 for ; Tue, 12 May 2020 17:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=xRtEiMW408QBLUAVbFJKVe28gLq1coJMvfc6Tc1DexQ=; b=X+KIOlTCiRs38wzeMWXG+9FB3EJsFY6ypCm7xEv2egEKTMB6F//NLbNoZsgOh43gM0 cAXGEi7Lxw9FMBEG/LriP8Scb5Z3ouXuJCHPQbpirxdg7Y/WEfyFc3g322YLmWJvmmfh fKAj5NuMHJocpAK+7mpg83iCG+Ztdm0vPmVFGsG91P98al/9Ad54/1nR0asNv8XGnFGP YKESznymeCmqSR30UF7LDZLdR3hDFigx7ZPYGTIRPp0m9c9+3I4KwMiSUh3+Vmxnw80k 5k2xj7YR10zjcI5QO+DTAA+UKJQTALsLuGr6qaznYFpEh7KbVGIf3GzfnE+KFn1uiQ93 l++A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=xRtEiMW408QBLUAVbFJKVe28gLq1coJMvfc6Tc1DexQ=; b=U8wG/nx/ISEdiPRZv5mEWqOrPpDuvvtUNPPCGNs4DAOQluJIXlql2ZDVu9zHqsSTBp bHUeGCNoQlRCuR/rmlmJt5hqTJ2eF9whH518ny7JFAPkUMe7pk1J6IWZp+3Lvd+vpeEc 0HShPrvC3cYw+WEiVQ4tqebrtgkz2Z5KDRJWDwwJhS802cWwd4QyeynCVIJipAhWoys6 X1zDjb7uIcbG0PZQVL/EjzYS1DLqJDR4B2+7tyGU7+3k3pi1bpH38x7Kt8iF4BKLbF1K +uKRM/pNqO14pn3uRpSj/1Ufjhj58310kAsaZ+rBV99u/XROyZIYL2jr8F01+Q9AVOkx bqBA== X-Gm-Message-State: AGi0PubXlvMdKlHJxHgix2vvfC6C/ikWHfCxCMteGfrXRC+gcwCmNZrT 6/al39NhDPyMgM70tth19JAd1SaCt2w= X-Google-Smtp-Source: APiQypJerq+SgrPaNSRzVHrQzVPsQ9KqstdhRlMdRbYAxbe7V/9Fd5I/qv283UovBN3vhoNpkHNqEA== X-Received: by 2002:a7b:c927:: with SMTP id h7mr39320156wml.122.1589328325622; Tue, 12 May 2020 17:05:25 -0700 (PDT) Original-Received: from carbon.localdomain ([2a01:e0a:252:7910:f1be:8104:293:6ee2]) by smtp.gmail.com with ESMTPSA id a67sm35997567wmc.30.2020.05.12.17.05.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 17:05:24 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=orontee@gmail.com; helo=mail-wm1-x332.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180133 Archived-At: --=-=-= Content-Type: text/plain; format=flowed A small patch that adds a customize choice to `tab-bar-new-tab-choice` in order to show bookmark list in new tab. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-lisp-bookmark.el-Customize-choice-to-show-bookmark-l.patch >From 67bc218224a548699e974d3276f54ae698987d93 Mon Sep 17 00:00:00 2001 From: Matthias Meulien 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 --=-=-= Content-Type: text/plain; format=flowed -- Matthias Meulien --=-=-=--