GNU bug report logs - #16006
24.3; *grep* fails to display line numbers with global-linum-mode

Previous Next

Package: emacs;

Reported by: mdl <at> alum.mit.edu

Date: Sat, 30 Nov 2013 01:14:01 UTC

Severity: minor

Found in version 24.3

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16006 in the body.
You can then email your comments to 16006 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16006; Package emacs. (Sat, 30 Nov 2013 01:14:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to mdl <at> alum.mit.edu:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 30 Nov 2013 01:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mark Lillibridge <mdl <at> alum.mit.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; *grep* fails to display line numbers with global-linum-mode
Date: Fri, 29 Nov 2013 17:13:22 -0800
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)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16006; Package emacs. (Fri, 06 Dec 2013 17:51:01 GMT) Full text and rfc822 format available.

Message #8 received at 16006 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Mark Lillibridge <mdl <at> alum.mit.edu>
Cc: 16006 <at> debbugs.gnu.org
Subject: Re: bug#16006: 24.3;
 *grep* fails to display line numbers with global-linum-mode
Date: Fri, 06 Dec 2013 12:50:10 -0500
> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16006; Package emacs. (Tue, 10 Dec 2013 21:28:02 GMT) Full text and rfc822 format available.

Message #11 received at 16006 <at> debbugs.gnu.org (full text, mbox):

From: Mark Lillibridge <mdl <at> alum.mit.edu>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 16006 <at> debbugs.gnu.org
Subject: Re: bug#16006: 24.3;
 *grep* fails to display line numbers with global-linum-mode
Date: Tue, 10 Dec 2013 13:27:47 -0800
Stefan Monnier <monnier <at> 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




Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Wed, 12 Aug 2020 22:35:02 GMT) Full text and rfc822 format available.

Notification sent to mdl <at> alum.mit.edu:
bug acknowledged by developer. (Wed, 12 Aug 2020 22:35:02 GMT) Full text and rfc822 format available.

Message #16 received at 16006-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Mark Lillibridge <mdl <at> alum.mit.edu>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 16006-done <at> debbugs.gnu.org
Subject: Re: bug#16006: 24.3;
 *grep* fails to display line numbers with global-linum-mode
Date: Wed, 12 Aug 2020 15:34:09 -0700
Mark Lillibridge <mdl <at> alum.mit.edu> writes:

> Stefan Monnier <monnier <at> 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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 10 Sep 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.