GNU bug report logs - #39076
26.3; rmail-summary-mark-deleted error with no arguments (or nil)

Previous Next

Package: emacs;

Reported by: Ed Sabol <esabol <at> milkyway.gsfc.nasa.gov>

Date: Fri, 10 Jan 2020 21:31:02 UTC

Severity: minor

Tags: fixed

Found in version 26.3

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.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 39076 in the body.
You can then email your comments to 39076 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#39076; Package emacs. (Fri, 10 Jan 2020 21:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ed Sabol <esabol <at> milkyway.gsfc.nasa.gov>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 10 Jan 2020 21:31:02 GMT) Full text and rfc822 format available.

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

From: Ed Sabol <edward.j.sabol <at> nasa.gov>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; rmail-summary-mark-deleted error with no arguments (or nil)
Date: Fri, 10 Jan 2020 16:30:15 -0500 (EST)
rmail-summary-mark-deleted is defined like so:

(defun rmail-summary-mark-deleted (&optional n undel) ...)

As you can see, n and undel are supposed to be optional arguments. However,
if I call

rmail-summary-mark-deleted with no arguments (or a nil argument), I get the
following lisp error:

(wrong-type-argument number-or-marker-p nil)

as shown in this backtrace:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  rmail-summary-mark-deleted(nil)
  rmail-summary-delete-forward(-1)
  rmail-summary-delete-backward(1)
  funcall-interactively(rmail-summary-delete-backward 1)
  call-interactively(rmail-summary-delete-backward nil nil)
  command-execute(rmail-summary-delete-backward)

The issue is that rmail-summary-mark-deleted evaluates (1- n) which causes
the error when n is nil.

However, this is really a symptom of another issue I'm seeing. Immediately
after I hit "g" to get new mail in some rmail-summary buffer,
rmail-current-message is sometimes nil until I move to another message, but I
haven't tracked down yet why that's happening and I haven't been able to
reproduce it with `emacs -Q'....

That said, I *can* reproduce the error with (rmail-summary-mark-deleted) with
`emacs -Q'. It is easiest to do with an email whose "Subject:" header is
"(rmail-summary-mark-deleted)". Then, in the rmail-summary buffer, go to the
message with that subject, move point to just after the close paren in
"(rmail-summary-mark-deleted)", and hit C-x C-e to evaluate the expression in
the rmail-summary buffer.


In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, X toolkit)
 of 2019-11-19 built on heasarcdev
Windowing system distributor 'Scientific Linux', version 11.0.11704000
System Description:	Scientific Linux release 6.10 (Carbon)

Recent messages:
Quit
/software/usr/contrib/share/emacs/26.3/lisp/mail/rmail.el.gz and /usr/contrib/share/emacs/26.3/lisp/mail/rmail.el.gz are the same file
Mark saved where search started [2 times]
Making completion list...
completing-read-default: Command attempted to use minibuffer while in minibuffer
Quit [3 times]
next-line: End of buffer
Quit
next-line: End of buffer
Region copied to kill buffer.

Configured using:
 'configure --prefix=/software/usr/contrib
 --exec-prefix=/software/usr/contrib/linux-6.x --with-x-toolkit=lucid
 --with-xft=yes --with-toolkit-scroll-bars=no --with-gif=no --with-tiff=no
 --with-gnutls=no'

Configured features:
XAW3D XPM JPEG PNG SOUND GSETTINGS GLIB NOTIFY LIBSELINUX LIBXML2 FREETYPE
XFT ZLIB LUCID X11 XDBE XIM THREADS

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  t: t
  show-paren-mode: t
  diff-auto-refine-mode: t
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-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
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/software/usr/contrib/share/emacs/26.x/site-lisp/dockerfile-mode hides /Home/lhea2/sabol/.emacs.d/elpa/dockerfile-mode-1.2/dockerfile-mode
/software/usr/contrib/share/emacs/26.x/site-lisp/perlcritic hides /software/usr/contrib/share/emacs/site-lisp/perlcritic
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-region hides /software/usr/contrib/share/emacs/site-lisp/mmm-region
/software/usr/contrib/share/emacs/26.x/site-lisp/tidy hides /software/usr/contrib/share/emacs/site-lisp/tidy
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-vars hides /software/usr/contrib/share/emacs/site-lisp/mmm-vars
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-noweb hides /software/usr/contrib/share/emacs/site-lisp/mmm-noweb
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-utils hides /software/usr/contrib/share/emacs/site-lisp/mmm-utils
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-cweb hides /software/usr/contrib/share/emacs/site-lisp/mmm-cweb
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-univ hides /software/usr/contrib/share/emacs/site-lisp/mmm-univ
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-rpm hides /software/usr/contrib/share/emacs/site-lisp/mmm-rpm
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-mason hides /software/usr/contrib/share/emacs/site-lisp/mmm-mason
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-sample hides /software/usr/contrib/share/emacs/site-lisp/mmm-sample
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-mode hides /software/usr/contrib/share/emacs/site-lisp/mmm-mode
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-cmds hides /software/usr/contrib/share/emacs/site-lisp/mmm-cmds
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-class hides /software/usr/contrib/share/emacs/site-lisp/mmm-class
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-compat hides /software/usr/contrib/share/emacs/site-lisp/mmm-compat
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-auto hides /software/usr/contrib/share/emacs/site-lisp/mmm-auto
/software/usr/contrib/share/emacs/26.x/site-lisp/mode-compile hides /software/usr/contrib/share/emacs/site-lisp/mode-compile
/software/usr/contrib/share/emacs/26.x/site-lisp/heasarc-info-mode hides /software/usr/contrib/share/emacs/site-lisp/heasarc-info-mode
/software/usr/contrib/share/emacs/26.x/site-lisp/simple-vc hides /software/usr/contrib/share/emacs/site-lisp/simple-vc
/software/usr/contrib/share/emacs/site-lisp/css-mode hides /software/usr/contrib/share/emacs/26.3/lisp/textmodes/css-mode
/software/usr/contrib/share/emacs/site-lisp/flymake hides /software/usr/contrib/share/emacs/26.3/lisp/progmodes/flymake

Features:
(shadow emacsbug find-func debug rect shr-color color xref project url-util
ispell rmailedit timezone supercite regi shr svg xml dom browse-url rmailout
cl-extra cl-print thingatpt help-fns radix-tree help-mode ediff-merg
ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff
jka-compr mailalias mail-hist sendmail misearch multi-isearch pp qp rmailsum
rmailmm elec-pair paren psvn wid-edit cl log-edit message rmc puny
format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mailabbrev mail-utils gmm-utils mailheader ring add-log diff-mode executable
mmm-auto mmm-vars mmm-utils mmm-compat imenu mm-util mail-prsvr time advice
server restart-session dired dired-loaddefs pcvs vc-cvs pcvs-parse pcvs-info
pcvs-defs easy-mmode pcvs-util ewoc finder-inf package easymenu epg-config
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile
cconv cl-loaddefs cl-lib time-date mule-util tooltip 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 menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core term/tty-colors frame 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 minibuffer 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
inotify dynamic-setting font-render-setting x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 501193 84028)
 (symbols 48 31333 1)
 (miscs 40 23052 4155)
 (strings 32 138700 11898)
 (string-bytes 1 5254271)
 (vectors 16 37509)
 (vector-slots 8 1831771 190318)
 (floats 8 356 385)
 (intervals 56 25000 1411)
 (buffers 992 56)
 (heap 1024 104355 6082))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39076; Package emacs. (Fri, 10 Jan 2020 22:14:02 GMT) Full text and rfc822 format available.

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

From: "Edward J. Sabol" <edward.j.sabol <at> nasa.gov>
To: 39076 <at> debbugs.gnu.org
Subject: Re: bug#39076: Acknowledgement (26.3; rmail-summary-mark-deleted
 error with no arguments (or nil))
Date: Fri, 10 Jan 2020 17:13:25 -0500 (EST)
> However, this is really a symptom of another issue I'm seeing. Immediately
> after I hit "g" to get new mail in some rmail-summary buffer,
> rmail-current-message is sometimes nil until I move to another message, but I
> haven't tracked down yet why that's happening and I haven't been able to
> reproduce it with `emacs -Q'....

Ah ha! I was able to fix this quasi-related issue with rmail-current-message
sometimes being nil right after calling `rmail-summary-get-new'-mail by
changing:

	       (with-current-buffer rmail-buffer
		 (rmail-get-new-mail file-name)
		 ;; Get the proper new message number.
		 (setq msg rmail-current-message))

to:

	       (with-current-buffer rmail-buffer
		 (rmail-get-new-mail file-name)
		 ;; Get the proper new message number.
		 (rmail-maybe-set-message-counters)
		 (setq msg rmail-current-message))

in `rmail-summary-get-new-mail'. Adding "(rmail-maybe-set-message-counters)"
there seems to have fixed the issue I was seeing. Not sure why this is needed
though since `rmail-get-new-mail' already calls
`rmail-maybe-set-message-counters', although it does so near the beginning of
that function.

I hope this makes sense and is useful information.

Regards,
Ed




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39076; Package emacs. (Fri, 29 Jan 2021 07:36:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ed Sabol <edward.j.sabol <at> nasa.gov>
Cc: Ed Sabol <esabol <at> milkyway.gsfc.nasa.gov>, 39076 <at> debbugs.gnu.org
Subject: Re: bug#39076: 26.3; rmail-summary-mark-deleted error with no
 arguments (or nil)
Date: Fri, 29 Jan 2021 08:35:09 +0100
Ed Sabol <edward.j.sabol <at> nasa.gov> writes:

> That said, I *can* reproduce the error with (rmail-summary-mark-deleted) with
> `emacs -Q'. It is easiest to do with an email whose "Subject:" header is
> "(rmail-summary-mark-deleted)". Then, in the rmail-summary buffer, go to the
> message with that subject, move point to just after the close paren in
> "(rmail-summary-mark-deleted)", and hit C-x C-e to evaluate the expression in
> the rmail-summary buffer.

This should now be fixed in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 29 Jan 2021 07:36:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 39076 <at> debbugs.gnu.org and Ed Sabol <esabol <at> milkyway.gsfc.nasa.gov> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 29 Jan 2021 07:36:02 GMT) Full text and rfc822 format available.

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

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

Previous Next


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