Subject: bug#49905: closed (Re: bug#49905: xref-find-references doesn't change directory to match relative filenames)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 13 Aug 2021 23:56:01 +0000

Your bug report

#49905: xref-find-references doesn't change directory to match relative filenames

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
49905: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49905
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#49905: xref-find-references doesn't change directory to match relative filenames
From: Dmitry Gutov <[email-masked]>
To: Juri Linkov <[email-masked]>
Cc: [email-masked]
Date: Sat, 14 Aug 2021 02:55:37 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

On 10.08.2021 10:10, Juri Linkov wrote:
> I thought the fix could be just adding setting default-directory in the
> right place.  But if this is not easy then please close this request
> since I don't use find-file-at-point often.

Yes. Sorry.

Subject: xref-find-references doesn't change directory to match relative filenames
From: Juri Linkov <[email-masked]>
To: [email-masked]
Date: Fri, 06 Aug 2021 02:52:57 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

>> I have the same problem.  When calling xref-find-references
>> from a subdirectory, not from the project root, it creates
>> an*xref*  buffer where file names are relative to the
>> project root (when xref-file-name-display is 'project-relative'),
>> but the default directory is not the project root.
>> So using file-at-point fails to find the relative file.
>
> That sounds different. Could you file a separate report with exact
> reproduction steps? Try to make sure you're using the latest master first
> (I fixed bug ~like that a couple of months ago).
>
> FWIW, I'm cannot reproduce.

Why not?  Here is the reproduction steps:

0. run `emacs -Q`
1. open xref.el
2. type 'M-? xref-find-references RET'
3. check that default-directory of the output *xref* buffer
   with relative file names is not project's root.