bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49204: 28.0.50; How to create new file in project by project-find-fi


From: Dmitry Gutov
Subject: bug#49204: 28.0.50; How to create new file in project by project-find-file
Date: Sun, 18 Jul 2021 03:46:25 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 05.07.2021 07:03, Giap Tran wrote:
On 7/4/21 8:07 AM, Dmitry Gutov wrote:
But I suppose an override for project--completing-read-strict might require less code, if you still want to retain the "completion from relative names" part of behavior from project--read-file-cpd-relative.

The flip side is someday you might have to deal with breakage when we have to make a change to project--completing-read-strict (which is a "private" function) or stop using it.

Let me know which approach you choose in the end, and how it works out.

Ya, I'm overriding project--completing-read-strict. It looks good to me.

Excellent.

As I see I still can use find a file at point by M-n. So don't understand why you said we can not use find file at point anymore if we set REQUIRE-MATCH is nil

Right, but then if you press RET, the file will be created.

If, for example, the text around point is 'compile.el', and you call project-find-file and press RET right away, you're not going to visit (or create) a file named 'compile.el' in the project root, you're going to see the list filered with 'compile.el' as initial-input instead.

Perhaps we should change the above workflow to be more "standard", but IIRC the existing one was requested to be this way, and has received surprisingly little complaints over the years.

Do you want this file to exist, right? IMO, If file is not exist
we can know it by look at minibuffer.

How can we know? Do you mean that it tells you that by asking to confirm after you press RET?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]