From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Q: Is there a built-in way to read multiple file names? Date: Sun, 07 Jul 2024 19:03:08 +0300 Message-ID: <86r0c5196r.fsf@gnu.org> References: <875xthfyz3.fsf@localhost> <87a5it6vr6.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14116"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mardani29@yahoo.es, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 07 18:03:56 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 1sQUMm-0003Ts-Qs for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Jul 2024 18:03:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQUMF-0005ea-H7; Sun, 07 Jul 2024 12:03:23 -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 1sQUMC-0005eP-CO for emacs-devel@gnu.org; Sun, 07 Jul 2024 12:03:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQUM5-0003m1-Ek; Sun, 07 Jul 2024 12:03:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=rekHcbyQppeCeqfSPUlw8O+8reI8HA+Gm6OKZkTO5R0=; b=mtrhifjWK14WMe7XL1jX j+oFxG38itKziFE1BA9nS+rD9ZIE9kr88/+xjkOm0c+iPkTp998mkmQNV7u1YUsrB/HP2Nt8JhcXL C2b3WNL3aKTjmF8r4eHk0sGoDg0zV2+E4Y8NK7jx65m3AcaShbXgiPSWh5OKH7Sqi4RZhyrESOnYH XLn2zNA0GedBdlgfbo9iZcKJqKH1eLJpwPO24wuXT1xgLS6zx16QST7z6plKNybpKFp38TZd6u/sV RfExa1+Y2+Lgu2h/+8C7zzXFK+3szszt8vFpTdnXHWSVisDEd9j5oerRciu2TGX2xTsNaWCc/LCz3 VlMWKsoDFr00eQ==; In-Reply-To: <87a5it6vr6.fsf@localhost> (message from Ihor Radchenko on Sun, 07 Jul 2024 15:56:45 +0000) 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:321502 Archived-At: > From: Ihor Radchenko > Cc: emacs-devel@gnu.org > Date: Sun, 07 Jul 2024 15:56:45 +0000 > > Daniel Martín writes: > > >> I feel that such command should exist, but I cannot find it. > > > > You can read each filename by calling read-file-name in a loop, ending > > with RET. There is multi-isearch-read-files, but the prompt message is > > coupled to isearch; it should be easy to generalize this function. > > That indeed works, but it is far from ideal: > > 1. It is not very extendable via helm/consult/ivy > 2. When x-file-dialog is used, it is extremely annoying to run it in a loop > > I am wondering if `read-file-name' could be extended to read multiple > file names at once. I think you are generalizing the wrong UI. A good UI for specifying several file names is not reading them one after the other, it is marking the files you want to operate on, and then clicking GO. Like in Ibuffer, for example.