GNU bug report logs -
#49865
28.0.50; Customize project-find-file without thing-at-pont
Previous Next
Reported by: Manuel Uberti <manuel.uberti <at> inventati.org>
Date: Wed, 4 Aug 2021 06:17:01 UTC
Severity: minor
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 49865 <at> debbugs.gnu.org (full text, mbox):
Manuel Uberti <manuel.uberti <at> inventati.org> writes:
> when I use project-find-file it always picks up the thing at point
> even when it is something I am pretty sure that does not correspond to
> a filename, which, in my case, is all the times.
>
> I see that in project.el, project-find-file uses project-find-file-in:
>
> ;;;###autoload
> (defun project-find-file ()
> "Visit a file (with completion) in the current project.
>
> The completion default is the filename at point, determined by
> `thing-at-point' (whether such file exists or not)."
> (interactive)
> (let* ((pr (project-current t))
> (dirs (list (project-root pr))))
> (project-find-file-in (thing-at-point 'filename) dirs pr)))
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?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 352 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.