From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Add new functions to mark/unmark/delete all bookmarks Date: Thu, 23 Jul 2020 20:15:25 -0700 (PDT) Message-ID: <03f641b5-9ff9-476f-afab-e674e4027d27@default> References: <20200724005105.11f85d5f@pineapple> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30886"; mail-complaints-to="usenet@ciao.gmane.io" To: Matthew White , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 24 05:16:14 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jyoBy-0007xE-GX for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Jul 2020 05:16:14 +0200 Original-Received: from localhost ([::1]:44966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyoBx-00034Z-JM for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Jul 2020 23:16:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyoBP-0002eJ-6s for emacs-devel@gnu.org; Thu, 23 Jul 2020 23:15:39 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:59624) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyoBM-0008S7-MT for emacs-devel@gnu.org; Thu, 23 Jul 2020 23:15:38 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06O3DsaX047261; Fri, 24 Jul 2020 03:15:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=76WwncM5dmko3hjr9pF1IsXl7TaPWPEiO+OQNb2FAB8=; b=0f2qgYOh0J2f1+zBeR+YVndWhrshDBQ/mjw/nmwRWRnxivRO6NZvpbTWdLRVEy4sFBri zEh6qk37mfJTMuG83GdtFlhuhHC8PU83pVGuNesT3OisF7hZpdpqNmzdp6XdniRzV9EK STWPlquaRzDhwHDsJ5tIwNvwsEaiGUQEEQFhSGqFe4pbznViWoegA1CS2KScYdXqyc8n GngPYngBjpmCSvMBTRaw8/Ot2scMPsIy+wE3oRZIR1+QuEw2fUHQfLe4pSWRp5dF/KEn /0MehdN8MMXOEtq82MQR7kgMHeJhsUgDaReDRu/4sss4i6yRqQ6bQO5KycLO+6gM/FJZ HA== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 32d6kt148e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 24 Jul 2020 03:15:32 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06O3ELg9069408; Fri, 24 Jul 2020 03:15:31 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 32fp76uhv5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Jul 2020 03:15:31 +0000 Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 06O3FP3H016380; Fri, 24 Jul 2020 03:15:26 GMT In-Reply-To: <20200724005105.11f85d5f@pineapple> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5017.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9691 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 adultscore=0 phishscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007240022 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9691 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 impostorscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 spamscore=0 adultscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007240022 Received-SPF: pass client-ip=156.151.31.85; envelope-from=drew.adams@oracle.com; helo=userp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/23 23:15:33 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:253176 Archived-At: > Attached here there is a patch to add new functions to mark, unmark, > and delete all bookmarks at once. >=20 > Menu entries and bindings are updated too, and tests are included. >=20 > You may consider this both a suggestion and a way to get an opinion > from the community. >=20 > I felt that some functions where missing, I'm used to type "U" in > dired to unmark all marks... >=20 > Summary (just main functions are described here): >=20 > * bookmark-delete-all: With ARG nil asks for confirmation. Deletes all > bookmarks. Bound to "D" in `bookmark-map'. > * bookmark-bmenu-mark-all: Operates in the *Bookmark List* buffer. > Marks all bookmarks. Bound to "M" in `bookmark-bmenu-mode-map'. > * bookmark-bmenu-unmark-all: Operates in the *Bookmark List* buffer. > Unmarks all bookmarks. Bound to "U" in `bookmark-bmenu-mode-map'. > * bookmark-bmenu-delete-all: Operates in the *Bookmark List* buffer. > Marks all bookmarks for deletion. Bound to "D" in `bookmark-bmenu-mode- > map'. Well, I naturally am not in favor of seeing this. All of that is in Bookmark+, but better, IMO. You could have taken some of what's there, either as is or as a starting point. The Bookmark+ behavior borrows heavily from Dired (and not just for marking). `U', like `M-DEL', unmarks all of a given kind of mark, or all marks. There are commands to mark different kinds of bookmarks and commands to mark bookmarks that satisfy various conditions. `M-m' marks all bookmarks. (`M' is a prefix key for marking or showing only `man' bookmarks. Most uppercase letters are prefix keys for acting on particular kinds of bookmarks. `M' as a suffix key marks bookmarks of the type indicated by the prefix key; e.g., `I M' marks Info bookmarks.) Marking flexibility carries over for deletion. As in Dired, `D' deletes the marked bookmarks - it doesn't flag for deletion. `d' and `C-d' flag individually. As in Dired, there's no need for a command to flag all, IMO. https://www.emacswiki.org/emacs/BookmarkPlus#MarkingAndUnmarkingBookmarks ___ Some of the commands involving mark (`>') and flag (`D') that are bound to keys: d=09- Flag bookmark `D' for deletion, then move down C-d=09- Flag bookmark `D' for deletion, then move up x=09- Delete (visible) bookmarks flagged `D' D=09- Delete (visible) bookmarks marked `>' m=09- Mark bookmark u=09- Unmark bookmark (`C-u': move up one line) DEL=09- Unmark previous bookmark (move up, then unmark) M-m=09- Mark all bookmarks % m=09- Mark all bookmarks whose names match a regexp U=09- Unmark all bookmarks (`C-u': interactive query) t=09- Toggle marks: unmark the marked and mark the unmarked A M=09- Mark autofile bookmarks # M=09- Mark autonamed bookmarks X M=09- Mark temporary bookmarks H M=09- Mark highlighted bookmarks B M=09- Mark non-file (i.e. buffer) bookmarks M-d M-m=09- Mark Dired bookmarks F M=09- Mark file & directory bookmarks (`C-u': local only) G M=09- Mark Gnus bookmarks I M=09- Mark Info bookmarks i M=09- Mark Icicles search-hits bookmarks N M=09- Mark non-invokable bookmarks M-I M-M=09- Mark image-file bookmarks K M=09- Mark desktop bookmarks M M=09- Mark `man' page bookmarks (that's `M' twice, not Meta-M) O M=09- Mark orphaned local file/dir bookmarks (`C-u': remote also) R M=09- Mark region bookmarks Q M=09- Mark function bookmarks M-u M-m=09- Mark URL bookmarks V M=09- Mark variable-list bookmarks W 3 M=09- Mark W3M (URL) bookmarks w M=09- Mark snippet bookmarks Y M=09- Mark bookmark-file bookmarks Z M=09- Mark bookmark-list bookmarks T m %=09- Mark bookmarks having at least one tag that matches a regexp T m +=09- Mark bookmarks having at least one tag in a set (OR) T m *=09- Mark bookmarks having all of the tags in a set (AND) T m ~ +=09- Mark bookmarks not having any of the tags in a set (NOT OR) T m ~ *=09- Mark bookmarks not having all of the tags in a set (NOT AND) T u %=09- Unmark bookmarks having a tag that matches a regexp T u +=09- Unmark bookmarks having at least one tag in a set (OR) T u *=09- Unmark bookmarks having all of the tags in a set (AND) T u ~ +=09- Unmark bookmarks not having any tags in a set (NOT OR) T u ~ *=09- Unmark bookmarks not having all tags in a set (NOT AND) >=09- Toggle showing only marked bookmarks <=09- Toggle showing only unmarked bookmarks - >=09- Omit the marked bookmarks; un-omit them if after `- S' j >=09- Jump to marked bookmarks in other windows C-h >=09- Show info about marked bookmarks (`C-u': internal form) Y > -=09- Move the marked bookmarks to a bookmark file Y > +=09- Copy the marked bookmarks to a bookmark file Y > 0=09- Copy the marked bookmarks to a new bookmark file M-l=09- Load marked bookmark-file bookmarks (extra load) M-R=09- Relocate the marked bookmarks=20 a >=09- Edit annotations of marked bookmarks (`C-u': all) E=09- Edit internal Lisp records of marked bookmarks (`C-u': all) M-X=09- Toggle temporary/savable status of marked bookmarks M-d >=09- Open Dired for marked file & directory bookmarks M-s a C-s=09- Isearch the marked bookmarks (`C-u': all) M-s a C-M-s=09- Regexp-isearch the marked bookmarks (`C-u': all) M-s a M-s=09- Regexp-search the marked file bookmarks (`C-u': all) M-q=09=09- Query-replace the marked file bookmarks T > l=09- List tags used in marked bookmarks (`C-u': show tag values) T > v=09- Set value of a tag, for each marked bookmark (`C-u': all) T > C-y - Add tags copied from a bookmark to those marked (`C-u': all) T > q=09- Replace tags of marked with copied tags (`C-u': all) H > +=09- Set highlighting for marked bookmarks H > H=09- Highlight the marked bookmarks H > U=09- Unhighlight the marked bookmarks s >=09- Sort marked (`>') bookmarks first s D=09- Sort flagged (`D') bookmarks first Here's the `Mark' submenu of the `Bookmark+' menu-bar menu, followed by its `Bookmarks of Type' submenu for marking bookmarks of a specific kind: https://www.emacswiki.org/emacs/BookmarkPlus#MarkMenu