unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: juri@jurta.org, gergely@risko.hu, emacs-devel@gnu.org
Subject: Re: find-file-hook, recenter, scroll-conservatively and save-place
Date: Thu, 31 Jan 2019 16:32:17 +0200	[thread overview]
Message-ID: <83y370zymm.fsf@gnu.org> (raw)
In-Reply-To: <5C52FCDD.7010803@gmx.at> (message from martin rudalics on Thu, 31 Jan 2019 14:49:17 +0100)

> Date: Thu, 31 Jan 2019 14:49:17 +0100
> From: martin rudalics <rudalics@gmx.at>
> Cc: Juri Linkov <juri@jurta.org>
> 
> Juri, should we handle this somehow?  That is, provide 'window-point'
> and 'window-start' action alist entries with the former allowing the
> 'switch-to-buffer-preserve-window-point' logic (among others) and the
> latter optionally allowing to recenter.

How would you compute window-start in this case so that point is
centered?

> I don't know how 'save-place' could pass these on to the
> 'pop-to-buffer' call in 'find-file' though.  Can you think of any
> other use cases where these would be helpful?

save-place installs a find-file-hook, which simply calls goto-char.
All this happens before pop-to-buffer is called.



  reply	other threads:[~2019-01-31 14:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31  9:46 find-file-hook, recenter, scroll-conservatively and save-place Gergely Risko
2019-01-31 13:46 ` Gergely Risko
2019-01-31 14:43   ` Eli Zaretskii
2019-01-31 15:31     ` Gergely Risko
2019-01-31 13:49 ` martin rudalics
2019-01-31 14:32   ` Eli Zaretskii [this message]
2019-01-31 18:44     ` martin rudalics
2019-01-31 23:47       ` Gergely Risko
2019-02-01  9:05         ` martin rudalics
2019-01-31 20:57   ` Juri Linkov
2019-01-31 22:45     ` Gergely Risko
2019-02-01  9:05       ` martin rudalics
2019-02-02 21:03       ` Juri Linkov
2019-02-03 20:18         ` Juri Linkov
2019-02-01  9:04     ` martin rudalics
2019-02-01 11:18       ` Gergely Risko
2019-02-02  9:30         ` martin rudalics

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=83y370zymm.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=gergely@risko.hu \
    --cc=juri@jurta.org \
    --cc=rudalics@gmx.at \
    /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).