From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#44297: [Feature request] project.el: Additional utility functions Date: Fri, 30 Oct 2020 19:42:52 +0200 Message-ID: References: <1785587458.69035.1603939939547@ichabod.co-bxl> <871rhhv4q8.fsf@mail.linkov.net> <64182b62-dad4-08db-379b-acfddea26327@yandex.ru> <87o8kkdwa6.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30085"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: 44297@debbugs.gnu.org, leungbk@mailfence.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 30 18:44:14 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 1kYYRi-0007iT-An for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 18:44:14 +0100 Original-Received: from localhost ([::1]:48694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYYRh-00056L-4h for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 13:44:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYYRW-000567-6Y for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 13:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48056) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYYRV-0002C6-Pw for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 13:44:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYYRV-0002Yq-JK for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 13:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Oct 2020 17:44:01 +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.16040797829756 (code B ref 44297); Fri, 30 Oct 2020 17:44:01 +0000 Original-Received: (at 44297) by debbugs.gnu.org; 30 Oct 2020 17:43:02 +0000 Original-Received: from localhost ([127.0.0.1]:59599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYYQY-0002X7-Bq for submit@debbugs.gnu.org; Fri, 30 Oct 2020 13:43:02 -0400 Original-Received: from mail-ed1-f41.google.com ([209.85.208.41]:37588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYYQW-0002Wl-CX for 44297@debbugs.gnu.org; Fri, 30 Oct 2020 13:43:00 -0400 Original-Received: by mail-ed1-f41.google.com with SMTP id o18so7533319edq.4 for <44297@debbugs.gnu.org>; Fri, 30 Oct 2020 10:43:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=go35k0LDzS4UIYv8DFUupsp/LDQvEE5Sj7jeCBJP4PE=; b=Kq01vmlkWbKa9pZn8uv3z0slubV2Vljncxd3sh6RYXECs6nfkAwIlJz8Ia4aO4TSsG vFZ3PW9xKbo+GiBRX4a1TOZmSF1B67rQG5Ln3hGAliaAo+xIDcB/LYYrkLjaT8wsZZzU oAsFzdIv8M6D7Bga5vNrjFXW27lnGkd78nnV5btHV2vO3hLQo6WrZpSDB1wpPyqRzHEY RYojVrx5J1D/1MUitkrQG2DDTI98WO1LbcUE7RcHI0q7t2bwlgOGxQQeHnSqX0en+Led fWjDaM7cHA2TH1CSQthZVilyKaURd1PygIa1SxTAk+d4erp2gQGtg6FIftwT947FRUH3 Lfpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=go35k0LDzS4UIYv8DFUupsp/LDQvEE5Sj7jeCBJP4PE=; b=F2nIDdNJQcWB4o+4EsP6CZEQLyGa2O9wnS1eD1d/7fP8IzgaL1CUag3bHCs+xl5QOe NotAQb3LmzEn5cV8g2FB/DlApr9R/n8j2JNUMuye2XZtY0kq+pUywsHCT0DS5kVug0Lf 3PYHGSoawQMu0mnmNBKb3cFysgfVP+J7WYbRbwJTFrWqhB6M0DOIlMrShQPsYyx9ccPs SRIGf9UvXLO/ycRwYvemDTOshSEy37nhUoQYuntalHiYizRKoJI7YMKfltoKM6KgnTaD yH7+Hr9A+PZA2yAv6skDvQvXf0fm6XsuHlfV4XIgo2yjlDpw300whJgMRO3a/CmE1j3i uUFQ== X-Gm-Message-State: AOAM530Ozdvh+DYEI6yCM/BByL2MbatQJJGKBTcnWNI65GYsTktwcFI4 XLQFiXaj0hGU7hKROCUF2to= X-Google-Smtp-Source: ABdhPJyPcEgVOlVzKdh8FBwqj9JyWDHxrmDwCrPdDMgqUmuoxRtaLztyakk1WtqLnUDDBvsHUTGAKA== X-Received: by 2002:a50:8d48:: with SMTP id t8mr3760137edt.228.1604079774676; Fri, 30 Oct 2020 10:42:54 -0700 (PDT) Original-Received: from [192.168.0.4] ([66.205.71.3]) by smtp.googlemail.com with ESMTPSA id x2sm3424610edr.65.2020.10.30.10.42.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Oct 2020 10:42:53 -0700 (PDT) In-Reply-To: <87o8kkdwa6.fsf@mail.linkov.net> Content-Language: en-US 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:192166 Archived-At: 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.