From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#9949: 24.0.91; window-width function does not take text-scale-mode-amount into account Date: Fri, 04 Nov 2011 20:58:44 +0100 Message-ID: <4EB443F4.9070605@gmx.at> References: <83r51okwui.fsf@gnu.org> <83ipmzlvu3.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1320436775 22994 80.91.229.12 (4 Nov 2011 19:59:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 4 Nov 2011 19:59:35 +0000 (UTC) Cc: 9949@debbugs.gnu.org To: Josh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 04 20:59:31 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RMPvH-0001LF-3C for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Nov 2011 20:59:31 +0100 Original-Received: from localhost ([::1]:51616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMPvG-0007Wn-KD for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Nov 2011 15:59:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:42723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMPvD-0007Wd-Ft for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2011 15:59:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMPvC-000420-MW for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2011 15:59:27 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMPvC-00041s-H7 for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2011 15:59:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RMPxi-0003Zv-Ap for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2011 16:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Nov 2011 20:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9949 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9949-submit@debbugs.gnu.org id=B9949.132043688613694 (code B ref 9949); Fri, 04 Nov 2011 20:02:02 +0000 Original-Received: (at 9949) by debbugs.gnu.org; 4 Nov 2011 20:01:26 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMPx8-0003Yo-9W for submit@debbugs.gnu.org; Fri, 04 Nov 2011 16:01:26 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1RMPx6-0003Yg-9I for 9949@debbugs.gnu.org; Fri, 04 Nov 2011 16:01:25 -0400 Original-Received: (qmail invoked by alias); 04 Nov 2011 19:58:46 -0000 Original-Received: from 62-47-38-79.adsl.highway.telekom.at (EHLO [62.47.38.79]) [62.47.38.79] by mail.gmx.net (mp072) with SMTP; 04 Nov 2011 20:58:46 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19+Zalbzdx+3eH6q8c91LK5zhtK0kFiV9cxTG02O/ cR2WfFA3yhuVsv User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 04 Nov 2011 16:02:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53527 Archived-At: > window-width already returns incorrect results for the exceptions you > mentioned. A variant that accounts for text scaling would be correct in > all the cases window-width is correct, plus the case where text scaling has > been applied to a fixed width font. All that is needed is for someone to > expose the pixel width of a face and my scaled-window-width function above > will work. You really should leave this job to the display-engine. Doing your calculations based on window-width means you'd have to add a function to `window-configuration-change-hook' and/or `window-size-change-functions' and recalculate the position of your stamps when a window changes size. Moreover, a solution based on window-width will fail when you display the same buffer in two windows of different width. And another benefit of using :align-to would be the additional experience whether it does its job as expected. martin