GNU bug report logs -
#49905
xref-find-references doesn't change directory to match relative filenames
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Fri, 6 Aug 2021 00:12:01 UTC
Severity: normal
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49905 in the body.
You can then email your comments to 49905 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49905
; Package
emacs
.
(Fri, 06 Aug 2021 00:12:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Juri Linkov <juri <at> linkov.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 06 Aug 2021 00:12:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
>> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49905
; Package
emacs
.
(Fri, 06 Aug 2021 00:16:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 49905 <at> debbugs.gnu.org (full text, mbox):
On 06.08.2021 02:52, Juri Linkov wrote:
> 3. check that default-directory of the output*xref* buffer
> with relative file names is not project's root.
But does that lead to you not being able to visit the references by
pressing RET (or C-o)?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49905
; Package
emacs
.
(Fri, 06 Aug 2021 00:51:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 49905 <at> debbugs.gnu.org (full text, mbox):
>> 3. check that default-directory of the output*xref* buffer
>> with relative file names is not project's root.
>
> But does that lead to you not being able to visit the references by
> pressing RET (or C-o)?
No problem with RET and C-o, but e.g. using 'find-file-at-point'
on the file name fails to find the relative file name.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49905
; Package
emacs
.
(Fri, 06 Aug 2021 08:56:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 49905 <at> debbugs.gnu.org (full text, mbox):
On 06.08.2021 03:36, Juri Linkov wrote:
> No problem with RET and C-o, but e.g. using 'find-file-at-point'
> on the file name fails to find the relative file name.
Is that a real problem? Do you often use find-file-at-point in those
buffers?
Perhaps the way to solve it is to finally make the groups "clickable"
(as was requested at one point in that other report).
Changing default-directory to the project root might not be so easy: the
part of the code that know about the current project, and the one that
can be responsible for setting default-directory, are separate.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49905
; Package
emacs
.
(Tue, 10 Aug 2021 07:25:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 49905 <at> debbugs.gnu.org (full text, mbox):
>> No problem with RET and C-o, but e.g. using 'find-file-at-point'
>> on the file name fails to find the relative file name.
>
> Is that a real problem? Do you often use find-file-at-point in
> those buffers?
>
> Perhaps the way to solve it is to finally make the groups "clickable" (as
> was requested at one point in that other report).
>
> Changing default-directory to the project root might not be so easy: the
> part of the code that know about the current project, and the one that can
> be responsible for setting default-directory, are separate.
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.
Reply sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
You have taken responsibility.
(Fri, 13 Aug 2021 23:56:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Juri Linkov <juri <at> linkov.net>
:
bug acknowledged by developer.
(Fri, 13 Aug 2021 23:56:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 49905-done <at> debbugs.gnu.org (full text, mbox):
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.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 11 Sep 2021 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 279 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.