From: Stefan Monnier <monnier@iro.umontreal.ca>
To: David Reitter <david.reitter@gmail.com>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: completion buffer - unsuitable column width
Date: Mon, 02 Mar 2009 20:33:09 -0500 [thread overview]
Message-ID: <jwvtz6bo0h2.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <9B16B937-9EFC-445F-A169-5F1BDEB17A79@gmail.com> (David Reitter's message of "Mon, 2 Mar 2009 14:13:17 -0500")
> (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.
That's unfortunate, indeed.
> I haven't encountered such an issue with 22.
The code in Emacs-22, just used a hard-coded 79.
Stefan
next prev parent reply other threads:[~2009-03-03 1:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-02 19:13 completion buffer - unsuitable column width David Reitter
2009-03-03 1:33 ` Stefan Monnier [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvtz6bo0h2.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=david.reitter@gmail.com \
--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 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.