--- Begin Message ---
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)
--- End Message ---
--- Begin Message ---
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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
--- End Message ---