unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: <kevin.gal@verizon.net>
Cc: emacs-devel@gnu.org
Subject: RE: Problem with new display in buffer-menu command
Date: Mon, 04 Dec 2006 14:09:35 -0600 (CST)	[thread overview]
Message-ID: <7901483.11418981165262975741.JavaMail.root@vms073.mailsrvcs.net> (raw)

	    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.

             reply	other threads:[~2006-12-04 20:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-04 20:09 kevin.gal [this message]
2006-12-06  0:47 ` Problem with new display in buffer-menu command Richard Stallman
     [not found] <24104523.1837881164941121106.JavaMail.root@vms071.mailsrvcs.net>
2006-12-02 17:56 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7901483.11418981165262975741.JavaMail.root@vms073.mailsrvcs.net \
    --to=kevin.gal@verizon.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).