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

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

bug#30016: Improve visibility of Process List


From: Juri Linkov
Subject: bug#30016: Improve visibility of Process List
Date: Tue, 09 Jan 2018 01:05:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> The displayed buffer *Process List* truncates the buffer names
>> and thus hides the suffixes of the active buffers:
>>
>> Shell           25550   run     *Async Shell... /dev/pts/17  /bin/bash -c 
>> sleep 3600
>> Shell<1>        25551   run     *Async Shell... /dev/pts/18  /bin/bash -c 
>> sleep 3600
>> Shell<2>        25552   run     *Async Shell... /dev/pts/19  /bin/bash -c 
>> sleep 3600
>> ...
>>
>> These buffer name suffixes are important to see to be able
>> to switch to the corresponding buffers using the *Buffer List*,
>> check the output and terminate its process when needed.
>>
>> So I propose to increase the size of the column for buffer names
>> in *Process List* to at least fit the longest default buffer name
>> *Async Shell Command* with suffixes:
>
> Any hope of a more clever logic that would eliminate the need for
> arbitrary limits?  Who can know whether there are other users of these
> facilities which need even wider columns?  E.g., can we display
> something like
>
>    *Async Sh...<1>
>
> i.e. make sure the numerical tail is shown?

Yes, this would be the most universal solution.
And this feature is also necessary in the *Buffer List*
where *Async Shell Command* buffer names are truncated too.

To support arbitrary formatting in ‘tabulated-list-format’ we could try
to add a new column property that would allow specifying what suffix
to leave in truncated columns.  For example, for buffer names it could
leave the buffer name's unique suffix such as “*Async Sh...<1>”,
or for directory names the last directory name in the full path,
e.g. turn “/usr/share/emacs/24.3/lisp/gnus” into “/usr/sha.../gnus”.

Maybe supporting a regexp property should be enough for such feature:

  (setq tabulated-list-format [("Process" 15 t)
                               ("PID"      7 t)
                               ("Status"   7 t)
                               ("Buffer"  15 t
                                :suffix-regexp "\\(<[0-9]+>\\)\\'"")
                               ("TTY"     12 t)
                               ("Command"  0 t)])





reply via email to

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