all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Juri Linkov <juri@linkov.net>
Cc: 70996@debbugs.gnu.org
Subject: bug#70996: project-find-file defaults
Date: Tue, 11 Jun 2024 23:04:52 +0300	[thread overview]
Message-ID: <f6cc22c6-a124-43dc-a1ea-1e4b4a3db4ec@gutov.dev> (raw)
In-Reply-To: <86bk47zbne.fsf@mail.linkov.net>

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.





  reply	other threads:[~2024-06-11 20:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-17  6:36 bug#70996: project-find-file defaults Juri Linkov
2024-05-28 16:32 ` Juri Linkov
2024-06-08  0:28 ` Dmitry Gutov
2024-06-09 16:51   ` Juri Linkov
2024-06-11  0:02     ` Dmitry Gutov
2024-06-11 16:58       ` Juri Linkov
2024-06-11 20:04         ` Dmitry Gutov [this message]
2024-06-12  0:11       ` Spencer Baugh
2024-06-12 13:52         ` Dmitry Gutov
2024-06-12 20:04           ` Dmitry Gutov
2024-06-14 17:00           ` Juri Linkov
2024-06-14 17:24             ` 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=f6cc22c6-a124-43dc-a1ea-1e4b4a3db4ec@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=70996@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /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.