GNU bug report logs - #63432
30.0.50; Handle current-prefix-arg in async-shell-command

Previous Next

Package: emacs;

Reported by: Gabriel <gabriel376 <at> hotmail.com>

Date: Wed, 10 May 2023 23:10:02 UTC

Severity: normal

Found in version 30.0.50

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gabriel <gabriel376 <at> hotmail.com>
To: 63432 <at> debbugs.gnu.org
Subject: bug#63432: 30.0.50; Handle current-prefix-arg in async-shell-command
Date: Sat, 13 May 2023 20:35:51 -0300
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

> Thanks, but I don't understand why we need the error message.  Isn't
> it enough to pass nil as 2nd argument to shell-command?

The error message is just for noninteractive cases where a caller passes
a numeric argument as the second argument of `async-shell-command'.  For
interactive cases, a nil value will be always passed to `shell-command'.

Example:
    Before patch:
        (async-shell-command "ls" 1) => error: (wrong-type-argument stringp 1)
    After patch:
        (async-shell-command "ls" 1) => error: (error "Invalid output buffer")

Here is a patch without the error message, in case it's preferable:
[0001-Ignore-current-prefix-arg-in-async-shell-command.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
---
Gabriel

This bug report was last modified 2 years and 11 days ago.

Previous Next


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