emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#12428: closed (Display glitch in margin with linum


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#12428: closed (Display glitch in margin with linum-mode on macosx)
Date: Mon, 25 Sep 2017 13:54:01 +0000

Your message dated Mon, 25 Sep 2017 14:53:16 +0100
with message-id <address@hidden>
and subject line Re: bug#12428: 23.4; Add padding for rendering of the line 
numbers by linum-mode
has caused the debbugs.gnu.org bug report #12428,
regarding Display glitch in margin with linum-mode on macosx
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
12428: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12428
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 23.4; Add padding for rendering of the line numbers by linum-mode Date: 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.
 The
suggestions boil down to a few choices

* stop using dynamic format and explicitly set a format like "%7d ".
  Note the trailing space.
* specify a function to return the format which will include the
  trailing space
* edit the source to ensure a space is added when the line number is
  finally rendered.

I dislike all three choices. Choice 1 will usually eat too much room
on the left. That is why dynamic was created in the first place. The
format handler routine option in Choice 2 is inefficient to implement
since the user will need to basically reimplement the dynamic logic and
this is called for every line in the file. If you follow some of the links on
StackOverflow there are several solutions to this and similar problems
that all reproduce the dynamic logic.

I finally chose to implement a variation of option 3 which is attached as a
patch. Basically it lets the user specify a padding value to added when
the line is rendered. The patch is small, easy for a user to implement
and efficient in execution. It certainly seems easier than the solutions
involving defadvice and the dynamic format logic.

For now I have a fork of linum in my .emacs.d/site-lisp. My patch to
linum is attached. Feel free to change the name of the customization
variable or improve the help text.

Sean

Attachment: linum.patch
Description: Binary data


--- End Message ---
--- Begin Message --- Subject: Re: bug#12428: 23.4; Add padding for rendering of the line numbers by linum-mode Date: Mon, 25 Sep 2017 14:53:16 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (darwin)
address@hidden writes:

> On Thu, 26 May 2016 20:56:05 +0100, Alan Third <address@hidden> wrote:
>
>  Sean Perry <address@hidden> writes:
>
>  > 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.
>  The
>
>  Hi, is this still an issue for you? I can't reproduce it in Emacs 25.
>  -- 
>  Alan Third
>
> I do not know. I am not running 25 yet :-)
>
>  
>
> I will test this on OSX and respond again. I am not seeing it on my Linux 
> workstations.

It's been over a year since this bug report had any action. I still
can't reproduce it so I think it must have been fixed. We also have
display-line-numbers-mode available in Emacs 26 which appears to provide
the desired padding behaviour out-of-the-box.

If you're still seeing the problem, please let us know.
-- 
Alan Third


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]