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: Mon, 2 Nov 2020 02:28:17 +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> <87tuuap6m6.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="871"; 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 Mon Nov 02 01:29:11 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 1kZNih-00009x-Ph for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Nov 2020 01:29:11 +0100 Original-Received: from localhost ([::1]:34640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZNig-00010p-FG for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 19:29:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZNiY-00010Y-Kc for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 19:29:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZNiY-0003XO-Bh for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 19:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZNiY-0004wX-6z for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 19:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Nov 2020 00: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.160427690618944 (code B ref 44297); Mon, 02 Nov 2020 00:29:02 +0000 Original-Received: (at 44297) by debbugs.gnu.org; 2 Nov 2020 00:28:26 +0000 Original-Received: from localhost ([127.0.0.1]:39049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZNhy-0004vU-Gp for submit@debbugs.gnu.org; Sun, 01 Nov 2020 19:28:26 -0500 Original-Received: from mail-ed1-f50.google.com ([209.85.208.50]:44930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZNhx-0004vG-0e for 44297@debbugs.gnu.org; Sun, 01 Nov 2020 19:28:25 -0500 Original-Received: by mail-ed1-f50.google.com with SMTP id w1so11522143edv.11 for <44297@debbugs.gnu.org>; Sun, 01 Nov 2020 16:28:24 -0800 (PST) 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=WaIBVzcIpTKrOEhzhidNnsNd7uWJrS8/Fq9vYiU+aIA=; b=MOYBeizC/mdI1vLDxfAIXbX8U1ckgA0wQUifdhoQ7C212G5ktlpLxi4k8iq6dRTIWP vZWdMAR1vBp8SFfa7ggstxCRVkHt0gpKp+j90BVCDqLUuyfMjyW52v0UbhCk5TZ0qXQh e9AfSymGirX9HCz64PfPuj3aFOAL5+Be6qV8zutYVXhj2GogFgkQDHVuaiC4wg4rM8GJ +B4Ep3QxMMCu4gSj+cA4Ljb2dCMP2LBD/DjXJQNANsbQkGd5XEZQ3DdDQ/X9k2T+8UeQ s0i0A9I29EJCNwUrFsXGjYAOdz8vxIU/yhAgb6u7GXyXSnRvy4OuiawlvT1zag9WHMjf CzFA== 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=WaIBVzcIpTKrOEhzhidNnsNd7uWJrS8/Fq9vYiU+aIA=; b=kosxoJg5C3a4lWKQeCjp2dPsZOW8G+/+ch0Rn20imOldCrgQ+4vp7AzhZiPRiwOK/r 7FlU5o+OVpsuuOQiBDp/2EPeBkhGeD/1+nW/lB7Jg4Hz/4MEpIuK55Dgolamf1t4yRe5 GwTCKcgbbyWNX0fHjARsYebonVJidtOF/NFdlPEvxTtrCHnjsuMEtPQblPi7ptL5vvK4 ojwcZmsMx4VjESSxsuF81TON9uP9K+KVDHrn6M0T6p+uw886qtJT5GlXePa6OWaWByjI CD37Y0xUWrp1hxBq2DmGQgjZ9xaatoMc3NjB7XwMdP7DtpayC/hxZEHFTN1XktVC67iH 3a+A== X-Gm-Message-State: AOAM531pSpZqyMxMV2iEbIuAIDVzft+EMvXqMCb6zjimVWMP3U01j/Is pJFpWE55+0DIJWm/P3YaeDg= X-Google-Smtp-Source: ABdhPJw5AsWaUdrU+znl1TbqKagr9k1BiP32NkdM0Izc/HcIk4qNo5FGq5cA9EMQycV7xzzvNra78Q== X-Received: by 2002:aa7:d843:: with SMTP id f3mr14507762eds.354.1604276899215; Sun, 01 Nov 2020 16:28:19 -0800 (PST) Original-Received: from [192.168.0.4] ([66.205.71.3]) by smtp.googlemail.com with ESMTPSA id k1sm9385403edl.0.2020.11.01.16.28.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 Nov 2020 16:28:18 -0800 (PST) In-Reply-To: <87tuuap6m6.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:192493 Archived-At: On 31.10.2020 21:18, Juri Linkov wrote: >>> 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? > > The convenience of rotating will degrade with increase of the number of found files. > But maybe rotating among 3 files would be fine. With more files, the user might want to opt for the "normal" project-find-file completion, rather than this command. I mean, we could add an option for a threshold, after which we pop up extension completion, but at this stage it sounds probably unnecessary. And if the user sets up hydra integration, they could easily swish through many more files, very quickly. Projectile uses completion here, 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. >> >> So... suppose the user types out a file name in full and sees several >> matches (in different directories). What happens then? > > The user then selects one of them to visit. From *Compleitons* buffer, with a mouse? I don't know of another way to "select one of them" using the default completion UI.