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


Message #14 received at 35055 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Juri Linkov <juri <at> linkov.net>
Cc: 35055 <at> debbugs.gnu.org
Subject: Re: bug#35055: 27.0.50; async-shell-command truncates output lines
Date: Tue, 02 Apr 2019 11:27:22 +0200
Juri Linkov <juri <at> 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.




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

Previous Next


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