unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <62862fac-2397-8662-dcf8-a54a64a78745@yandex.ru> (raw)
In-Reply-To: <83sh9lyvyj.fsf@gnu.org>

On 2/28/18 5:28 PM, Eli Zaretskii wrote:

>>> branch: master
>>> commit 108ce84432d597f92637ea74bd0a094224d157de
>>> Author: Dmitry Gutov <dgutov@yandex.ru>
>>> Commit: Dmitry Gutov <dgutov@yandex.ru>
>>>
>>>       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.



  reply	other threads:[~2018-02-28 15:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180228020456.19376.79157@vcs0.savannah.gnu.org>
     [not found] ` <20180228020457.59950207B1@vcs0.savannah.gnu.org>
2018-02-28  2:13   ` [Emacs-diffs] master 108ce84 2/2: xref--next-error-function: Move xref's window point Dmitry Gutov
2018-02-28 15:28     ` Eli Zaretskii
2018-02-28 15:58       ` Dmitry Gutov [this message]
2018-03-02 13:39         ` Eli Zaretskii
2018-03-02 14:10           ` Dmitry Gutov
2018-03-02 14:50             ` Eli Zaretskii
2018-03-03  0:49               ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62862fac-2397-8662-dcf8-a54a64a78745@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).