unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16692: 24.2; nlinum version 1.2 does not work correctly with indirect buffers
@ 2014-02-08 19:30 Mark Lillibridge
  2014-02-08 19:45 ` Eli Zaretskii
  2014-02-18 17:14 ` Stefan Monnier
  0 siblings, 2 replies; 9+ messages in thread
From: Mark Lillibridge @ 2014-02-08 19:30 UTC (permalink / raw)
  To: 16692, monnier


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)





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

* bug#16692: 24.2; nlinum version 1.2 does not work correctly with indirect buffers
  2014-02-08 19:30 bug#16692: 24.2; nlinum version 1.2 does not work correctly with indirect buffers Mark Lillibridge
@ 2014-02-08 19:45 ` Eli Zaretskii
  2014-02-08 20:01   ` Mark Lillibridge
  2014-02-18 17:14 ` Stefan Monnier
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2014-02-08 19:45 UTC (permalink / raw)
  To: mdl; +Cc: 16692

> From: Mark Lillibridge <mdl@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





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

* bug#16692: 24.2; nlinum version 1.2 does not work correctly with indirect buffers
  2014-02-08 19:45 ` Eli Zaretskii
@ 2014-02-08 20:01   ` Mark Lillibridge
  2014-02-08 20:13     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Lillibridge @ 2014-02-08 20:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 16692


Eli Zaretskii <eliz@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





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

* bug#16692: 24.2; nlinum version 1.2 does not work correctly with indirect buffers
  2014-02-08 20:01   ` Mark Lillibridge
@ 2014-02-08 20:13     ` Eli Zaretskii
  2014-02-08 23:44       ` Alp Aker
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2014-02-08 20:13 UTC (permalink / raw)
  To: mdl; +Cc: 16692

> From: Mark Lillibridge <mdl@alum.mit.edu>
> Cc: 16692@debbugs.gnu.org, monnier@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.





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

* bug#16692: 24.2; nlinum version 1.2 does not work correctly with indirect buffers
  2014-02-08 20:13     ` Eli Zaretskii
@ 2014-02-08 23:44       ` Alp Aker
  2014-03-01 19:57         ` Mark Lillibridge
  0 siblings, 1 reply; 9+ messages in thread
From: Alp Aker @ 2014-02-08 23:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: mdl, 16692

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

> 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.

[-- Attachment #2: Type: text/html, Size: 476 bytes --]

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

* bug#16692: 24.2; nlinum version 1.2 does not work correctly with indirect buffers
  2014-02-08 19:30 bug#16692: 24.2; nlinum version 1.2 does not work correctly with indirect buffers Mark Lillibridge
  2014-02-08 19:45 ` Eli Zaretskii
@ 2014-02-18 17:14 ` Stefan Monnier
  2014-02-23 18:49   ` Mark Lillibridge
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2014-02-18 17:14 UTC (permalink / raw)
  To: Mark Lillibridge; +Cc: 16692

>     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





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

* bug#16692: 24.2; nlinum version 1.2 does not work correctly with indirect buffers
  2014-02-18 17:14 ` Stefan Monnier
@ 2014-02-23 18:49   ` Mark Lillibridge
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Lillibridge @ 2014-02-23 18:49 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 16692


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





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

* bug#16692: 24.2; nlinum version 1.2 does not work correctly with indirect buffers
  2014-02-08 23:44       ` Alp Aker
@ 2014-03-01 19:57         ` Mark Lillibridge
  2014-03-01 20:04           ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Lillibridge @ 2014-03-01 19:57 UTC (permalink / raw)
  To: Alp Aker; +Cc: 16692


Alp Aker <alptekin.aker@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





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

* bug#16692: 24.2; nlinum version 1.2 does not work correctly with indirect buffers
  2014-03-01 19:57         ` Mark Lillibridge
@ 2014-03-01 20:04           ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2014-03-01 20:04 UTC (permalink / raw)
  To: mdl; +Cc: alptekin.aker, 16692

> From: Mark Lillibridge <mdl@alum.mit.edu>
> Cc: eliz@gnu.org, 16692@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.





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

end of thread, other threads:[~2014-03-01 20:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-08 19:30 bug#16692: 24.2; nlinum version 1.2 does not work correctly with indirect buffers Mark Lillibridge
2014-02-08 19:45 ` Eli Zaretskii
2014-02-08 20:01   ` Mark Lillibridge
2014-02-08 20:13     ` Eli Zaretskii
2014-02-08 23:44       ` Alp Aker
2014-03-01 19:57         ` Mark Lillibridge
2014-03-01 20:04           ` Eli Zaretskii
2014-02-18 17:14 ` Stefan Monnier
2014-02-23 18:49   ` Mark Lillibridge

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).