* RE: Problem with new display in buffer-menu command
@ 2006-12-04 20:09 kevin.gal
2006-12-06 0:47 ` Richard Stallman
0 siblings, 1 reply; 3+ messages in thread
From: kevin.gal @ 2006-12-04 20:09 UTC (permalink / raw)
Cc: emacs-devel
In the buffer-menu display, long file names are now truncated
(indicated by a ":"). Since the display lines are not wrapped, as
well, this can result in a display looking like this:
. viper-keys-new-test-c: 6 C++/lah ~/usr/local/share/emacs/22.0.91/lisp/emulation/v
viper-keys-new-test-c: 6 C++/lah ~/usr/local/share/emacs/22.0.91/lisp/emulation/v
%* emulation 4097 Dired by name ~/usr/local/share/emacs/22.0.91/lisp/emulation/
% lisp 39305 Dired by name ~/usr/local/share/emacs/22.0.91/lisp/
In your message, the first two file names are indented much more than
the following ones. Is that true in the menu too? If so, that seems
like a bug, isn't it?
No, they are all lined up in the menu. It was either a bad cut-and-paste, on my part, and/or the mailer messed it up.
One of the two top files ends in .h file and the other ends in .cpp,
but the user cannot tell which is which from this display without
first visiting one.
We could omit text from the middle of the name instead of from the end.
Would that be better?
No Two different files with the same extension might differ only by the middle characters in their base name, which would result in the same problem.
Normally, one would expect the full filename to
appear when moving the mouse over the truncated filename. But,
instead, the message "mouse-1: select this buffer" is always
displayed, instead, which isn't helpful in this situation.
That seems like a good idea. I think that we have no ability to
attach different help strings to parts of a menu item, but we could
attach the full file name as the help string to the whole menu item.
I just realized that the above suggestion ONLY works when Emacs is running in a window manager. So, for a complete solution, perhaps the following would be a better approach.
Instead of having one default display width for the Buffer column, support having a default range (or small set) of widths to pick from. When the need to truncate (with the current default width) is first determined, change the current default width to a larger one (in the default range or from the default set of widths) which is capable of displaying the full file name. Then simply re-call the logic to re-generate the display with the new current default width. If a file name length exceeds the maximum width permitted (perhaps half of the current Emacs line width might be a good choice), then truncate using the current truncate logic using the maximum width.
Another alternative is to have the first suggested behavior when running in a window manager and, when not running in a window manager, revert back to using Emacs 21 behavior.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem with new display in buffer-menu command
2006-12-04 20:09 Problem with new display in buffer-menu command kevin.gal
@ 2006-12-06 0:47 ` Richard Stallman
0 siblings, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2006-12-06 0:47 UTC (permalink / raw)
Cc: emacs-devel
Instead of having one default display width for the Buffer column,
support having a default range (or small set) of widths to pick from.
When the need to truncate (with the current default width) is first
determined, change the current default width to a larger one (in the
default range or from the default set of widths) which is capable of
displaying the full file name. Then simply re-call the logic to
re-generate the display with the new current default width.
Something like this might work. It could try various means of omitting
part of the names -- from the end, from the middle, whatever -- and pick
the first one that makes them all unique.
I don't think this is a must-fix, but if someone wants to work on it,
we could install it. Probably after the release.
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <24104523.1837881164941121106.JavaMail.root@vms071.mailsrvcs.net>]
* Re: Problem with new display in buffer-menu command
[not found] <24104523.1837881164941121106.JavaMail.root@vms071.mailsrvcs.net>
@ 2006-12-02 17:56 ` Richard Stallman
0 siblings, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2006-12-02 17:56 UTC (permalink / raw)
Cc: emacs-devel
In the buffer-menu display, long file names are now truncated
(indicated by a ":"). Since the display lines are not wrapped, as
well, this can result in a display looking like this:
. viper-keys-new-test-c: 6 C++/lah ~/usr/local/share/emacs/22.0.91/lisp/emulation/v
viper-keys-new-test-c: 6 C++/lah ~/usr/local/share/emacs/22.0.91/lisp/emulation/v
%* emulation 4097 Dired by name ~/usr/local/share/emacs/22.0.91/lisp/emulation/
% lisp 39305 Dired by name ~/usr/local/share/emacs/22.0.91/lisp/
In your message, the first two file names are indented much more than
the following ones. Is that true in the menu too? If so, that seems
like a bug, isn't it?
One of the two top files ends in .h file and the other ends in .cpp,
but the user cannot tell which is which from this display without
first visiting one.
We could omit text from the middle of the name instead of from the end.
Would that be better?
Normally, one would expect the full filename to
appear when moving the mouse over the truncated filename. But,
instead, the message "mouse-1: select this buffer" is always
displayed, instead, which isn't helpful in this situation.
That seems like a good idea. I think that we have no ability to
attach different help strings to parts of a menu item, but we could
attach the full file name as the help string to the whole menu item.
Would someone like to implement that?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-12-06 0:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-04 20:09 Problem with new display in buffer-menu command kevin.gal
2006-12-06 0:47 ` Richard Stallman
[not found] <24104523.1837881164941121106.JavaMail.root@vms071.mailsrvcs.net>
2006-12-02 17:56 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.