GNU bug report logs - #46325
27.1; C-d in an rmail summary does not work on the first message

Previous Next

Package: emacs;

Reported by: Francesco Potortì <pot <at> gnu.org>

Date: Fri, 5 Feb 2021 12:01:02 UTC

Severity: normal

Found in version 27.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46325 in the body.
You can then email your comments to 46325 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#46325; Package emacs. (Fri, 05 Feb 2021 12:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Francesco Potortì <pot <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 05 Feb 2021 12:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Francesco Potortì <pot <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; C-d in an rmail summary does not work on the first message
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.

In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2020-12-05, modified by Debian built on tucano.isti.cnr.it
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: Debian GNU/Linux bullseye/sid

Recent messages:
Loading /usr/share/emacs/27.1/lisp/mail/rmailout.elc...done
Load: 1 file.
Computing summary lines...done
Added to /tmp/a
Mark set
Saving file /home/pot/doc/todo...
Wrote /home/pot/doc/todo
Computing summary lines...done
Mark set
No previous nondeleted message

Configured using:
 'configure --build x86_64-linux-gnu --enable-checking=yes,glyphs
 --enable-check-lisp-object-type --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
 --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --build
 x86_64-linux-gnu --enable-checking=yes,glyphs
 --enable-check-lisp-object-type --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
 --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --with-x=yes
 --with-x-toolkit=lucid --with-toolkit-scroll-bars --without-gsettings
 'CFLAGS=-g -O0
 -fdebug-prefix-map=/home/pot/gnu/emacs-27.1+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall -Og -ggdb -g3'
 CPPFLAGS=-Wdate-time LDFLAGS=-Wl,-z,relro'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GLIB NOTIFY INOTIFY ACL
LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
PDUMPER LCMS2 GMP

Important settings:
  value of $LC_COLLATE: it_IT.UTF-8
  value of $LC_CTYPE: it_IT.UTF-8
  value of $LC_NUMERIC: C
  value of $LANG: C.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Text

Minor modes in effect:
  filladapt-mode: t
  csv-field-index-mode: t
  desktop-save-mode: t
  epa-global-mail-mode: t
  shell-dirtrack-mode: t
  openwith-mode: t
  xterm-mouse-mode: t
  display-time-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t

Load-path shadows:
~/elisp/bhl hides /usr/share/emacs/site-lisp/bhl
/usr/share/emacs/site-lisp/elpa/debian-el-37/debian-autoloads hides /usr/share/emacs/site-lisp/elpa/gnuplot-mode-20141231/debian-autoloads
/usr/share/emacs/site-lisp/elpa/csv-mode-1.12/csv-mode-pkg hides /usr/share/emacs/site-lisp/elpa-src/csv-mode-1.12/csv-mode-pkg
/usr/share/emacs/site-lisp/elpa/csv-mode-1.12/csv-mode hides /usr/share/emacs/site-lisp/elpa-src/csv-mode-1.12/csv-mode
/usr/share/emacs/site-lisp/elpa/csv-mode-1.12/csv-mode-tests hides /usr/share/emacs/site-lisp/elpa-src/csv-mode-1.12/csv-mode-tests
/usr/share/emacs/site-lisp/elpa/csv-mode-1.12/csv-mode-autoloads hides /usr/share/emacs/site-lisp/elpa-src/csv-mode-1.12/csv-mode-autoloads
/usr/share/emacs/site-lisp/elpa/debian-el-37/debian-el hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/debian-el
/usr/share/emacs/site-lisp/elpa/debian-el-37/gnus-BTS hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/gnus-BTS
/usr/share/emacs/site-lisp/elpa/debian-el-37/preseed hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/preseed
/usr/share/emacs/site-lisp/elpa/debian-el-37/deb-view hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/deb-view
/usr/share/emacs/site-lisp/elpa/debian-el-37/debian-el-autoloads hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/debian-el-autoloads
/usr/share/emacs/site-lisp/elpa/debian-el-37/apt-utils hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/apt-utils
/usr/share/emacs/site-lisp/elpa/debian-el-37/debian-bug hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/debian-bug
/usr/share/emacs/site-lisp/elpa/debian-el-37/debian-el-pkg hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/debian-el-pkg
/usr/share/emacs/site-lisp/elpa/debian-el-37/apt-sources hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/apt-sources
/usr/share/emacs/site-lisp/elpa/debian-el-37/debian-autoloads hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/debian-autoloads
/usr/share/emacs/site-lisp/elpa/dictionary-1.10/dictionary hides /usr/share/emacs/site-lisp/elpa-src/dictionary-1.10/dictionary
/usr/share/emacs/site-lisp/elpa/dictionary-1.10/link hides /usr/share/emacs/site-lisp/elpa-src/dictionary-1.10/link
/usr/share/emacs/site-lisp/elpa/dictionary-1.10/dictionary-pkg hides /usr/share/emacs/site-lisp/elpa-src/dictionary-1.10/dictionary-pkg
/usr/share/emacs/site-lisp/elpa/dictionary-1.10/dictionary-autoloads hides /usr/share/emacs/site-lisp/elpa-src/dictionary-1.10/dictionary-autoloads
/usr/share/emacs/site-lisp/elpa/dictionary-1.10/connection hides /usr/share/emacs/site-lisp/elpa-src/dictionary-1.10/connection
/usr/share/emacs/site-lisp/elpa/gnuplot-mode-20141231/gnuplot hides /usr/share/emacs/site-lisp/elpa-src/gnuplot-mode-20141231/gnuplot
/usr/share/emacs/site-lisp/elpa/gnuplot-mode-20141231/gnuplot-mode-pkg hides /usr/share/emacs/site-lisp/elpa-src/gnuplot-mode-20141231/gnuplot-mode-pkg
/usr/share/emacs/site-lisp/elpa/debian-el-37/debian-autoloads hides /usr/share/emacs/site-lisp/elpa-src/gnuplot-mode-20141231/debian-autoloads
/usr/share/emacs/site-lisp/elpa/gnuplot-mode-20141231/gnuplot-context hides /usr/share/emacs/site-lisp/elpa-src/gnuplot-mode-20141231/gnuplot-context
/usr/share/emacs/site-lisp/elpa/gnuplot-mode-20141231/gnuplot-gui hides /usr/share/emacs/site-lisp/elpa-src/gnuplot-mode-20141231/gnuplot-gui
/usr/share/emacs/site-lisp/elpa/gnuplot-mode-20141231/gnuplot-mode-autoloads hides /usr/share/emacs/site-lisp/elpa-src/gnuplot-mode-20141231/gnuplot-mode-autoloads
/usr/share/emacs/site-lisp/elpa/markdown-mode-2.4/markdown-mode-autoloads hides /usr/share/emacs/site-lisp/elpa-src/markdown-mode-2.4/markdown-mode-autoloads
/usr/share/emacs/site-lisp/elpa/markdown-mode-2.4/markdown-mode hides /usr/share/emacs/site-lisp/elpa-src/markdown-mode-2.4/markdown-mode
/usr/share/emacs/site-lisp/elpa/markdown-mode-2.4/markdown-mode-pkg hides /usr/share/emacs/site-lisp/elpa-src/markdown-mode-2.4/markdown-mode-pkg
~/elisp/bibtex hides /usr/share/emacs/27.1/lisp/textmodes/bibtex
~/elisp/octave hides /usr/share/emacs/27.1/lisp/progmodes/octave
/usr/share/emacs/site-lisp/flim/sasl hides /usr/share/emacs/27.1/lisp/net/sasl
~/elisp/rmailout hides /usr/share/emacs/27.1/lisp/mail/rmailout

Features:
(face-remap char-fold etags fileloop generator novice pcmpl-linux
emacsbug octet mime eword-decode mel path-util mime-def mcs-e20 mcs-20
mcharset std11 pccl pccl-20 broken luna alist pces pces-e20 pces-20 pym
static poe apel-ver product loadhist debian-bug apt-sources pcmpl-unix
arc-mode archive-mode undigest latexenc find-dired xref project nnmail
gnus-int gnus-range mail-source shadow reporter apropos gnutls
network-stream url-cache tramp-cmds tramp-cache tramp-sh tramp-archive
tramp-gvfs zeroconf dbus deb-view csv-mode descr-text vc-mtn vc-hg
vc-bzr vc-src vc-sccs vc-cvs cal-move cal-x repeat calc-aent ispell
calccomp calc-vec calc-map calc-alg calc-menu calc-yank calc-ext calc
calc-loaddefs calc-macs two-column iso-transl rmailedit url-http
url-auth url-gw nsm macros unrmail mail-extr edmacro kmacro grep wdired
tabify markdown-mode rx ibuf-ext ibuffer ibuffer-loaddefs lpr debug
backtrace rect dabbrev mode-local log-edit pcvs-util add-log ediff
ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init
ediff-util pp vc-annotate vc-dir ewoc smerge-mode diff cus-edit cus-load
vc sort eieio-opt speedbar sb-image ezimage dframe find-func cl-print
help-fns radix-tree misearch multi-isearch shr-color rmailsort rmailkwd
rmailout mailalias w3m-filter w3m-form w3m-cookie w3m-bookmark
w3m-tabmenu w3m-session w3m doc-view image-mode exif timezone w3m-hist
w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc
w3m-util time-stamp cl-extra noutline outline jka-compr make-mode gud
dired-aux bibtex vc-git diff-mode easy-mmode generic conf-mode sh-script
executable vc-dispatcher vc-svn vc-filewise vc-rcs octave skeleton
texinfo pcase tex-mode compile mhtml-mode css-mode smie eww mm-url gnus
nnheader wid-edit url-queue url url-proxy url-privacy url-expand
url-methods url-history mailcap shr url-cookie url-domsuf url-util svg
xml color js imenu sgml-mode dom bug-reference cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs qp rmailmm
message rmc puny rfc822 mml mml-sec gnus-util text-property-search
mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader mail-parse
rfc2231 desktop frameset cal-julian solar cal-dst pot warnings rmailsum
rmail rmail-loaddefs sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr epa-mail mail-utils epa derived epg epg-config view mule-util
holidays hol-loaddefs appt diary-lib diary-loaddefs cal-menu calendar
cal-loaddefs tramp tramp-loaddefs trampver tramp-integration files-x
tramp-compat shell pcomplete comint ring parse-time iso8601 time-date
ls-lisp format-spec bhl visual-fill-column switch-to-shell openwith
hi-lock anything-config anything advice woman man cl locate xt-mouse
ffap thingatpt scroll-in-place filladapt ansi-color time quail help-mode
dired-x dired dired-loaddefs generic-x disp-table finder-inf w3m-load
info debian-el package easymenu browse-url url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib tooltip cus-start eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
font-render-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 1912200 2083037)
 (symbols 48 62135 99)
 (strings 32 376876 343967)
 (string-bytes 1 9017790)
 (vectors 16 83960)
 (vector-slots 8 2275681 159488)
 (floats 8 974 696)
 (intervals 56 421890 130480)
 (buffers 1000 227))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46325; Package emacs. (Fri, 05 Feb 2021 13:18:02 GMT) Full text and rfc822 format available.

Message #8 received at 46325 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Francesco Potortì <pot <at> gnu.org>
Cc: 46325 <at> debbugs.gnu.org
Subject: Re: 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
> From: Francesco Potortì <pot <at> 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)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46325; Package emacs. (Fri, 05 Feb 2021 13:31:02 GMT) Full text and rfc822 format available.

Message #11 received at 46325 <at> debbugs.gnu.org (full text, mbox):

From: Francesco Potortì <pot <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 46325 <at> debbugs.gnu.org
Subject: Re: bug#46325: 27.1;
 C-d in an rmail summary does not work on the first message
Date: Fri, 05 Feb 2021 14:30:24 +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?

I cannot reproduce the bug with the patch installed.

Thanks




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 05 Feb 2021 14:30:02 GMT) Full text and rfc822 format available.

Notification sent to Francesco Potortì <pot <at> gnu.org>:
bug acknowledged by developer. (Fri, 05 Feb 2021 14:30:03 GMT) Full text and rfc822 format available.

Message #16 received at 46325-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Francesco Potortì <pot <at> gnu.org>
Cc: 46325-done <at> debbugs.gnu.org
Subject: Re: bug#46325: 27.1;
 C-d in an rmail summary does not work on the first message
Date: Fri, 05 Feb 2021 16:29:20 +0200
> From: Francesco Potortì <pot <at> gnu.org>
> Date: Fri, 05 Feb 2021 14:30:24 +0100
> Cc: 46325 <at> debbugs.gnu.org
> 
> >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?
> 
> I cannot reproduce the bug with the patch installed.

Thanks, installed on the master branch.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 06 Mar 2021 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 51 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.