GNU bug report logs - #35055
27.0.50; async-shell-command truncates output lines

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sat, 30 Mar 2019 22:18:02 UTC

Severity: minor

Found in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Juri Linkov <juri <at> linkov.net>
Cc: 35055 <at> debbugs.gnu.org
Subject: bug#35055: 27.0.50; async-shell-command truncates output lines
Date: Mon, 01 Apr 2019 12:00:15 +0200
Juri Linkov <juri <at> linkov.net> writes:

Hi Juri,

> Test case:
>
> 1. Open a wide frame and type:
>
> 2. `M-& ps aux RET'
>
> 3. observe that output lines are truncated at column 80

In my case, output lines are truncated at column 89. In fact the
truncation happens exactly at the size of the *Async Shell Command*
buffer.

> OTOH, there is no such problem with `M-! ps aux RET'
> where lines are not truncated at all.
>
> So the question is: why `M-&' (async-shell-command) limits COLUMNS to 80,
> even on wide frames, whereas `M-!' (shell-command) has no limitation.

Internally, M-! uses `call-process', and M-& uses
`start-file-process'. They have different implementations.

Synchronous processes do not care about the buffer width. So you see
untruncated output.

Asynchronous processes care. They send the information about buffer
dimensions with the function `set-process-window-size', see
(info "(elisp) Process Buffers")

There is the variable `window-adjust-process-window-size-function' which
controls how the dimension information is given to the underlying
process.

I'm not sure whether there exists already a configuration option to
allow asynchronous shell commands using infinite line width, but it
could be implemented this way.

Note that for remote shell commands the situation is even worse, because
it sets the process property `adjust-window-size-function' to nil,
overwriting any setting in `window-adjust-process-window-size-function'.
This affects even synchronous `shell-command' calls, because they are
implemented Tramp internally as asynchronous process.

Best regards, Michael.




This bug report was last modified 6 years and 78 days ago.

Previous Next


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