From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 108ce84 2/2: xref--next-error-function: Move xref's window point Date: Fri, 02 Mar 2018 15:39:29 +0200 Message-ID: <83fu5iwq9a.fsf@gnu.org> References: <20180228020456.19376.79157@vcs0.savannah.gnu.org> <20180228020457.59950207B1@vcs0.savannah.gnu.org> <1528a8cd-493c-4219-6eb3-693a28aca5a5@yandex.ru> <83sh9lyvyj.fsf@gnu.org> <62862fac-2397-8662-dcf8-a54a64a78745@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1519997850 28369 195.159.176.226 (2 Mar 2018 13:37:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 2 Mar 2018 13:37:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 02 14:37:25 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1erksG-0006as-FQ for ged-emacs-devel@m.gmane.org; Fri, 02 Mar 2018 14:37:24 +0100 Original-Received: from localhost ([::1]:35055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erkuH-0000V1-Ic for ged-emacs-devel@m.gmane.org; Fri, 02 Mar 2018 08:39:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erku8-0000TR-RA for emacs-devel@gnu.org; Fri, 02 Mar 2018 08:39:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erku5-0005CT-Kk for emacs-devel@gnu.org; Fri, 02 Mar 2018 08:39:20 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erku5-0005CF-Gv; Fri, 02 Mar 2018 08:39:17 -0500 Original-Received: from [176.228.60.248] (port=2387 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1erku4-00021j-LK; Fri, 02 Mar 2018 08:39:17 -0500 In-reply-to: <62862fac-2397-8662-dcf8-a54a64a78745@yandex.ru> (message from Dmitry Gutov on Wed, 28 Feb 2018 17:58:59 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:223218 Archived-At: > Cc: emacs-devel@gnu.org > From: Dmitry Gutov > Date: Wed, 28 Feb 2018 17:58:59 +0200 > > > Sorry, this doesn't tell which problem(s) it attempts to fix, and > > there are no references to discussions or bug reports that could help > > me figure that out. Without that, I cannot make up my mind about the > > importance of this fix. > > next-error can misbehave (resume from an earlier position) after several > invocations when next-error-last-buffer is an xref buffer, and that > buffer is visible. > > Try: > > 1. cd .../emacs/source/dir > 2. emacs -Q > 3. M-x project-find-regexp RET It is not necessary to RET > (The searches for "It is not necessary to", which only occurs in .el files). > 4. M-x next-error, do that a few times. Make sure *xref* is still > visible (otherwise, you need to tweak the split-threshold variables). > 5. Select the window showing the xref buffer, then go back to where you > were (by typing 'C-x o' a couple of times). > 6. M-x next-error will return to the beginning. Or, if the window point > of the xref window is not at the first line, start over from there. Is this due to switch-to-buffer-preserve-window-point being t by default now? > The reason I figured it's urgent, is step 5 is not necessary with my > work configuration (not 'emacs -Q'). It's hard for me to tell now which > package/setting/timer has this effect, but it seems reasonable to > believe that some other users will see this too. Essentially, the code > in emacs-26 currently relies on "undefined behavior", in C terms. I'm not sure I see where does "undefined behavior" come from.