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

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

bug#44297: [Feature request] project.el: Additional utility functions


From: Dmitry Gutov
Subject: bug#44297: [Feature request] project.el: Additional utility functions
Date: Fri, 30 Oct 2020 19:42:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 30.10.2020 09:23, Juri Linkov wrote:
I think the term is pretty much established:
https://www.emacswiki.org/emacs/FindOtherFile

Projectile also has a command with a similar name.

Then the name 'other-file' is fine.

The feature will be pretty C/C++-centric, but I suppose it's useful enough.

It's also useful with Web development: while VueJS can keep parts of
components in one file .vue, other frameworks require 3 different files:
file.html, file.js and file.css.

OK.

How will we choose among multiple files when there are more than 2? Completing read on the file extension? Or just rotate among the files in a pre-defined order?

A fuzzy search across full names works best for me, personally. We could
also try some differently weighted, fuzzy matching styles.

I don't know if the required completion can be part of a fuzzy search,
but it should show exactly the same completions as the current command
(with directory and file names), but should match only on file name parts,
not on directory name parts, e.g. with files:

   dirname/filename1 dirname/file2

typing "name" for completions should show only "dirname/filename1",
because most of the time, project directory names get in the way
when searching for a file by its name, and part of file name matches
directory names with many other unrelated files.

So... suppose the user types out a file name in full and sees several matches (in different directories). What happens then?

project-recentf: completing-read recently-accessed files in the project
All project file-reading commands could provide a list of recent files
as the default values available via M-n key presses.

Perhaps a flat, immediately visible list will have its own value, though?

Sorted by recency?

Yup.





reply via email to

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