unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@member.fsf.org>
Subject: Re: momentary-string-display
Date: Sun, 07 Jan 2007 09:41:15 -0500	[thread overview]
Message-ID: <uwt3yew6s.fsf@member.fsf.org> (raw)
In-Reply-To: <E1H3P0W-0001sr-5O@fencepost.gnu.org> (Richard Stallman's message of "Sat, 06 Jan 2007 22:47:40 -0500")

Richard Stallman <rms@gnu.org> writes:

> Does this code work?
>
> 	  ;; If that pushed message start off the screen,
> 	  ;; scroll to start it at the top of the screen.
> 	  (save-excursion
> 	    (move-to-window-line 0)
> 	    (if (> (point) pos)
> 		(goto-char pos)
> 	      (recenter 0)))

Yes.

And that is more elegant. I had rejected using 'save-excursion'
because I thought point had to move in the case where the scrolling
had to happen. But in fact it is only the window that needs to move,
and the window position is _not_ preserved by 'save-excursion'.

Hmm. I guess I thought the window position _was_ preserved by
'save-excursion'. But the doc for 'save-excursion' does not say that.

-- 
-- Stephe

  reply	other threads:[~2007-01-07 14:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-27  1:18 momentary-string-display Juanma Barranquero
2006-12-27 21:16 ` momentary-string-display Richard Stallman
2006-12-27 23:53   ` momentary-string-display Juanma Barranquero
2006-12-29 15:44     ` momentary-string-display Richard Stallman
2007-01-02 23:58       ` momentary-string-display Juanma Barranquero
2006-12-29  4:47   ` momentary-string-display Kevin Rodgers
2006-12-29 22:58     ` momentary-string-display Richard Stallman
2007-01-03  8:53       ` momentary-string-display Kevin Rodgers
2007-01-04  1:41         ` momentary-string-display Stephen Leake
2007-01-04  2:31         ` momentary-string-display Richard Stallman
2007-01-04 15:31           ` momentary-string-display Kevin Rodgers
2007-01-04 22:34             ` momentary-string-display Richard Stallman
2007-01-04 23:18               ` momentary-string-display Juanma Barranquero
2007-01-05 19:09                 ` momentary-string-display Richard Stallman
2007-01-05  7:05               ` momentary-string-display Stephen Leake
2007-01-06  2:54                 ` momentary-string-display Richard Stallman
2007-01-06  7:36                   ` momentary-string-display Stephen Leake
2007-01-07  3:47                     ` momentary-string-display Richard Stallman
2007-01-07 14:41                       ` Stephen Leake [this message]
2007-01-02 22:54   ` momentary-string-display Tak Ota
2007-01-03 21:11     ` momentary-string-display Richard Stallman
2007-01-03 21:36       ` momentary-string-display Tak Ota

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=uwt3yew6s.fsf@member.fsf.org \
    --to=stephen_leake@member.fsf.org \
    /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 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).