GNU bug report logs - #16692
24.2; nlinum version 1.2 does not work correctly with indirect buffers

Previous Next

Package: emacs;

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

Date: Sat, 8 Feb 2014 19:31:02 UTC

Severity: minor

Found in version 24.2

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

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 16692 in the body.
You can then email your comments to 16692 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#16692; Package emacs. (Sat, 08 Feb 2014 19:31:02 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, 08 Feb 2014 19:31:03 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, monnier <at> iro.umontreal.ca
Subject: 24.2; nlinum version 1.2 does not work correctly with indirect buffers
Date: Sat, 08 Feb 2014 11:30:48 -0800
This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgement at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':


    emacs24 -q
     ; substitute below path to your copy of nlinum:
    {esc}: (load "/home/mdl/elisp/nlinum") 
    
    {esc}x global-nlinum-mode {enter}
    {ctrl+x}b *scratch* {enter}
    
    {ctrl+x}4c
    
    Hit enter multiple times; observe that line numbers for the new
    lines appear in the original buffer but not the indirect buffer you
    are currently in.  This is a bug: line numbers should be present for
    every line in both buffers.
    
    Type some more text.  Same effect.
    
    Switch to the original buffer via {ctrl+x}o
    Insert some text here.  Note line numbers still missing in indirect buffer.




In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2013-11-24 on foil
Windowing system distributor `The Cygwin/X Project', version 11.0.11403000
Configured using:
 `configure '--prefix=/home/mdl/bin/emacs-24.2' '--without-gif''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  global-nlinum-mode: t
  nlinum-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
  line-number-mode: t
  transient-mark-mode: t

Recent input:
o t h e r SPC n i t o r SPC k SPC C-u 3 <escape> G 
<help-echo> <C-escape> C-: C-g <escape> : C-y <return> 
<help-echo> <escape> x C-y <return> <help-echo> <help-echo> 
<help-echo> C-x b C-y <return> C-x 4 c <return> <return> 
<return> <return> h e l l o <return> C-x o d f b h 
j <return> d k d <return> <down-mouse-1> <mouse-movement> 
<mouse-1> <escape> x b u g <tab> <escape> <backspace> 
C-g <escape> x b u g - <tab> <escape> <backspace> <escape> 
<backspace> r e p <tab> o <tab> r <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
scroll-up-command: End of buffer [3 times]
Quit
Loading /home/mdl/elisp/nlinum...done
t
Global-Nlinum mode enabled
Quit
Making completion list... [2 times]

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 regexp-opt rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils help-mode easymenu view cus-start cus-load
nlinum linum time-date tooltip ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image fringe 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 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#16692; Package emacs. (Sat, 08 Feb 2014 19:47:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: mdl <at> alum.mit.edu
Cc: 16692 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#16692: 24.2;
 nlinum version 1.2 does not work correctly with indirect buffers
Date: Sat, 08 Feb 2014 21:45:44 +0200
> From: Mark Lillibridge <mdl <at> alum.mit.edu>
> Date: Sat, 08 Feb 2014 11:30:48 -0800
> 
>     emacs24 -q
>      ; substitute below path to your copy of nlinum:
>     {esc}: (load "/home/mdl/elisp/nlinum") 
>     
>     {esc}x global-nlinum-mode {enter}
>     {ctrl+x}b *scratch* {enter}
>     
>     {ctrl+x}4c

(Whatever happened to the Emacs convention of specifying keystrokes?)

>     Hit enter multiple times; observe that line numbers for the new
>     lines appear in the original buffer but not the indirect buffer you
>     are currently in.  This is a bug: line numbers should be present for
>     every line in both buffers.

Stefan in help-gnu-emacs:

  My recommendation: stay away from indirect-buffers.
  They are an attractive-nuisance.

See

  http://lists.gnu.org/archive/html/help-gnu-emacs/2014-01/msg00575.html




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16692; Package emacs. (Sat, 08 Feb 2014 20:01:01 GMT) Full text and rfc822 format available.

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

From: Mark Lillibridge <mdl <at> alum.mit.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16692 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#16692: 24.2;
 nlinum version 1.2 does not work correctly with indirect buffers
Date: Sat, 08 Feb 2014 12:01:02 -0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>  Stefan in help-gnu-emacs:
>  
>    My recommendation: stay away from indirect-buffers.
>    They are an attractive-nuisance.
>  
>  See
>  
>    http://lists.gnu.org/archive/html/help-gnu-emacs/2014-01/msg00575.html

    Is there a good alternative for editing several places in the same
file at once?  E.g., a C++ header file with the class part with
declarations at the top and the inlined member definitions at the end of
the same file.  I find myself losing one of my places when I have to
switch to a different buffer and back again.

- Thanks,
  Mark




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16692; Package emacs. (Sat, 08 Feb 2014 20:14:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: mdl <at> alum.mit.edu
Cc: 16692 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#16692: 24.2;
 nlinum version 1.2 does not work correctly with indirect buffers
Date: Sat, 08 Feb 2014 22:13:16 +0200
> From: Mark Lillibridge <mdl <at> alum.mit.edu>
> Cc: 16692 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
> Date: Sat, 08 Feb 2014 12:01:02 -0800
> 
>     Is there a good alternative for editing several places in the same
> file at once?  E.g., a C++ header file with the class part with
> declarations at the top and the inlined member definitions at the end of
> the same file.  I find myself losing one of my places when I have to
> switch to a different buffer and back again.

There are various packages that allow saving and restoring positions,
starting with the mark ring and bookmarks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16692; Package emacs. (Sat, 08 Feb 2014 23:45:02 GMT) Full text and rfc822 format available.

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

From: Alp Aker <alptekin.aker <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mdl <at> alum.mit.edu, 16692 <at> debbugs.gnu.org
Subject: Re: bug#16692: 24.2; nlinum version 1.2 does not work correctly with
 indirect buffers
Date: Sat, 8 Feb 2014 18:44:47 -0500
[Message part 1 (text/plain, inline)]
> Is there a good alternative for editing several places in the same
> file at once?  E.g., a C++ header file with the class part with
> declarations at the top and the inlined member definitions at the end of
> the same file.  I find myself losing one of my places when I have to
> switch to a different buffer and back again.

You might want to try setting switch-to-buffer-preserve-window-point to t.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16692; Package emacs. (Tue, 18 Feb 2014 17:16:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Mark Lillibridge <mdl <at> alum.mit.edu>
Cc: 16692 <at> debbugs.gnu.org
Subject: Re: 24.2;
 nlinum version 1.2 does not work correctly with indirect buffers
Date: Tue, 18 Feb 2014 12:14:40 -0500
>     Hit enter multiple times; observe that line numbers for the new
>     lines appear in the original buffer but not the indirect buffer you
>     are currently in.  This is a bug: line numbers should be present for
>     every line in both buffers.
    
The core of the problem is that jit-lock relies on text-properties,
i.e. data shared between the indirect buffers, but is run "per buffer".
This can be seen also when you use two indirect buffers in different
major modes, where the font-lock behavior can be erratic, mixing the
rules of the different major modes.

I installed a patch which prevents activation of jit-lock in indirect
buffers.  In practice this means that nlinum-mode should now work
correctly in the base buffer but will not work at all in the
indirect buffer.
IOW, problem is still present but it fails more cleanly ;-)


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16692; Package emacs. (Sun, 23 Feb 2014 18:49:01 GMT) Full text and rfc822 format available.

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

From: Mark Lillibridge <mdl <at> alum.mit.edu>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 16692 <at> debbugs.gnu.org
Subject: Re: 24.2;
 nlinum version 1.2 does not work correctly with indirect buffers
Date: Sun, 23 Feb 2014 10:49:04 -0800
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>  >     Hit enter multiple times; observe that line numbers for the new
>  >     lines appear in the original buffer but not the indirect buffer you
>  >     are currently in.  This is a bug: line numbers should be present for
>  >     every line in both buffers.
>      
>  The core of the problem is that jit-lock relies on text-properties,
>  i.e. data shared between the indirect buffers, but is run "per buffer".
>  This can be seen also when you use two indirect buffers in different
>  major modes, where the font-lock behavior can be erratic, mixing the
>  rules of the different major modes.
>  
>  I installed a patch which prevents activation of jit-lock in indirect
>  buffers.  In practice this means that nlinum-mode should now work
>  correctly in the base buffer but will not work at all in the
>  indirect buffer.
>  IOW, problem is still present but it fails more cleanly ;-)

    Check.  Indirect buffers are horribly broken; so noted.  I will try
some of the other recommended methods of dealing with multiple edit
points in the same buffer.

- Mark




bug closed, send any further explanations to 16692 <at> debbugs.gnu.org and mdl <at> alum.mit.edu Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Mon, 24 Feb 2014 20:57:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16692; Package emacs. (Sat, 01 Mar 2014 19:56:02 GMT) Full text and rfc822 format available.

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

From: Mark Lillibridge <mdl <at> alum.mit.edu>
To: Alp Aker <alptekin.aker <at> gmail.com>
Cc: eliz <at> gnu.org, 16692 <at> debbugs.gnu.org
Subject: Re: bug#16692: 24.2; nlinum version 1.2 does not work correctly with
 indirect buffers
Date: Sat, 01 Mar 2014 11:57:05 -0800
Alp Aker <alptekin.aker <at> gmail.com> writes:

> > Is there a good alternative for editing several places in the same
> > file at once?  E.g., a C++ header file with the class part with
> > declarations at the top and the inlined member definitions at the end of
> > the same file.  I find myself losing one of my places when I have to
> > switch to a different buffer and back again.
> 
> You might want to try setting switch-to-buffer-preserve-window-point to t.

    When did this get added to Emacs?  The web claims version 24 but I
don't see it in version 24.2 ...

- Thanks,
  Mark




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16692; Package emacs. (Sat, 01 Mar 2014 20:05:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: mdl <at> alum.mit.edu
Cc: alptekin.aker <at> gmail.com, 16692 <at> debbugs.gnu.org
Subject: Re: bug#16692: 24.2;
 nlinum version 1.2 does not work correctly with indirect buffers
Date: Sat, 01 Mar 2014 22:04:01 +0200
> From: Mark Lillibridge <mdl <at> alum.mit.edu>
> Cc: eliz <at> gnu.org, 16692 <at> debbugs.gnu.org
> Date: Sat, 01 Mar 2014 11:57:05 -0800
> 
> 
> > You might want to try setting switch-to-buffer-preserve-window-point to t.
> 
>     When did this get added to Emacs?

In Emacs 24.3, according to NEWS.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 30 Mar 2014 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 84 days ago.

Previous Next


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