From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: find-file-hook, recenter, scroll-conservatively and save-place Date: Thu, 31 Jan 2019 14:49:17 +0100 Message-ID: <5C52FCDD.7010803@gmx.at> References: <877eelupkc.fsf@errge.nilcons.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="135948"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Juri Linkov To: Gergely Risko , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 31 14:53:16 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 1gpCmJ-000ZEl-Pn for ged-emacs-devel@m.gmane.org; Thu, 31 Jan 2019 14:53:15 +0100 Original-Received: from localhost ([127.0.0.1]:55217 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpCmI-0000xf-Rc for ged-emacs-devel@m.gmane.org; Thu, 31 Jan 2019 08:53:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpCjK-0007Ot-Ce for emacs-devel@gnu.org; Thu, 31 Jan 2019 08:50:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpCjE-0004kY-O8 for emacs-devel@gnu.org; Thu, 31 Jan 2019 08:50:10 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:44503) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpCjE-0004kM-F5 for emacs-devel@gnu.org; Thu, 31 Jan 2019 08:50:04 -0500 Original-Received: from [192.168.1.101] ([212.95.5.162]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Luajs-1hFMRE2WpM-00zlIH; Thu, 31 Jan 2019 14:49:28 +0100 In-Reply-To: <877eelupkc.fsf@errge.nilcons.com> X-Provags-ID: V03:K1:8+jaRGcb0uKdaQfu2LID0aZnY4ITt0OlQhMwlc4jRg9xJTEyvff tJUK2+Kak//Ow6IgBx1ZkvfGZI+KIeCaZ8t8BKrEzq1/I19s5gRZatRd/QotbRl8prPGF9S ojt2wbnI2OqbPGY85rJajMAbu6RvoLqeM/1vNh9BFFac2CuL02VJ8Ivkz9FBgI5GI0ZC+Lj AQtPJ4hl976sX0mub1+5w== X-UI-Out-Filterresults: notjunk:1;V03:K0:2/zAKSYZJ8w=:ZamCd/IjGKHETaOIqsqn+f 7YBHSrXmqchSzR68+x4PO0616jq1lyYp2SAy4qMOuixXrqF0tl7DSfGSGFjgXAfoOGv050od1 7jR1K9wKfacmN/VeFyJpRN+q4QFhoKfdvhac5fS/KS4pJVSzfsGo8Cb1BmOLMlv9clAblDzaz hHAn85lUhzjSa6va1m9HsNJzQAdyE8F+fqsfvF1CJo87anG4HG9eLoj/Ar1SJziLlwbKvl0ZW 4viu99eDrdi0mANYAYnRfqcakDxaYhJJcCbSP6NMpKg4Yf2AU6fDQLFHg1WYahK1qRzXIoMfw 5o3ByX4JVu+TBXjRuEVoRwoNmJ+IGvSuVynUejjOoCTQ1nVo6bI+sLgdW9sYHvDDtODoOmWWr j0nQvr7X5CswT+5eQmRsb99jd0wr7oFW/GFvtwlRp+9+IV+SQTci/i4eeAHjaFdyFZpQ44oyD 4465Fv+qPhrqSkYsAytjvlZCsLVAkIo8AAwjnCJPVeFfRWEyu7wArUrpqDDTJo9ap4LNR4piB ICeMhIQJfX5fjHMUS3PcHB0AhGac/KDccYSGzSKZ4jwKO1GJMOFCrjmqVuJD2/4FQRiRLSBuR XBBtXDP2DnVMeI5hLjuvIXDxMQ9yHH8ZcC5cbJ6RiwdRHTjr14rPynXgV1/bCyXjng9r9yEKV ETPnys1QzVNtHi5qPw0Rwgd2K5vFdqwh1YZTyHpZrT1DbWrl5nnD7DqCXsx0oyigpP7kTOSRM NhQcWiaByj3ybR21Le0UVGWbqykqBUl9TelcJziDClE2sF0rO+4kO4fDl3vcOnMF4m9Z3xwO X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 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:232859 Archived-At: > My question: is there a better hook that we could use for save-place > restoration purposes? > > I also looked into xref, and there the behavior is much better: the > (recenter) is included in the default configuration of > xref-after-jump-hook and it works in all the scenarios that I have > tried. 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. 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? martin