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: Sun, 28 Oct 2012 11:27:55 -0400 Message-ID: References: <62162.1347479828@speakeasy.net> <672727B6-0D0E-4680-9C81-B7E83C2A40EB@speakeasy.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351438129 10924 80.91.229.3 (28 Oct 2012 15:28:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2012 15:28:49 +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 Sun Oct 28 16:28:57 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 1TSUnF-0005VI-Jd for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2012 16:28:53 +0100 Original-Received: from localhost ([::1]:55813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSUn7-0002sP-FI for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2012 11:28:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSUn4-0002ro-Iu for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 11:28:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSUn3-0004Jh-Cl for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 11:28:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSUn3-0004Jd-9T for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 11:28:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TSUpJ-0007xF-NJ for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 11:31:01 -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: Sun, 28 Oct 2012 15:31:01 +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.135143822130525 (code B ref 12428); Sun, 28 Oct 2012 15:31:01 +0000 Original-Received: (at 12428) by debbugs.gnu.org; 28 Oct 2012 15:30:21 +0000 Original-Received: from localhost ([127.0.0.1]:36737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSUoe-0007wH-OR for submit@debbugs.gnu.org; Sun, 28 Oct 2012 11:30:21 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:27183) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSUoc-0007w5-AM; Sun, 28 Oct 2012 11:30:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0/O+LET/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYSFBgNJIgcBboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="203021182" Original-Received: from 206-248-177-19.dsl.teksavvy.com (HELO pastel.home) ([206.248.177.19]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 28 Oct 2012 11:27:56 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id B9DF559415; Sun, 28 Oct 2012 11:27:55 -0400 (EDT) In-Reply-To: <672727B6-0D0E-4680-9C81-B7E83C2A40EB@speakeasy.net> (Sean Perry's message of "Fri, 26 Oct 2012 11:34:55 -0700") 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:66133 Archived-At: retitle 12428 Display glitch in margin with linum-mode on macosx reassign 12428 emacs,ns thanks > That is exactly the issue. When I turn the fringe off the text of the > buffer is now right next to the line numbering so I wanted some > padding. This does not sound like a display glitch, right? Instead the issue is that you want a visible separation between the buffer text and the margin's content, even when the fringe is off (or when fringes-outside-margins, I guess). So, indeed, that's a case where adding some padding to linum's format can make the problem somewhat less annoying. > I thought other people might too without changing their > fringe settings. I agree the bug needs fixing. When you say "the bug" you mean the issue above? If so, please file a separate bug report (well, it'd be a feature request, but M-x report-emacs-bug is The Right Thing for that as well) for that. > Load a no config emacs. Open some code that is over 100 lines long -- > you need 3 digits of numbering to really see it although it is present > with less. Start linum-mode. The number 1-9 are ok but ever so > slightly chopped. The 10-99 show clear chopping. I do not see this at all (here on Debian GNU/Linux). I did "emacs -Q src/regex.c" and then M-x linum-mode and none of the line numbers are chopped (neither at the beginning nor at the end of the buffer). > Now set the following. > (custom-set-variables '(fringe-mode (quote (0)) nil (fringe))) > Now the numbers are fine but the code display is ugly since there is > no padding. Yes, I see that the two are too close to each other. That's the above discussed issue (one could argue it's a pilot error: you asked for "no fringe" and you get what you asked for). > I am using the Emacs for mac osx build of 23.2. "This is GNU Emacs > 23.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.29) of 2010-05-08 on > black.local" as well as 23.4.1. I just downloaded the build of 24.2 > and it is still there. I only have 23.1 on my local Linux installs. > It does not reproduce there. It may be a font related issue on OS X. > The default for Emacs on OSX is Monaco which is indeed monospace. > If I switch the font by putting just this in ~/.emacs > (set-face-attribute 'default nil > :family "Inconsolata" :height 145 :weight 'normal) > I can clearly see the line being drawn through the linum numbers. > Set the height to 90 and the back of the numbers are being obscured > instead. The screen capture in the link to StackOverflow shows > this nicely. This sounds like a display bug, probably specific to the macosx code. Someone else will have to look into this, since I know nothing about this code. >> Why not add linum-margin-padding only at the end, in the call to >> set-window-margins? > Because it made the call to set-window-margins noisier than it needed to > be. We still want to use (max) since there is no need to add the padding > unless the desired width requires it. I don't understand: when would the padding not be necessary? Or is it because you want this padding to work around the macosx display bug, rather than work around the other issue discussed above? If so, I'd rather not do that, and focus on fixing the display bug instead (unless fixing this bug is difficult, but I see no reason for that). Stefan