unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16006: 24.3; *grep* fails to display line numbers with global-linum-mode
@ 2013-11-30  1:13 Mark Lillibridge
  2013-12-06 17:50 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Lillibridge @ 2013-11-30  1:13 UTC (permalink / raw)
  To: 16006


The following should produce a *grep* buffer:

    emacs -q
    M-x global-linum-mode
    ^x^f ~
    M-x grep
    a *

Note that only the first four lines of the *grep* buffer have line
numbers when all the visible lines should have line numbers.  Switching
to the new *grep* buffer dones make the line numbers appear.

- Mark


In GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2013-11-29 on foil
Windowing system distributor `The Cygwin/X Project', version 11.0.11403000
System Description:	Debian GNU/Linux 7.2 (wheezy)

Configured using:
 `configure '--prefix=/home/mdl/bin/emacs-24.3' '--without-gif''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Dired by name

Minor modes in effect:
  global-linum-mode: t
  linum-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> C-x C-f <help-echo> <escape> 
<backspace> <return> <help-echo> <help-echo> <escape> 
x g r e p <return> f o o <return> C-x o C-x k <return> 
<escape> x l i n u m <tab> <return> C-x o <escape> 
x g l o b <tab> l i <tab> <return> <escape> x g r e 
p <return> f o o <return> <help-echo> <help-echo> <help-echo> 
<help-echo> <down-mouse-1> <mouse-movement> <mouse-1> 
<escape> x g r e p <return> a SPC * <return> <escape> 
x r e p o <tab> r <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Grep finished with no matches found
Linum mode enabled
Global-Linum mode enabled
Grep finished with no matches found
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-mode easymenu cus-start cus-load linum shell
pcomplete grep compile comint ansi-color ring dired time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dynamic-setting
font-render-setting x-toolkit x multi-tty emacs)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16006: 24.3; *grep* fails to display line numbers with global-linum-mode
  2013-11-30  1:13 bug#16006: 24.3; *grep* fails to display line numbers with global-linum-mode Mark Lillibridge
@ 2013-12-06 17:50 ` Stefan Monnier
  2013-12-10 21:27   ` Mark Lillibridge
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2013-12-06 17:50 UTC (permalink / raw)
  To: Mark Lillibridge; +Cc: 16006

> Note that only the first four lines of the *grep* buffer have line
> numbers when all the visible lines should have line numbers.  Switching
> to the new *grep* buffer dones make the line numbers appear.

Indeed linum.el suffers from various corner case problems.  Maybe this
one is fixed in Emacs trunk, or maybe it can be fixed.  But the
implementation technique used by linum.el has proved over the years to
lead to many such corner case issues.

I suggest you try out nlinum.el (available in GNU ELPA) which provides
basically the same functionality as linum.el but using a different
implementation approach, which is more robust.


        Stefan





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16006: 24.3; *grep* fails to display line numbers with global-linum-mode
  2013-12-06 17:50 ` Stefan Monnier
@ 2013-12-10 21:27   ` Mark Lillibridge
  2020-08-12 22:34     ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Lillibridge @ 2013-12-10 21:27 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 16006


Stefan Monnier <monnier@iro.umontreal.ca> writes:

>  > Note that only the first four lines of the *grep* buffer have line
>  > numbers when all the visible lines should have line numbers.  Switching
>  > to the new *grep* buffer dones make the line numbers appear.
>  
>  Indeed linum.el suffers from various corner case problems.  Maybe this
>  one is fixed in Emacs trunk, or maybe it can be fixed.  But the
>  implementation technique used by linum.el has proved over the years to
>  lead to many such corner case issues.
>  
>  I suggest you try out nlinum.el (available in GNU ELPA) which provides
>  basically the same functionality as linum.el but using a different
>  implementation approach, which is more robust.

    Very nice!  Does not suffer from this bug.  I will play with it
more.  Add the following in order to get a global mode:

(define-globalized-minor-mode global-nlinum-mode nlinum-mode nlinum-on)

(defun nlinum-on ()
  (unless (minibufferp)
    (nlinum-mode 1)))

- Mark





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16006: 24.3; *grep* fails to display line numbers with global-linum-mode
  2013-12-10 21:27   ` Mark Lillibridge
@ 2020-08-12 22:34     ` Stefan Kangas
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2020-08-12 22:34 UTC (permalink / raw)
  To: Mark Lillibridge; +Cc: Stefan Monnier, 16006-done

Mark Lillibridge <mdl@alum.mit.edu> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>  > Note that only the first four lines of the *grep* buffer have line
>>  > numbers when all the visible lines should have line numbers.  Switching
>>  > to the new *grep* buffer dones make the line numbers appear.
>>
>>  Indeed linum.el suffers from various corner case problems.  Maybe this
>>  one is fixed in Emacs trunk, or maybe it can be fixed.  But the
>>  implementation technique used by linum.el has proved over the years to
>>  lead to many such corner case issues.
>>
>>  I suggest you try out nlinum.el (available in GNU ELPA) which provides
>>  basically the same functionality as linum.el but using a different
>>  implementation approach, which is more robust.
>
>     Very nice!  Does not suffer from this bug.  I will play with it
> more.  Add the following in order to get a global mode:

So the solution here was to use nlinum instead of linum.  We now also
have display-numbers-mode.

Since there also have been no further updates here within 6 years, I'm
closing this bug now.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-12 22:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-30  1:13 bug#16006: 24.3; *grep* fails to display line numbers with global-linum-mode Mark Lillibridge
2013-12-06 17:50 ` Stefan Monnier
2013-12-10 21:27   ` Mark Lillibridge
2020-08-12 22:34     ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).