From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#44297: [Feature request] project.el: Additional utility functions Date: Fri, 30 Oct 2020 09:23:09 +0200 Organization: LINKOV.NET Message-ID: <87o8kkdwa6.fsf@mail.linkov.net> References: <1785587458.69035.1603939939547@ichabod.co-bxl> <871rhhv4q8.fsf@mail.linkov.net> <64182b62-dad4-08db-379b-acfddea26327@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35921"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 44297@debbugs.gnu.org, leungbk@mailfence.com To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 30 08:30:28 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYOrj-0009E3-Qp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 08:30:27 +0100 Original-Received: from localhost ([::1]:35402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYOri-0001iD-SJ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 03:30:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYOqM-0000Xa-EF for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 03:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44385) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYOqM-0003X2-4t for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 03:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYOqM-0006tr-22 for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 03:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Oct 2020 07:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44297 X-GNU-PR-Package: emacs Original-Received: via spool by 44297-submit@debbugs.gnu.org id=B44297.160404289526433 (code B ref 44297); Fri, 30 Oct 2020 07:29:02 +0000 Original-Received: (at 44297) by debbugs.gnu.org; 30 Oct 2020 07:28:15 +0000 Original-Received: from localhost ([127.0.0.1]:55925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYOpa-0006sH-TS for submit@debbugs.gnu.org; Fri, 30 Oct 2020 03:28:15 -0400 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:38415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYOpZ-0006rq-2g for 44297@debbugs.gnu.org; Fri, 30 Oct 2020 03:28:13 -0400 Original-Received: from mail.gandi.net (m91-129-102-160.cust.tele2.ee [91.129.102.160]) (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 4300F200007; Fri, 30 Oct 2020 07:28:04 +0000 (UTC) In-Reply-To: <64182b62-dad4-08db-379b-acfddea26327@yandex.ru> (Dmitry Gutov's message of "Fri, 30 Oct 2020 01:20:21 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192036 Archived-At: > 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. >> Another useful command would be: >> project-find-file-only using completing-read to match on file names only, >> not on directory parts. > > And then... disambiguate files with the same base name with another prompt? > > IME, having multiple files with the same name in the project is very > common. Your experience can vary, though. > > 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. >>> 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?