From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: find-file-hook, recenter, scroll-conservatively and save-place Date: Thu, 31 Jan 2019 16:32:17 +0200 Message-ID: <83y370zymm.fsf@gnu.org> References: <877eelupkc.fsf@errge.nilcons.com> <5C52FCDD.7010803@gmx.at> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="44178"; mail-complaints-to="usenet@blaine.gmane.org" Cc: juri@jurta.org, gergely@risko.hu, emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 31 15:33:31 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gpDPG-000BLy-5d for ged-emacs-devel@m.gmane.org; Thu, 31 Jan 2019 15:33:30 +0100 Original-Received: from localhost ([127.0.0.1]:55769 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpDPF-0003h6-6M for ged-emacs-devel@m.gmane.org; Thu, 31 Jan 2019 09:33:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpDOC-0003du-EN for emacs-devel@gnu.org; Thu, 31 Jan 2019 09:32:25 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:32881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpDOB-00047Y-Fi; Thu, 31 Jan 2019 09:32:23 -0500 Original-Received: from [176.228.60.248] (port=4314 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gpDOB-0008U7-2u; Thu, 31 Jan 2019 09:32:23 -0500 In-reply-to: <5C52FCDD.7010803@gmx.at> (message from martin rudalics on Thu, 31 Jan 2019 14:49:17 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232860 Archived-At: > Date: Thu, 31 Jan 2019 14:49:17 +0100 > From: martin rudalics > Cc: Juri Linkov > > 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.