emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

goto-line trouble with narrowing


From: Robert J. Chassell
Subject: goto-line trouble with narrowing
Date: Thu, 26 Jan 2006 17:01:12 +0000 (UTC)

Today's GNU Emacs CVS snapshot, Thu, 2006 Jan 26  16:05 UTC
GNU Emacs 22.0.50.15 (i686-pc-linux-gnu, GTK+ Version 2.8.10) 
started with

     /usr/local/src/emacs/src/emacs -Q -D

In a narrowed region, `goto-line' goes to the widened buffer line (but
not outside the narrowed region) even though the Mode Line tells you
the narrowed line number.

For example, when the Mode Line shows L228,  and `what-line' says

    line 431 (narrowed line 228)

then `M-g M-g 228' (goto-line 228 nil) takes you to what is shown in
the Mode Line as L25.

However, in the same buffer widened, `M-g M-g 228' takes you to what
is shown in the Mode Line as L228

The defun for `goto-line' in emacs/lisp/simple.el specifically calls

    (widen)

on the buffer before moving to the specified line number.  I don't
know whether this is intended.

If it is intended, the documentation should be modified in
(emacs)Optional Mode Line

If not, the `widen' should be removed from the defun for `goto-line'.
As far as I can determine, this action is safe.

-- 
    Robert J. Chassell                         
    address@hidden                         GnuPG Key ID: 004B4AC8
    http://www.rattlesnake.com                  http://www.teak.cc




reply via email to

[Prev in Thread] Current Thread [Next in Thread]