* bug#29842: 27.0; `dired-change-marks': args should not be optional
@ 2017-12-24 17:58 Drew Adams
2017-12-24 18:30 ` Drew Adams
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Drew Adams @ 2017-12-24 17:58 UTC (permalink / raw)
To: 29842
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'
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#29842: 27.0; `dired-change-marks': args should not be optional
2017-12-24 17:58 bug#29842: 27.0; `dired-change-marks': args should not be optional Drew Adams
@ 2017-12-24 18:30 ` Drew Adams
2017-12-28 13:18 ` Tino Calancha
2020-01-19 15:02 ` Stefan Kangas
2017-12-28 13:14 ` Tino Calancha
2020-01-19 14:45 ` Stefan Kangas
2 siblings, 2 replies; 7+ messages in thread
From: Drew Adams @ 2017-12-24 18:30 UTC (permalink / raw)
To: 29842
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.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#29842: 27.0; `dired-change-marks': args should not be optional
2017-12-24 17:58 bug#29842: 27.0; `dired-change-marks': args should not be optional Drew Adams
2017-12-24 18:30 ` Drew Adams
@ 2017-12-28 13:14 ` Tino Calancha
2020-01-19 14:45 ` Stefan Kangas
2 siblings, 0 replies; 7+ messages in thread
From: Tino Calancha @ 2017-12-28 13:14 UTC (permalink / raw)
To: Drew Adams; +Cc: 29842
Drew Adams <drew.adams@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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#29842: 27.0; `dired-change-marks': args should not be optional
2017-12-24 18:30 ` Drew Adams
@ 2017-12-28 13:18 ` Tino Calancha
2017-12-28 23:57 ` Drew Adams
2020-01-19 15:02 ` Stefan Kangas
1 sibling, 1 reply; 7+ messages in thread
From: Tino Calancha @ 2017-12-28 13:18 UTC (permalink / raw)
To: Drew Adams; +Cc: 29842
Drew Adams <drew.adams@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'?
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#29842: 27.0; `dired-change-marks': args should not be optional
2017-12-28 13:18 ` Tino Calancha
@ 2017-12-28 23:57 ` Drew Adams
0 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2017-12-28 23:57 UTC (permalink / raw)
To: Tino Calancha; +Cc: 29842
> 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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#29842: 27.0; `dired-change-marks': args should not be optional
2017-12-24 17:58 bug#29842: 27.0; `dired-change-marks': args should not be optional Drew Adams
2017-12-24 18:30 ` Drew Adams
2017-12-28 13:14 ` Tino Calancha
@ 2020-01-19 14:45 ` Stefan Kangas
2 siblings, 0 replies; 7+ messages in thread
From: Stefan Kangas @ 2020-01-19 14:45 UTC (permalink / raw)
To: Drew Adams; +Cc: 29842
Drew Adams <drew.adams@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
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#29842: 27.0; `dired-change-marks': args should not be optional
2017-12-24 18:30 ` Drew Adams
2017-12-28 13:18 ` Tino Calancha
@ 2020-01-19 15:02 ` Stefan Kangas
1 sibling, 0 replies; 7+ messages in thread
From: Stefan Kangas @ 2020-01-19 15:02 UTC (permalink / raw)
To: Drew Adams; +Cc: 29842
close 29842 28.1
thanks
Drew Adams <drew.adams@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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-01-19 15:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-24 17:58 bug#29842: 27.0; `dired-change-marks': args should not be optional Drew Adams
2017-12-24 18:30 ` Drew Adams
2017-12-28 13:18 ` Tino Calancha
2017-12-28 23:57 ` Drew Adams
2020-01-19 15:02 ` Stefan Kangas
2017-12-28 13:14 ` Tino Calancha
2020-01-19 14:45 ` Stefan Kangas
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.