From: Dmitry Gutov <dgutov@yandex.ru>
To: Lars Ingebrigtsen <larsi@gnus.org>,
Manuel Uberti <manuel.uberti@inventati.org>
Cc: 49865@debbugs.gnu.org
Subject: bug#49865: 28.0.50; Customize project-find-file without thing-at-pont
Date: Fri, 6 Aug 2021 03:51:13 +0300 [thread overview]
Message-ID: <87c8db5b-514a-7f7f-e71d-3044bf05a4c9@yandex.ru> (raw)
In-Reply-To: <874kc5ehca.fsf@gnus.org>
Hi Lars,
On 04.08.2021 11:37, Lars Ingebrigtsen wrote:
> This reminded me that I've been meaning to add a thing-at-point target
> that is like `filename', but returns nil if the file named doesn't
> exist, so I've now done this in Emacs 28.
>
> Perhaps project.el should use it here?
I don't know if it will be the best choice here.
First of all, we already have the hook file-name-at-point-functions,
which is consulted by read-file-name--defaults. So one can already e.g.
move point to some existing file name, press C-x C-f M-n and with the
power of the ffap package have the file name inserted.
But when we're completing project-wide, there will also be references
that are not relative to the current directory (and instead relate to
some project-configured path). Like
#include "stuff/thingy.h"
or
require 'actor/abc'
...where the string is both not relative to the current dir and is
missing the extension.
ffap actually includes support for this, like having
(require 'cl-lib)
be recognized as '.../lisp/emacs-lisp/cl-lib.el', but it only works for
a limited set of languages, and OOTB only for Elisp (for all others you
need to configure variables like ffap-c++-path).
next prev parent reply other threads:[~2021-08-06 0:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-04 6:16 bug#49865: 28.0.50; Customize project-find-file without thing-at-pont Manuel Uberti
2021-08-04 8:37 ` Lars Ingebrigtsen
2021-08-04 8:37 ` Lars Ingebrigtsen
2021-08-04 9:07 ` Manuel Uberti
2021-08-06 0:51 ` Dmitry Gutov [this message]
2021-08-06 0:36 ` Dmitry Gutov
2021-08-06 5:27 ` Manuel Uberti
2021-08-06 8:45 ` Dmitry Gutov
2021-08-06 8:51 ` Manuel Uberti
2021-08-06 10:40 ` Lars Ingebrigtsen
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=87c8db5b-514a-7f7f-e71d-3044bf05a4c9@yandex.ru \
--to=dgutov@yandex.ru \
--cc=49865@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=manuel.uberti@inventati.org \
/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.