GNU bug report logs - #17560
24.4.50; wrong type argument if rmail-delete-after-output set

Previous Next

Package: emacs;

Reported by: Ken Olum <kdo <at> cosmos.phy.tufts.edu>

Date: Fri, 23 May 2014 15:03:01 UTC

Severity: normal

Found in version 24.4.50

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 17560 in the body.
You can then email your comments to 17560 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#17560; Package emacs. (Fri, 23 May 2014 15:03:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ken Olum <kdo <at> cosmos.phy.tufts.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 23 May 2014 15:03:02 GMT) Full text and rfc822 format available.

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

From: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; wrong type argument if rmail-delete-after-output set
Date: Fri, 23 May 2014 11:02:18 -0400
Under a recent change, rmail-delete-forward takes an optional repeat
count.  If not specified, the count defaults to nil, giving an error.
This function is called with no arguments in several places including
rmail-output (if rmail-delete-after-output is set).


emacs -Q
M-X rmail
set rmail-delete-after-output to t
press "o"
Give output filename
Get error: Wrong type argument: number-or-marker-p, nil

In GNU Emacs 24.4.50.2 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
 of 2014-05-22 on cosmos
Repository revision: 117139 eggert <at> cs.ucla.edu-20140522164035-y1m18x4smoxvgy58
Windowing system distributor `The Cygwin/X Project', version 11.0.10903000
System Description:	Ubuntu 12.04.4 LTS

Configured features:
XPM JPEG TIFF GIF PNG SOUND NOTIFY LIBXML2 FREETYPE XFT ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p o r t - b u g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
delete-backward-char: Text is read-only

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils time-date tooltip
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer 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 make-network-process
inotify dynamic-setting font-render-setting x-toolkit x multi-tty emacs)

Memory information:
((conses 16 75357 6383)
 (symbols 48 17734 0)
 (miscs 40 37 152)
 (strings 32 11042 3962)
 (string-bytes 1 287633)
 (vectors 16 9192)
 (vector-slots 8 374109 11495)
 (floats 8 68 264)
 (intervals 56 190 4)
 (buffers 960 11)
 (heap 1024 38120 1325))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17560; Package emacs. (Fri, 23 May 2014 15:32:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
Cc: 17560 <at> debbugs.gnu.org
Subject: Re: bug#17560: 24.4.50;
 wrong type argument if rmail-delete-after-output set
Date: Fri, 23 May 2014 18:31:37 +0300
> From: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
> Date: Fri, 23 May 2014 11:02:18 -0400
> 
> Under a recent change, rmail-delete-forward takes an optional repeat
> count.  If not specified, the count defaults to nil, giving an error.
> This function is called with no arguments in several places including
> rmail-output (if rmail-delete-after-output is set).

Could you perhaps suggest a patch to fix this?  TIA.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17560; Package emacs. (Fri, 23 May 2014 15:52:02 GMT) Full text and rfc822 format available.

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

From: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 17560 <at> debbugs.gnu.org
Subject: Re: bug#17560: 24.4.50;
 wrong type argument if rmail-delete-after-output set
Date: Fri, 23 May 2014 11:50:59 -0400
I'd put

(if (not count) (setq count 1))

in rmail-delete-forward and for consistency make the argument of
rmail-delete-backward optional and add the same code there.

Unfortunately, that is not consistent with rmail-next-message, for
example.  The alternative would be to make the argument not optional and
change all callers to say (rmail-delete-forward 1).  Unfortunately, in
previous versions of emacs this would mean to move backward, so new
calls would be incompatible with the old definition, which I think
argues against this plan.

                                        Ken




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17560; Package emacs. (Fri, 23 May 2014 17:38:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
Cc: 17560 <at> debbugs.gnu.org
Subject: Re: bug#17560: 24.4.50;
 wrong type argument if rmail-delete-after-output set
Date: Fri, 23 May 2014 20:37:48 +0300
> From: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
> Cc: 17560 <at> debbugs.gnu.org
> Date: Fri, 23 May 2014 11:50:59 -0400
> 
> I'd put
> 
> (if (not count) (setq count 1))
> 
> in rmail-delete-forward and for consistency make the argument of
> rmail-delete-backward optional and add the same code there.
> 
> Unfortunately, that is not consistent with rmail-next-message, for
> example.  The alternative would be to make the argument not optional and
> change all callers to say (rmail-delete-forward 1).

The alternative is what I had in mind, yes.

> Unfortunately, in previous versions of emacs this would mean to move
> backward, so new calls would be incompatible with the old
> definition, which I think argues against this plan.

I don't think this problem should bother us, as the change in
rmail-delete-forward is backward-incompatible anyway.  Which reminds
me: could you also make a suitable entry in NEWS?

TIA




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17560; Package emacs. (Fri, 23 May 2014 18:49:02 GMT) Full text and rfc822 format available.

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

From: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 17560 <at> debbugs.gnu.org
Subject: Re: bug#17560: 24.4.50;
 wrong type argument if rmail-delete-after-output set
Date: Fri, 23 May 2014 14:48:25 -0400
[Message part 1 (text/plain, inline)]
OK.  Here is a patch, including NEWS and ChangeLog entries.  I made the
argument to rmail-delete-forward not optional, and fixed callers.

                                        Ken

[rmail-delete.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17560; Package emacs. (Fri, 23 May 2014 19:54:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
Cc: 17560 <at> debbugs.gnu.org
Subject: Re: bug#17560: 24.4.50;
 wrong type argument if rmail-delete-after-output set
Date: Fri, 23 May 2014 22:53:14 +0300
> From: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
> Cc: 17560 <at> debbugs.gnu.org
> Date: Fri, 23 May 2014 14:48:25 -0400
> 
> OK.  Here is a patch, including NEWS and ChangeLog entries.  I made the
> argument to rmail-delete-forward not optional, and fixed callers.

Thanks.

But on second thought, what exactly was wrong with making nil mean 1?
What did you mean by "not consistent with rmail-next-message"?

Sorry for not asking that earlier.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17560; Package emacs. (Fri, 23 May 2014 20:06:01 GMT) Full text and rfc822 format available.

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

From: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 17560 <at> debbugs.gnu.org
Subject: Re: bug#17560: 24.4.50;
 wrong type argument if rmail-delete-after-output set
Date: Fri, 23 May 2014 16:04:56 -0400
What I meant was that you cannot say (rmail-next-message) to go forward
one message.  You have to say (rmail-next-message 1).  So I wasn't sure
whether it would be a good idea to allow (rmail-delete-forward) to
default to deleting one message.

On the other hand, I now see that rmail-search has a repeat count that
is optional.

                                        Ken




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17560; Package emacs. (Sat, 24 May 2014 06:55:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
Cc: 17560 <at> debbugs.gnu.org
Subject: Re: bug#17560: 24.4.50;
 wrong type argument if rmail-delete-after-output set
Date: Sat, 24 May 2014 09:54:51 +0300
> From: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
> Cc: 17560 <at> debbugs.gnu.org
> Date: Fri, 23 May 2014 16:04:56 -0400
> 
> What I meant was that you cannot say (rmail-next-message) to go forward
> one message.  You have to say (rmail-next-message 1).  So I wasn't sure
> whether it would be a good idea to allow (rmail-delete-forward) to
> default to deleting one message.
> 
> On the other hand, I now see that rmail-search has a repeat count that
> is optional.

I see.  So that was my misunderstanding, and it is better to go with
your first alternative, since it is backward-compatible, and requires
less changes.

Again, sorry for not bringing this up earlier.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17560; Package emacs. (Tue, 27 May 2014 15:09:02 GMT) Full text and rfc822 format available.

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

From: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 17560 <at> debbugs.gnu.org
Subject: Re: bug#17560: 24.4.50;
 wrong type argument if rmail-delete-after-output set
Date: Tue, 27 May 2014 11:08:06 -0400
[Message part 1 (text/plain, inline)]
OK.  Here is a different patch making the arguments to
rmail-delete-forward and rmail-delete-backward optional and defaulting
to 1.  NEWS and ChangeLog are included.

                                        Ken

[rmail-delete.patch (text/x-diff, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 30 May 2014 09:36:02 GMT) Full text and rfc822 format available.

Notification sent to Ken Olum <kdo <at> cosmos.phy.tufts.edu>:
bug acknowledged by developer. (Fri, 30 May 2014 09:36:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
Cc: 17560-done <at> debbugs.gnu.org
Subject: Re: bug#17560: 24.4.50;
 wrong type argument if rmail-delete-after-output set
Date: Fri, 30 May 2014 12:35:20 +0300
> From: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
> Cc: 17560 <at> debbugs.gnu.org
> Date: Tue, 27 May 2014 11:08:06 -0400
> 
> OK.  Here is a different patch making the arguments to
> rmail-delete-forward and rmail-delete-backward optional and defaulting
> to 1.  NEWS and ChangeLog are included.

Thanks, committed as trunk revision 117204.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 27 Jun 2014 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 304 days ago.

Previous Next


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