From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10960: linum-mode does not work properly when changing font size Date: Sun, 11 Mar 2012 19:14:07 +0200 Message-ID: <83fwdfxdpc.fsf@gnu.org> References: <83hay1a9b4.fsf@gnu.org> <838vj8zsht.fsf@gnu.org> <83vcmcxzq9.fsf@gnu.org> <83lin8xh0r.fsf@gnu.org> <83k42ryekc.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1331486067 3642 80.91.229.3 (11 Mar 2012 17:14:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 11 Mar 2012 17:14:27 +0000 (UTC) Cc: lekktu@gmail.com, 10960@debbugs.gnu.org, l26wang@gmail.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 11 18:14:25 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S6mLe-0001eW-D9 for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Mar 2012 18:14:22 +0100 Original-Received: from localhost ([::1]:60544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6mLd-0006CN-An for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Mar 2012 13:14:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6mLa-0006CH-5F for bug-gnu-emacs@gnu.org; Sun, 11 Mar 2012 13:14:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S6mLY-0001f6-4I for bug-gnu-emacs@gnu.org; Sun, 11 Mar 2012 13:14:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6mLY-0001f0-0c for bug-gnu-emacs@gnu.org; Sun, 11 Mar 2012 13:14:16 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S6moL-0005uF-IV for bug-gnu-emacs@gnu.org; Sun, 11 Mar 2012 13:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Mar 2012 17:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10960 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10960-submit@debbugs.gnu.org id=B10960.133148783022673 (code B ref 10960); Sun, 11 Mar 2012 17:44:01 +0000 Original-Received: (at 10960) by debbugs.gnu.org; 11 Mar 2012 17:43:50 +0000 Original-Received: from localhost ([127.0.0.1]:45249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6mo9-0005te-Ro for submit@debbugs.gnu.org; Sun, 11 Mar 2012 13:43:50 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:38142) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6mo6-0005tV-H6 for 10960@debbugs.gnu.org; Sun, 11 Mar 2012 13:43:48 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M0Q00L00D5ANG00@a-mtaout23.012.net.il> for 10960@debbugs.gnu.org; Sun, 11 Mar 2012 19:13:59 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.205.223]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M0Q00LE9D79HL80@a-mtaout23.012.net.il>; Sun, 11 Mar 2012 19:13:59 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list 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:57681 Archived-At: > From: Stefan Monnier > Cc: lekktu@gmail.com, 10960@debbugs.gnu.org, l26wang@gmail.com > Date: Sun, 11 Mar 2012 10:37:45 -0400 > > The way I see it, set-window-margins can only set the margin's size > either to "no margin" or to a fixed size given as an integer. That's correct, but all set-window-margins does is set two attributes of the window object. How to use that is entirely up to the display engine. When the time comes to display the window, the margins come into play through the pixel coordinates where we draw the fringe bitmap. The code which computes those coordinates eventually calls window_box_left_offset or window_box_right_offset, which call window_box_width. The latter is the single place in the code, AFAICS, that converts the margin width from character cell units to pixel units. > So you'd have to let the Elisp code somehow figure out the *display* > size of the margin's text (either in pixels or in > char-cell-equivalent), and I don't know of any way Elisp can do that > currently. I didn't suggest to do this in Lisp. (I don't think Lisp programs should control the display at this low level.) What I suggested is to modify the calculation of the fringe pixel position based on how many pixels are actually needed for the glyphs (character glyphs, stretch glyphs, image glyphs, etc.) displayed in the fringe. Isn't that what you wanted?