all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#49905: xref-find-references doesn't change directory to match relative filenames
@ 2021-08-05 23:52 Juri Linkov
  2021-08-06  0:14 ` Dmitry Gutov
  0 siblings, 1 reply; 6+ messages in thread
From: Juri Linkov @ 2021-08-05 23:52 UTC (permalink / raw)
  To: 49905

>> 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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#49905: xref-find-references doesn't change directory to match relative filenames
  2021-08-05 23:52 bug#49905: xref-find-references doesn't change directory to match relative filenames Juri Linkov
@ 2021-08-06  0:14 ` Dmitry Gutov
  2021-08-06  0:36   ` Juri Linkov
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2021-08-06  0:14 UTC (permalink / raw)
  To: Juri Linkov, 49905

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)?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#49905: xref-find-references doesn't change directory to match relative filenames
  2021-08-06  0:14 ` Dmitry Gutov
@ 2021-08-06  0:36   ` Juri Linkov
  2021-08-06  8:55     ` Dmitry Gutov
  0 siblings, 1 reply; 6+ messages in thread
From: Juri Linkov @ 2021-08-06  0:36 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 49905

>> 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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#49905: xref-find-references doesn't change directory to match relative filenames
  2021-08-06  0:36   ` Juri Linkov
@ 2021-08-06  8:55     ` Dmitry Gutov
  2021-08-10  7:10       ` Juri Linkov
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2021-08-06  8:55 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 49905

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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#49905: xref-find-references doesn't change directory to match relative filenames
  2021-08-06  8:55     ` Dmitry Gutov
@ 2021-08-10  7:10       ` Juri Linkov
  2021-08-13 23:55         ` Dmitry Gutov
  0 siblings, 1 reply; 6+ messages in thread
From: Juri Linkov @ 2021-08-10  7:10 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 49905

>> 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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#49905: xref-find-references doesn't change directory to match relative filenames
  2021-08-10  7:10       ` Juri Linkov
@ 2021-08-13 23:55         ` Dmitry Gutov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2021-08-13 23:55 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 49905-done

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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-13 23:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-05 23:52 bug#49905: xref-find-references doesn't change directory to match relative filenames Juri Linkov
2021-08-06  0:14 ` Dmitry Gutov
2021-08-06  0:36   ` Juri Linkov
2021-08-06  8:55     ` Dmitry Gutov
2021-08-10  7:10       ` Juri Linkov
2021-08-13 23:55         ` Dmitry Gutov

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.