From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#12428: 23.4; Add padding for rendering of the line numbers by linum-mode Date: Fri, 26 Oct 2012 12:47:09 -0400 Message-ID: References: <62162.1347479828@speakeasy.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351270078 13674 80.91.229.3 (26 Oct 2012 16:47:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Oct 2012 16:47:58 +0000 (UTC) Cc: 12428@debbugs.gnu.org To: Sean Perry Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 26 18:48:06 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 1TRn4m-0001vy-43 for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Oct 2012 18:48:04 +0200 Original-Received: from localhost ([::1]:38762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRn4e-00080v-Bd for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Oct 2012 12:47:56 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRn4c-00080N-5D for bug-gnu-emacs@gnu.org; Fri, 26 Oct 2012 12:47:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRn4a-00046u-W4 for bug-gnu-emacs@gnu.org; Fri, 26 Oct 2012 12:47:54 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRn4a-00046q-Si for bug-gnu-emacs@gnu.org; Fri, 26 Oct 2012 12:47:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TRn6g-0006n0-Ck for bug-gnu-emacs@gnu.org; Fri, 26 Oct 2012 12:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Oct 2012 16:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12428 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12428-submit@debbugs.gnu.org id=B12428.135127016426051 (code B ref 12428); Fri, 26 Oct 2012 16:50:02 +0000 Original-Received: (at 12428) by debbugs.gnu.org; 26 Oct 2012 16:49:24 +0000 Original-Received: from localhost ([127.0.0.1]:35025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TRn63-0006m8-Sq for submit@debbugs.gnu.org; Fri, 26 Oct 2012 12:49:24 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:26348) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TRn61-0006m0-2f for 12428@debbugs.gnu.org; Fri, 26 Oct 2012 12:49:21 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0/O+LFW/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYSFBgNJIgcBQu5fpBEA5YqjQmBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="202922051" Original-Received: from 206-248-177-86.dsl.teksavvy.com (HELO pastel.home) ([206.248.177.86]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 26 Oct 2012 12:47:09 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 83F245940A; Fri, 26 Oct 2012 12:47:09 -0400 (EDT) In-Reply-To: <62162.1347479828@speakeasy.net> (Sean Perry's message of "Wed, 12 Sep 2012 12:57:08 PDT") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) 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:66085 Archived-At: > I was experiencing the issue discussed here at StackOverflow > http://stackoverflow.com/questions/4920210/what-causes-this-graphical-error-in-emacs-with-linum-mode-on-os-x. I'm not sure I understand what is the problem there. Is it really a display glitch where the fringe is displayed on top of the margin? If so, that's just a bug that needs fixing. I.e. please provide a recipe (I haven't bumped into such a display glitch in my tests of linum.el). If it's not a display glitch, can you explain what it is? > +(defcustom linum-margin-padding 0 > + "Padding added to the left margin when displaying the line numbers. > +Should be a positive integer. A value between 1 and 5 is probably sufficient." While I don't think it's "useful in theory", I do see that it could be useful in practice to work around problems due to variable-pitch fonts, for example, where linum.el is not able to correctly compute the actual width that the text will need. > - (setq width (max width (length str))) > + (setq width (max width (+ (length str) linum-margin-padding))) Why not add linum-margin-padding only at the end, in the call to set-window-margins? Stefan