From: Alex Bochannek <alex@bochannek.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 48683@debbugs.gnu.org
Subject: bug#48683: master 16793dc: Add new user option to Gnus to allow `#' to toggle
Date: Sat, 05 Jun 2021 17:10:42 -0700 [thread overview]
Message-ID: <m2bl8jq2d9.fsf@bochannek.com> (raw)
In-Reply-To: <87sg1xx6p0.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 04 Jun 2021 12:30:51 +0200")
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Alex Bochannek <alex@bochannek.com> 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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 6161 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 10 bytes --]
--
Alex.
next parent reply other threads:[~2021-06-06 0:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210602054134.32052.21793@vcs0.savannah.gnu.org>
[not found] ` <20210602054135.CA6F2209AA@vcs0.savannah.gnu.org>
[not found] ` <jwv1r9ke3ya.fsf-monnier+emacs@gnu.org>
[not found] ` <87v96vbfb6.fsf@gnus.org>
[not found] ` <m2wnrayfxz.fsf@bochannek.com>
[not found] ` <87sg1xx6p0.fsf@gnus.org>
2021-06-06 0:10 ` Alex Bochannek [this message]
2021-06-08 11:34 ` bug#48683: master 16793dc: Add new user option to Gnus to allow `#' to toggle 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=m2bl8jq2d9.fsf@bochannek.com \
--to=alex@bochannek.com \
--cc=48683@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
/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).