all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Robert J. Chassell" <bob@rattlesnake.com>
Cc: bob@rattlesnake.com
Subject: goto-line trouble with narrowing
Date: Thu, 26 Jan 2006 17:01:12 +0000 (UTC)	[thread overview]
Message-ID: <m1F2AUi-0004QMC@rattlesnake.com> (raw)

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

             reply	other threads:[~2006-01-26 17:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-26 17:01 Robert J. Chassell [this message]
2006-01-27 22:32 ` goto-line trouble with narrowing 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1F2AUi-0004QMC@rattlesnake.com \
    --to=bob@rattlesnake.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.