emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs26: Quick thoughts on display-line-numbers-mode


From: Matthew Plant
Subject: Re: Emacs26: Quick thoughts on display-line-numbers-mode
Date: Thu, 05 Oct 2017 20:09:39 -0700

On Thu, 2017-10-05 at 22:58 +0300, Eli Zaretskii wrote:
> > From: Robert Weiner <address@hidden>
> > Date: Thu, 5 Oct 2017 15:44:54 -0400
> > Cc: emacs-devel <address@hidden>
> > 
> >  Separation between the numbers and the text is still kept, by
> > means of
> >  a white-space glyph.
> > 
> > So could you add a customization option for this glyph that would
> > provide some visual separation, e.g. a
> > hairline or something similar to the visual linum-mode provides?
> 
> There's a technical problem with doing that, for which I didn't have
> a
> solution at the time and still don't.  Such an option would also slow
> redisplay, albeit in minor ways.
> 
For now, you can go to src/xdisp.c:20996 and change the line:
    strcat (lnum_buf, " ");
to  
   strcat (lnum_buf, "|");

This change works pretty well, although it's not as nice as having a
complete line.

Although I think I like the pipe character better than the space.

> >  > 2. The mode-line popup menu that displays/hides line and col
> > numbers in the mode=line could be
> >  expanded to
> >  > toggle this mode on and off locally and globally, as well as
> > providing options for its various display
> >  settings:
> >  > relative, visual and absolute.
> >  
> >  I'm not sure I agree. The mode-line menu is for displays on the
> > mode
> >  line. The display-line-numbers-mode and its variants can be
> > turned on
> >  or off from the menu bar's Options menu.
> > 
> > I see your point but do think in practice a lot of people would
> > look to the mode-line menu if they could. Also,
> > having all the options in one place would let people decide which
> > to use at any given point without hunting
> > around. I know I look at mode-lines a lot more than the menubar.
> 
> Well, currently the mode line offers customization only of the stuff
> that is displayed on the mode line, so I'm not sure why people would
> look there or something else.
> 
> > It would also force a cleanup of the menu item
> > naming so that it was obvious where each option will display its
> > numbers.
> 
> Not sure I understand: the Options menu has Hide/Show sub-menu, which
> is where we put all the toggle-type options.  Line-number display is
> one of them.  So it looks like the current arrangement is consistent
> with how we provide similar customizations.
> 



reply via email to

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