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 19:44:22 +0100 Message-ID: <5C534206.7020100@gmx.at> References: <877eelupkc.fsf@errge.nilcons.com> <5C52FCDD.7010803@gmx.at> <83y370zymm.fsf@gnu.org> 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="118042"; mail-complaints-to="usenet@blaine.gmane.org" Cc: juri@jurta.org, gergely@risko.hu, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 31 19:51:19 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 1gpHQl-000Udu-3Z for ged-emacs-devel@m.gmane.org; Thu, 31 Jan 2019 19:51:19 +0100 Original-Received: from localhost ([127.0.0.1]:59293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpHQk-0001t8-2Y for ged-emacs-devel@m.gmane.org; Thu, 31 Jan 2019 13:51:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpHKn-00061q-LT for emacs-devel@gnu.org; Thu, 31 Jan 2019 13:45:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpHKm-00047y-GY for emacs-devel@gnu.org; Thu, 31 Jan 2019 13:45:09 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:41157) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpHKm-000461-5k; Thu, 31 Jan 2019 13:45:08 -0500 Original-Received: from [192.168.1.101] ([212.95.5.162]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lxgt9-1hCmSp01Sl-017DDD; Thu, 31 Jan 2019 19:44:32 +0100 In-Reply-To: <83y370zymm.fsf@gnu.org> X-Provags-ID: V03:K1:6Z64JPNegDtlwOG97Az6MiTQhXn1jQfOUJ/PbMMjAuK7hxs9nUa M2qNWuDwV4sTSBqn6vUl8YTH5rpqolSlGo0AMC//xuKNBBwVUAql1Z2BJWSax7wb2vw+R7I 7/peSMLYG2/V3T3ErdnI3ZRXu9GkD7s5a1/sjTHwzdchYZ9N6Jvg4T3wXVtLChizMUSvNqk HZ2Jp/CcyMlHE7pphsw4g== X-UI-Out-Filterresults: notjunk:1;V03:K0:OIAVMk6Grp0=:oeBsDUH2cpBMwIZ94fNjwu eqZOdk2QLJBjMJHG+K8Kd36NuooLO4ddhXy80Zh8bhxvYdyuQ1Wa5ldX2CPskOCKnS4amk3vD 399Dt5e+NxzZHUG02nNtxrKyEVho78b0uMYc1rDjRugkwYMwsDIN/lw9ROHqSVJYpQiAotKvJ d4l57yHH55wnrx0xxU0hCmTKge+znE2iDQ6oPF4x5zp90QfuxU22hkonV1uec0byBWH1Yf3gR AtH3LgWzbQq+LW1ligYlPS3DX8lklTzp9mBb8Nk14NfM9k6qfwVf2sXgiQ5OqvbnvV+M/XE6U UdouaSwmg9gRNvsyAVtRgw+Ox9CFggvkoLY3D/6UHVTvUBJ3fCHfByTpjjEW5cOSoM+cQ7tUF hr7TBU55Le2CneKeSfH4wVxavmpZGqRGrB/8Vvdlp2pqL3liFb4J6bKVB4JQWzC+EPKKM94qH x2W2et4pFmZV3ROKUxqhasQDUS9MsX27eta/ftNFbDPulEeOKs655xQf7lHmiEFtDnFeqJ8/5 ga2BJvhMVECE2uH6meeiSITqvf3GPrQKO+oYLk7PD3CJP3tr1sffGu6keCZp2FxWsLBxGO4wz cs/RIc5LnMGNfvz3JFZsFBZV5EHMwjUSvX4RxYclD7gkSPVszXmx9KP79tLlDTRm+khEmxOaa KqP3jgVcTfko0aD0PQhdxl1opky9wJxIqsp17YIugF5NSG/MqmWUzRvMDa+C/QOY7Gx+JrABd A0YyqfZCGNgxYZnSJldQ3ocY8Gu/bN9BlOG/FQ7B6ZbbLg6laI+Ab8Kuwm1Es7SkOEj1wsut X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.18 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:232866 Archived-At: >> 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? When 'display-buffer' finds a '(window-start . recenter) ALIST entry it would call 'recenter' after assigning the window buffer. >> 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. Which probably means that no 'window-point' entry is needed - '(window-point . nil) would mean to use the buffer's point as window-point. martin