From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 108ce84 2/2: xref--next-error-function: Move xref's window point Date: Wed, 28 Feb 2018 17:58:59 +0200 Message-ID: <62862fac-2397-8662-dcf8-a54a64a78745@yandex.ru> 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1519833436 7837 195.159.176.226 (28 Feb 2018 15:57:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Feb 2018 15:57:16 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 28 16:57:12 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 1er46S-0001ca-71 for ged-emacs-devel@m.gmane.org; Wed, 28 Feb 2018 16:57:12 +0100 Original-Received: from localhost ([::1]:45302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er48U-00010J-KW for ged-emacs-devel@m.gmane.org; Wed, 28 Feb 2018 10:59:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er48L-0000zV-Sl for emacs-devel@gnu.org; Wed, 28 Feb 2018 10:59:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er48H-0006AC-11 for emacs-devel@gnu.org; Wed, 28 Feb 2018 10:59:09 -0500 Original-Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:33187) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1er48G-00069G-OX; Wed, 28 Feb 2018 10:59:04 -0500 Original-Received: by mail-wm0-x236.google.com with SMTP id s206so26920810wme.0; Wed, 28 Feb 2018 07:59:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=mqEwC0Yk9l6//jqmqaf6Pqn38n2gfd4GKqnZP/pr46s=; b=nTAB9VmT0sex3HnPZxQU+VBgH1It739zt4sfe/uzfGfhXugqcjTE9qSuXJDzTjqLmO +x+zvAEJQ34KIToSvCFK3o9++FZtLTvRWODSxxmVoLsJcfiV+b9hzuN8uktd0XOb+Olc yfmjGh4GWvGlnVXjTjWGwow4dMyjqFSflrPLwyrymk6Mq+UTbFIpQ6QciTFlD3co3tX5 SHh16ZXHtPL/Aay+ytCBUuEKzaQ8X4/LocvOGKnjOoLdYIWT11K5v6kaNPQRELJrodBi LGGkhrW/DsjwBR23j9aE1cC4uMH4X5UIU/4OVweDQnwvocbs5Vw31FwppNAg4neLwvz7 4xCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mqEwC0Yk9l6//jqmqaf6Pqn38n2gfd4GKqnZP/pr46s=; b=sZHuBM3JrMG0Y8lwNUkO/fiY1IeIHxBj2pMUnIzOTAFJPY/im7l6CvGCbSIvk3JUv1 eWmE/A/Jv1seBVb2JMkN484ryl1y+hGbmNplNACvvewQPV0DorOOozjiu4HJtliEU6Oe x1PDi48GBJqIpQxPAeHqgnEVUeeFDowoTo1AQakLVSKZEhMJ8rrlzFxhMvAsKTXg7TgV L/n79cswtMlnOvtYEJ7HNARRiroDUQnlqmoIy54vbqnJ4yPEGXxaFFFf0sUdPE776ATz 56NJo1VMRFCzvj87OtzWaLUlASlrbeC+4EFuZGum11N6r8g01ueUD3BmCeAO6IBpBdu6 7xWg== X-Gm-Message-State: APf1xPCkVtGPex8kyl6WvqaKMvFZA2FJYiWSIiE7FZY8hak3IqaUMo9E J8aYAcFksGQ2+b7WcnI5QHFuTv66 X-Google-Smtp-Source: AG47ELtN7E5sricq8kGe8DvThApWz0Nh7jCgdGRA0P+BYhRZS8rECC/IHE3PwGSNQy8nRRKfcFEWUA== X-Received: by 10.28.136.74 with SMTP id k71mr9376647wmd.46.1519833542986; Wed, 28 Feb 2018 07:59:02 -0800 (PST) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id y64sm4640404wrb.56.2018.02.28.07.59.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2018 07:59:01 -0800 (PST) In-Reply-To: <83sh9lyvyj.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::236 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:223173 Archived-At: On 2/28/18 5:28 PM, Eli Zaretskii wrote: >>> branch: master >>> commit 108ce84432d597f92637ea74bd0a094224d157de >>> Author: Dmitry Gutov >>> Commit: Dmitry Gutov >>> >>> xref--next-error-function: Move xref's window point >>> >>> * lisp/progmodes/xref.el (xref--next-error-function): Move >>> xref's window point if it's visible. When we don't do that, >>> navigation can start looping after a while. > > 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. 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.