From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Max Nikulin Newsgroups: gmane.emacs.devel Subject: Re: Q: Is there a built-in way to read multiple file names? Date: Sun, 14 Jul 2024 16:00:17 +0700 Message-ID: References: <875xthfyz3.fsf@localhost> <87a5it6vr6.fsf@localhost> <86r0c5196r.fsf@gnu.org> <87ttgtpf1k.fsf@localhost> 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="34501"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 14 11:21:24 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sSvQ4-0008ne-8r for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Jul 2024 11:21:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSvPQ-0000Do-0V; Sun, 14 Jul 2024 05:20:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSv5o-0005kE-Pe for emacs-devel@gnu.org; Sun, 14 Jul 2024 05:00:28 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSv5n-0005QA-5D for emacs-devel@gnu.org; Sun, 14 Jul 2024 05:00:28 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1sSv5l-0001Yi-3P for emacs-devel@gnu.org; Sun, 14 Jul 2024 11:00:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ Content-Language: en-US, ru-RU In-Reply-To: <87ttgtpf1k.fsf@localhost> Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 23 X-Spam_score: 2.3 X-Spam_bar: ++ X-Spam_report: (2.3 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 14 Jul 2024 05:20:41 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321635 Archived-At: On 13/07/2024 21:00, Ihor Radchenko wrote: > Max Nikulin writes: > >> Marking items is convenient in some cases, but I like that >> bash-completion or built-in readline path completion in shell prompt >> allow me to *type* multiple file names. However it better than strictly >> "one after another" since it is possible to move earlier typed text and >> to edit it. > > Do you mean wildcards? Wildcards are convenient as well, but primary I had in mind multiple arguments tar cvfz f.tar.gz one/two.txt three/four/five.jpg six/seven.org I would prefer to avoid rambling through directories and marking files when I approximately know location of files. I find it convenient to type and hit TAB (or C-/ in some cases) to confirm that a file exists. >> Ihor, have you considered custom keymap to add current text to a list >> variable? However editing earlier added entries may be tricky. > > This is conceptually similar to `completing-read-multiple', AFAIU: > > Prompt: exact-file-name,file-with-wildcard.*,another-file > > Is my understanding correct? If `completing-read-multiple' may be combined with file name completion and escaping of separators then yes. At first I though that it might be easier to bind to key sequences some functions that add/remove current text to/from an externally maintained list (perhaps displayed in another buffer) while single item is presented in the minibuffer. However is should be a pain when users configure their preferred completion frameworks.