unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* goto-line trouble with narrowing
@ 2006-01-26 17:01 Robert J. Chassell
  2006-01-27 22:32 ` Richard M. Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Robert J. Chassell @ 2006-01-26 17:01 UTC (permalink / raw)
  Cc: bob

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                         
    bob@rattlesnake.com                         GnuPG Key ID: 004B4AC8
    http://www.rattlesnake.com                  http://www.teak.cc

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

end of thread, other threads:[~2006-02-01  7:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-26 17:01 goto-line trouble with narrowing Robert J. Chassell
2006-01-27 22:32 ` Richard M. Stallman
2006-01-28 19:14   ` Robert J. Chassell
2006-01-30  0:56     ` Richard M. Stallman
2006-01-30 16:57   ` Kevin Rodgers
2006-01-30 18:48     ` Kevin Rodgers
2006-01-30 19:57       ` Johan Bockgård
2006-01-31 19:53         ` Kevin Rodgers
2006-02-01  7:52           ` Johan Bockgård
2006-01-30 22:31     ` Lennart Borgman
2006-01-31 18:06       ` Richard M. Stallman

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