From: Eli Zaretskii <eliz@gnu.org>
To: "Francesco Potortì" <pot@gnu.org>
Cc: 46325@debbugs.gnu.org
Subject: bug#46325: 27.1; C-d in an rmail summary does not work on the first message
Date: Fri, 05 Feb 2021 15:17:44 +0200 [thread overview]
Message-ID: <83ft2apsav.fsf@gnu.org> (raw)
In-Reply-To: <E1l7zmb-0074ZM-8n@tucano.isti.cnr.it> (message from Francesco Potortì on Fri, 05 Feb 2021 13:00:17 +0100)
> From: Francesco Potortì <pot@gnu.org>
> Date: Fri, 05 Feb 2021 13:00:17 +0100
>
> C-u M-x rmail RET some-mbox-format-mail-file # load a file in rmail
> < # go to the first message
> h # create a directory
> C-d # delete the current message
>
> Since this is the first message, C-d should delete it, display a message
> saying that there are no previous messages and stay on the deleted
> message. Instead, it does (apparently) nothing and stays on the
> (undeleted) message.
Thanks.
Rmail summary commands never display a message about no next/previous
undeleted message, only Rmail commands do.
But the main problem -- that C-d doesn't delete the current message --
is indeed a bug, which was introduced while trying to optimize
deletion of many messages. Does the patch below fix the bug with
deletion?
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 7f99ecd..f53e6e7 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -930,10 +930,11 @@ rmail-summary-delete-forward
(unless (numberp count) (setq count 1))
(let (del-msg
(backward (< count 0)))
- (while (and (/= count 0)
- ;; Don't waste time if we are at the beginning
- ;; and trying to go backward.
- (not (and backward (bobp))))
+ (while (/= count 0)
+ ;; Don't waste time counting down without doing anything if we
+ ;; are at the beginning and trying to go backward.
+ (if (and backward (bobp))
+ (setq count -1))
(rmail-summary-goto-msg)
(with-current-buffer rmail-buffer
(setq del-msg rmail-current-message)
next prev parent reply other threads:[~2021-02-05 13:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 12:00 bug#46325: 27.1; C-d in an rmail summary does not work on the first message Francesco Potortì
2021-02-05 13:17 ` Eli Zaretskii [this message]
2021-02-05 13:30 ` Francesco Potortì
2021-02-05 14:29 ` Eli Zaretskii
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=83ft2apsav.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=46325@debbugs.gnu.org \
--cc=pot@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).