GNU bug report logs - #29842
27.0; `dired-change-marks': args should not be optional

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 24 Dec 2017 17:59:01 UTC

Severity: minor

Found in version 27.0

Fixed in version 28.1

Done: Stefan Kangas <stefan <at> marxist.se>

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 29842 in the body.
You can then email your comments to 29842 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#29842; Package emacs. (Sun, 24 Dec 2017 17:59:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 24 Dec 2017 17:59:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0; `dired-change-marks': args should not be optional
Date: Sun, 24 Dec 2017 09:58:02 -0800 (PST)
1. There is no use of this function in the Emacs Lisp sources that needs
   to have the args be optional.

2. If (dired-change-marks) is evaluated then you get an error:

   Debugger entered--Lisp error: (error "Format specifier doesn't match
                                         argument type") 
    format("\n%c" "nil")
    dired-change-marks()
    eval((dired-change-marks))

This bug is apparently quite old - it is present in Emacs 20, for
example.

In GNU Emacs 27.0.50 (build 4, x86_64-w64-mingw32)
 of 2017-12-21
Repository revision: b1cf262a79463f28164ea1c2ffee3c657ce02ea4
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install -C 'CFLAGS=-O2 -static -g3'
 host_alias=x86_64-w64-mingw32 PKG_CONFIG_PATH=/mingw64/lib/pkgconfig'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29842; Package emacs. (Sun, 24 Dec 2017 18:32:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: 29842 <at> debbugs.gnu.org
Subject: RE: bug#29842: 27.0; `dired-change-marks': args should not be optional
Date: Sun, 24 Dec 2017 10:30:54 -0800 (PST)
Furthermore, the code should perhaps not just call
`ding' if you hit RET.  Instead of this:

 (if (or (eq old ?\r) (eq new ?\r))
     (ding)
  ...)

it should perhaps do something like this:

 (unless (char-displayable-p old)
   (error "Not a displayable character: `%c'" old))
 (unless (char-displayable-p new)
   (error "Not a displayable character: `%c'" new))

The current code predates the existence of
`char-displayable-p'.

(Yes, that's a different bug, but perhaps it can be
taken care of in the context of this report.  If not,
don't worry about it.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29842; Package emacs. (Thu, 28 Dec 2017 13:15:01 GMT) Full text and rfc822 format available.

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

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 29842 <at> debbugs.gnu.org
Subject: Re: bug#29842: 27.0; `dired-change-marks': args should not be optional
Date: Thu, 28 Dec 2017 22:14:22 +0900
Drew Adams <drew.adams <at> oracle.com> writes:

> 1. There is no use of this function in the Emacs Lisp sources that needs
>    to have the args be optional.
Yes, it has sense that the arguments be mandatory.

> 2. If (dired-change-marks) is evaluated then you get an error:
>
>    Debugger entered--Lisp error: (error "Format specifier doesn't match
>                                          argument type") 
>     format("\n%c" "nil")
>     dired-change-marks()
>     eval((dired-change-marks))
Then the programmer would get the more intuitive
'Wrong number of arguments' error.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29842; Package emacs. (Thu, 28 Dec 2017 13:19:01 GMT) Full text and rfc822 format available.

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

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 29842 <at> debbugs.gnu.org
Subject: Re: bug#29842: 27.0; `dired-change-marks': args should not be optional
Date: Thu, 28 Dec 2017 22:18:06 +0900
Drew Adams <drew.adams <at> oracle.com> writes:

> Furthermore, the code should perhaps not just call
> `ding' if you hit RET.  Instead of this:
>
>  (if (or (eq old ?\r) (eq new ?\r))
>      (ding)
>   ...)
>
> it should perhaps do something like this:
>
>  (unless (char-displayable-p old)
>    (error "Not a displayable character: `%c'" old))
>  (unless (char-displayable-p new)
>    (error "Not a displayable character: `%c'" new))
>
> The current code predates the existence of
> `char-displayable-p'.
The more information the better; just a ding force you to read the
source code to know what was wrong.
Maybe `user-error' instead of `error'?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29842; Package emacs. (Thu, 28 Dec 2017 23:59:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 29842 <at> debbugs.gnu.org
Subject: RE: bug#29842: 27.0; `dired-change-marks': args should not be optional
Date: Thu, 28 Dec 2017 15:57:55 -0800 (PST)
> The more information the better; just a ding force you to read the
> source code to know what was wrong.
> Maybe `user-error' instead of `error'?

Yes `user-error' is appropriate here.  Sorry, I always
forget about its existence.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29842; Package emacs. (Sun, 19 Jan 2020 14:47:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 29842 <at> debbugs.gnu.org
Subject: Re: bug#29842: 27.0; `dired-change-marks': args should not be optional
Date: Sun, 19 Jan 2020 15:45:50 +0100
Drew Adams <drew.adams <at> oracle.com> writes:

> 1. There is no use of this function in the Emacs Lisp sources that needs
>    to have the args be optional.
>
> 2. If (dired-change-marks) is evaluated then you get an error:
>
>    Debugger entered--Lisp error: (error "Format specifier doesn't match
>                                          argument type") 
>     format("\n%c" "nil")
>     dired-change-marks()
>     eval((dired-change-marks))
>
> This bug is apparently quite old - it is present in Emacs 20, for
> example.

Fixed on master in commit 3d81d2326a.

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29842; Package emacs. (Sun, 19 Jan 2020 15:03:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 29842 <at> debbugs.gnu.org
Subject: Re: bug#29842: 27.0; `dired-change-marks': args should not be optional
Date: Sun, 19 Jan 2020 16:02:45 +0100
close 29842 28.1
thanks

Drew Adams <drew.adams <at> oracle.com> writes:

> Furthermore, the code should perhaps not just call
> `ding' if you hit RET.  Instead of this:
>
>  (if (or (eq old ?\r) (eq new ?\r))
>      (ding)
>   ...)
>
> it should perhaps do something like this:
>
>  (unless (char-displayable-p old)
>    (error "Not a displayable character: `%c'" old))
>  (unless (char-displayable-p new)
>    (error "Not a displayable character: `%c'" new))
>
> The current code predates the existence of
> `char-displayable-p'.
>
> (Yes, that's a different bug, but perhaps it can be
> taken care of in the context of this report.  If not,
> don't worry about it.)

Fixed on master in commit e5e31aab9b.

Best regards,
Stefan Kangas




bug marked as fixed in version 28.1, send any further explanations to 29842 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sun, 19 Jan 2020 15:03: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. (Mon, 17 Feb 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 41 days ago.

Previous Next


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