GNU bug report logs - #70996
project-find-file defaults

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Fri, 17 May 2024 06:53:01 UTC

Severity: normal

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 70996 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Juri Linkov <juri <at> linkov.net>
Cc: 70996 <at> debbugs.gnu.org
Subject: Re: bug#70996: project-find-file defaults
Date: Tue, 11 Jun 2024 23:04:52 +0300
On 11/06/2024 19:58, Juri Linkov wrote:
>> What's the main usage scenario for the buffer-file-name default? I recall
>> Spencer describing his workflow, but that seems only useful when you have
>> a lot of branches, checked out specifically into worktrees or similar, and
>> switch between them often (while explicitly staying in the "same" file
>> during a switch). Do you do something similar?
> I recall Spencer mentioned that 'C-x p f M-n' is the quickest way getting
> a file name relative to the project root for using it for external references.
> And I use the same case very often too.  (I mean the case of
> '(project--find-default-from buffer-file-name pr)').

Hmm, that sounds good and useful, but it's also, like, a secondary 
purpose - using a command's history while aborting the command itself.

To copy the relative file name, you also need to select it, right? 
Doesn't that mean that you will look at the minibuffer first?

Or do you do like C-x p f M-n C-h C-w automatically?

> OTOH, thing-at-point is too specific to a programming language,
> and can be used to navigate source code by placing point on
> an "include" directive with relative a file name, then
> 'C-x p f M-n M-n' will help to find the referenced file.
> This is a poor man's way for source code navigation, since 'M-.'
> doesn't support navigation by project relative file names.

Sometimes it does (certain backends), but indeed this is a way to visit 
an included file, for example. And here the core behavior (find-file) 
does get executed.




This bug report was last modified 1 year and 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.