all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Sean Perry <shaleh@speakeasy.net>
Cc: 12428@debbugs.gnu.org
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	[thread overview]
Message-ID: <jwvfw51xk7t.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <62162.1347479828@speakeasy.net> (Sean Perry's message of "Wed, 12 Sep 2012 12:57:08 PDT")

> 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





  reply	other threads:[~2012-10-26 16:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 19:57 bug#12428: 23.4; Add padding for rendering of the line numbers by linum-mode Sean Perry
2012-10-26 16:47 ` Stefan Monnier [this message]
2012-10-26 18:34   ` Sean Perry
2012-10-28 15:27     ` Stefan Monnier
2016-05-26 19:56 ` Alan Third
2016-05-26 20:19   ` shaleh
2017-09-25 13:53     ` Alan Third

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=jwvfw51xk7t.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=12428@debbugs.gnu.org \
    --cc=shaleh@speakeasy.net \
    /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.