bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35055: 27.0.50; async-shell-command truncates output lines


From: Michael Albinus
Subject: bug#35055: 27.0.50; async-shell-command truncates output lines
Date: Mon, 01 Apr 2019 12:00:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Juri Linkov <juri@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]