all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: sbaugh@catern.com, 53626@debbugs.gnu.org
Subject: bug#53626: 28.0.91; project-find-regexp (C-x p g) twice results in searching different projects
Date: Thu, 3 Feb 2022 05:15:40 +0200	[thread overview]
Message-ID: <ad34d832-d4df-b6bb-f76f-34bfed528017@yandex.ru> (raw)
In-Reply-To: <87wnii73x5.fsf@catern.com>

Hi!

On 29.01.2022 21:11, sbaugh@catern.com wrote:
> An existing*xref*  buffer doesn't have its default-directory changed
> when running project-find-regexp.  Since project-find-regexp switches to
> *xref*, that means running project-find-regexp twice in a row may search
> two different projects, which is unexpected.
> 
> Steps to reproduce:
> 
> With buffers in two different projects as detected by project.el, do the
> following sequence:
> 
> 1. Switch to a buffer in project A
> 
> 2. project-find-regexp, which will search project A, and create and
> switch to an*xref*  buffer with a default-directory pointing at the
> project root of A
> 
> 3. project-find-regexp again, which will search project A again. (This
> is the desired behavior)
> 
> 4. Switch to a buffer in project B
> 
> 5. project-find-regexp, which will search project B and switch to the
> existing*xref*  buffer (which is still pointing at project A)
> 
> 6. project-find-regexp again, which will search project A instead of B.
> 
> Suggested fix:
> 
> Change project-find-regexp to reset the default-directory of the*xref*
> buffer used to the most recently used project root.

This sounds like something that was fixed in commit b99848c72cb2570c 
(meaning, about a year ago).

I have tried to quickly reproduce this in my build from master, and 
hadn't managed to.

How recent is Emacs that you're trying this in? Do you perhaps have an 
older version of project.el or xref installed through ELPA?

Or did you maybe use project-switch-project, doing a search from its 
menu, like Sean seems to be hinting?





  parent reply	other threads:[~2022-02-03  3:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-29 19:11 bug#53626: 28.0.91; project-find-regexp (C-x p g) twice results in searching different projects sbaugh
2022-01-30  6:28 ` Sean Whitton
2022-02-03 14:00   ` Dmitry Gutov
2022-02-03 15:19     ` Sean Whitton
2022-02-03 15:41       ` Dmitry Gutov
2022-02-03 23:16         ` Sean Whitton
2022-02-04  2:07           ` Dmitry Gutov
2022-02-04  2:32   ` Dmitry Gutov
2022-02-04  5:32     ` Sean Whitton
2022-02-07  3:12       ` Dmitry Gutov
2022-02-21  1:55         ` Dmitry Gutov
2022-02-21 23:00           ` Sean Whitton
2022-02-21 23:14             ` Dmitry Gutov
2022-02-22 23:09               ` Sean Whitton
2022-02-23  1:45                 ` Dmitry Gutov
2022-02-23  1:55           ` Dmitry Gutov
2022-02-23  5:36             ` Sean Whitton
2022-02-23 11:41               ` Dmitry Gutov
2022-02-03  3:15 ` Dmitry Gutov [this message]
2022-02-03 13:28   ` Spencer Baugh
2022-02-03 13:58     ` 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

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

  git send-email \
    --in-reply-to=ad34d832-d4df-b6bb-f76f-34bfed528017@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=53626@debbugs.gnu.org \
    --cc=sbaugh@catern.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.