all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* completion buffer - unsuitable column width
@ 2009-03-02 19:13 David Reitter
  2009-03-03  1:33 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: David Reitter @ 2009-03-02 19:13 UTC (permalink / raw)
  To: Emacs-Devel devel

I noticed that the columns in completion buffers are awfully wide for  
me.  They also wrap around when the frame is resized, either while  
displaying it or after killing it explicitly and bringing up a new  
completion buffer.

Looking at the code, it seems that this is due to an incorrect  
calculation of the available width in characters:

(defun completion--insert-strings (strings)
  ...
	   (window (get-buffer-window (current-buffer) 0))
	   (wwidth (if window (1- (window-width window)) 79))
...

In my case, I use face-remapping-alist to assign different faces for  
the frame default face and the buffer default face.  This causes  
"window-width" to return a figure that does not indicate how much text  
can be fit in one line in that window.

I don't know how to fix this given that there seems to be no way to  
calculate the (average) character width of text with a given face.

I haven't encountered such an issue with 22.






^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-03-03 18:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-02 19:13 completion buffer - unsuitable column width David Reitter
2009-03-03  1:33 ` Stefan Monnier
2009-03-03 13:23   ` David Reitter
2009-03-03 14:21     ` Stefan Monnier
2009-03-03 15:47       ` David Reitter
2009-03-03 18:03         ` Stefan Monnier
2009-03-03 16:46     ` Dan Nicolaescu
2009-03-03 16:33   ` Jonathan Rockway

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.