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: Tue, 02 Apr 2019 11:27:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Juri Linkov <juri@linkov.net> writes:

>>> 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.
>
> This is strange.  I tried in `emacs -Q' in a wide frame and
> output lines of `ps aux' are always truncated at column 80.

Strange indeed. Today I'm not in office but @home. Now I get the same
behaviour as you.

On both machines I've used a fresh compiled Emacs from master. The only
difference is, that @office I use a Fedora 29 machine with a large
monitor, and @home Ubuntu 18.10 with a smaller monitor. Don't know
whether this makes the difference. Anyway, ...

> Then I tried to affect the number of columns with the
> environment variable COLUMNS, and when using
>
>   M-& COLUMNS=89 ps aux
>
> only then output lines are truncated at column 89.

Same here.

> Trying different values produced different truncation:
>
>   COLUMNS=0 ps aux      - column 80
>   COLUMNS=1 ps aux      - column 68
>   COLUMNS=5 ps aux      - column 70
>   COLUMNS=20 ps aux     - column 80
>   COLUMNS=30 ps aux     - column 90
>   COLUMNS=40 ps aux     - column 80
>   COLUMNS=50 ps aux     - column 100
>   COLUMNS=60 ps aux     - column 120
>   COLUMNS=70 ps aux     - column 70
>   COLUMNS=131071 ps aux - practically unlimited
>   COLUMNS=131072 ps aux - again column 80 (looks like maximum reached)
>
> i.e. dependency is not linear.

Same here. I guess that setting COLUMNS is not reliable for COLUMNS < 80
and > 131072. But at least it is a way to influence the output width of
asynchronous processes.

>> 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.
>
> I had truncated output of remote `shell-command' for a long time
> and thought that it's impossible to do anything with this,
> but now that you mentioned remote shell commands, I tried
> to affect their output with a quite large value of COLUMNS
> and get untruncated output even on remote.

That's because Tramp sets process property `adjust-window-size-function'
to `ignore' (and not to nil as I wrote above). This was 2 years ago;
unfortunately, I have neither a bug nor a message reference for that change.

Best regards, Michael.





reply via email to

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