From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex Bochannek Newsgroups: gmane.emacs.bugs Subject: bug#48683: master 16793dc: Add new user option to Gnus to allow `#' to toggle Date: Sat, 05 Jun 2021 17:10:42 -0700 Message-ID: References: <20210602054134.32052.21793@vcs0.savannah.gnu.org> <20210602054135.CA6F2209AA@vcs0.savannah.gnu.org> <87v96vbfb6.fsf@gnus.org> <87sg1xx6p0.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16114"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: Stefan Monnier , 48683@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 06 02:11:12 2021 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 1lpgNk-0003wd-J4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Jun 2021 02:11:12 +0200 Original-Received: from localhost ([::1]:36376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpgNj-0003Go-L9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Jun 2021 20:11:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpgNa-0003Gd-PQ for bug-gnu-emacs@gnu.org; Sat, 05 Jun 2021 20:11:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpgNa-0006P2-IA for bug-gnu-emacs@gnu.org; Sat, 05 Jun 2021 20:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lpgNa-0004tJ-B8 for bug-gnu-emacs@gnu.org; Sat, 05 Jun 2021 20:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Bochannek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Jun 2021 00:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48683 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 48683-submit@debbugs.gnu.org id=B48683.162293824918782 (code B ref 48683); Sun, 06 Jun 2021 00:11:02 +0000 Original-Received: (at 48683) by debbugs.gnu.org; 6 Jun 2021 00:10:49 +0000 Original-Received: from localhost ([127.0.0.1]:50323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpgNM-0004ss-K9 for submit@debbugs.gnu.org; Sat, 05 Jun 2021 20:10:49 -0400 Original-Received: from ns.lapseofthought.com ([50.0.39.240]:1632 helo=mail.lapseofthought.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpgNI-0004sg-Me for 48683@debbugs.gnu.org; Sat, 05 Jun 2021 20:10:47 -0400 Original-Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:a963:78de:b9cb:ea2f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4FyH2p4JZzz3pkcS; Sat, 5 Jun 2021 17:10:42 -0700 (PDT) In-Reply-To: <87sg1xx6p0.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 04 Jun 2021 12:30:51 +0200") Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com 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:208080 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Alex Bochannek writes: > >>> (And it's not just `#' itself, but the commands to mark regions and such >>> that are also affected.) >> >> That shouldn't be the case. In summary, the gnus-uu-mark functions call >> the set/remove process mark functions directly and in group/topic I >> introduced the no-toggle flag to avoid toggling for anything other than >> `#'. > > Ah, OK, then that should be less of a worry... Perhaps we should try to > default it to t on the trunk and see whether anybody complains? Below is the patch to enable it by default. Change the Gnus default to use `#' to toggle the process mark * lisp/gnus/gnus.el (gnus-process-mark-toggle): Change default. * lisp/gnus/gnus-topic.el (gnus-topic-make-menu-bar): Update menu. * lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Update menu. * lisp/gnus/gnus-group.el (gnus-group-make-menu-bar): Update menu. * doc/misc/gnus.texi (Marking Groups, Topic Commands): (Setting Process Marks, Pick and Read): Document the new default. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 11bcfc16ae..0ab2aa5b82 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -2583,27 +2583,28 @@ Marking Groups @itemx M m @kindex M m @r{(Group)} @findex gnus-group-mark-group -Set the mark on the current group (@code{gnus-group-mark-group}).@* -If @code{gnus-process-mark-toggle} is non-@code{nil}, toggle the -existing process mark for the current group. +Toggle the process mark for the current group +(@code{gnus-group-mark-group}).@* +If @code{gnus-process-mark-toggle} is @code{nil}, set the process mark +for the current group. @item M-# @kindex M-# @r{(Group)} @itemx M u @kindex M u @r{(Group)} @findex gnus-group-unmark-group -Remove the mark from the current group +Remove the process mark, if any, from the current group (@code{gnus-group-unmark-group}). @item M U @kindex M U @r{(Group)} @findex gnus-group-unmark-all-groups -Remove the mark from all groups (@code{gnus-group-unmark-all-groups}). +Remove the process mark from all groups (@code{gnus-group-unmark-all-groups}). @item M w @kindex M w @r{(Group)} @findex gnus-group-mark-region -Mark all groups between point and mark (@code{gnus-group-mark-region}). +Mark groups in region (@code{gnus-group-mark-region}). @item M b @kindex M b @r{(Group)} @@ -4043,11 +4044,11 @@ Topic Commands @item T # @kindex T # @r{(Topic)} @findex gnus-topic-mark-topic -Mark all groups in the current topic with the process mark +Toggle the process mark for all groups in the current topic (@code{gnus-topic-mark-topic}). This command works recursively on sub-topics unless given a prefix.@* -If @code{gnus-process-mark-toggle} is non-@code{nil}, toggle the -existing process mark for the current topic. +If @code{gnus-process-mark-toggle} is @code{nil}, set the process mark +for the current topic. @item T M-# @kindex T M-# @r{(Topic)} @@ -6621,10 +6622,10 @@ Setting Process Marks @kindex # @r{(Summary)} @kindex M P p @r{(Summary)} @findex gnus-summary-mark-as-processable -Mark the current article with the process mark +Toggle the process mark for the current article (@code{gnus-summary-mark-as-processable}).@* -If @code{gnus-process-mark-toggle} is non-@code{nil}, toggle the -existing process mark for the current article. +If @code{gnus-process-mark-toggle} is @code{nil}, set the process mark +for the current article. @item M P u @itemx M-# @@ -10568,15 +10569,15 @@ Pick and Read @item . @kindex . @r{(Pick)} @findex gnus-pick-article-or-thread -Pick the article or thread on the current line -(@code{gnus-pick-article-or-thread}). If the variable +Pick the article or thread on the current line or unpick it if is +already picked (@code{gnus-pick-article-or-thread}). If the variable @code{gnus-thread-hide-subtree} is true, then this key selects the entire thread when used at the first article of the thread. Otherwise, it selects just the article. If given a numerical prefix, go to that thread or article and pick it. (The line number is normally displayed at the beginning of the summary pick lines.) If -@code{gnus-process-mark-toggle} is non-@code{nil}, this key will -unpick an already picked article. +@code{gnus-process-mark-toggle} is @code{nil}, this key will pick an +article or thread. @item @key{SPC} @kindex SPC @r{(Pick)} diff --git a/etc/NEWS b/etc/NEWS index 7d53eafbae..e44feff6bb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -871,10 +871,15 @@ tags to be considered as well. ** Gnus ++++ +*** The '#' command in the Group and Summary buffer now toggles, +instead of sets, the process mark. + +++ *** New user option 'gnus-process-mark-toggle'. -If non-nil, the `#' command in the Group and Summary buffers will -toggle instead of setting the process mark. +If non-nil (the default), the `#' command in the Group and Summary +buffers will toggle, instead of set, the process mark. + +++ *** New user option 'gnus-registry-register-all'. diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 06d1313d37..c8b95d9185 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -894,7 +894,7 @@ gnus-group-make-menu-bar ["Sort by real name" gnus-group-sort-selected-groups-by-real-name (not (gnus-topic-mode-p))]) ("Mark" - ["Set/Toggle mark" gnus-group-mark-group + ["Toggle/Set mark" gnus-group-mark-group (and (gnus-group-group-name) (not (memq (gnus-group-group-name) gnus-group-marked)))] ["Remove mark" gnus-group-unmark-group diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 3279c3221e..bcd76dda29 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -2774,7 +2774,7 @@ gnus-summary-make-menu-bar ["Hide marked" gnus-summary-limit-exclude-marks t] ["Show expunged" gnus-summary-limit-include-expunged t]) ("Process Mark" - ["Set/Toggle mark" gnus-summary-mark-as-processable t] + ["Toggle/Set mark" gnus-summary-mark-as-processable t] ["Remove mark" gnus-summary-unmark-as-processable t] ["Remove all marks" gnus-summary-unmark-all-processable t] ["Invert marks" gnus-uu-invert-processable t] diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index c0484622f4..b974dff372 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -1112,7 +1112,7 @@ gnus-topic-make-menu-bar ["Delete" gnus-topic-delete t] ["Rename..." gnus-topic-rename t] ["Create..." gnus-topic-create-topic t] - ["Set/Toggle mark" gnus-topic-mark-topic t] + ["Toggle/Set mark" gnus-topic-mark-topic t] ["Indent" gnus-topic-indent t] ["Sort" gnus-topic-sort-topics t] ["Previous topic" gnus-topic-goto-previous-topic t] diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 21b5f31c14..7dde799a5b 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -1183,8 +1183,8 @@ gnus-process-mark :group 'gnus-summary-marks :type 'character) -(defcustom gnus-process-mark-toggle nil - "If non-nil the process mark command toggles the process mark." +(defcustom gnus-process-mark-toggle t + "If nil the process mark command only sets the process mark." :version "28.1" :group 'gnus-summary :group 'gnus-group-various --=-=-= Content-Type: text/plain -- Alex. --=-=-=--