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 20:38:06 +0300 Message-ID: <86o77914sh.fsf@gnu.org> References: <875xthfyz3.fsf@localhost> <87a5it6vr6.fsf@localhost> <86r0c5196r.fsf@gnu.org> <877cdx6ryu.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17583"; 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 19:38:54 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 1sQVqf-0004Ku-7V for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Jul 2024 19:38:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQVpz-0002xE-8h; Sun, 07 Jul 2024 13:38:11 -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 1sQVpx-0002wg-2X for emacs-devel@gnu.org; Sun, 07 Jul 2024 13:38:09 -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 1sQVpw-0000IT-M1; Sun, 07 Jul 2024 13:38:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ankZr8q8LMx2BUEgWV0L/INg1/gdlmvRHYdsCGjGcyE=; b=GGGw0za3iiR+ o2ikgbYvwEXFFI9HkWvY7phKPxjfm0ldCGNMeCUKgns1mSygyPDgEmqMcZYrKdI/3c4rO60tAasOp Tn26/N9DRFwSscZgUdFGRYDYbd5D6f1r+e6ntlAHTn39mkQh27hhLZrYuNgxCCJ3RLmU9ltfHrRe9 jzlq+O8WbblWb6lmppqK7Gmo34z4u7B4NLzo6JGZKI/DavUQfe+lvSTS1CXvmMhYaGH+ytfH1kzKr E/lto92cRXDJwZlYdO3Rj1wOpYnBT93UXC5k4rmJBFi5/+s/+vImwhU+RCcGgcrWARAt43Koy+LSU Dmwxs4oV83F6qLrSAn3xgQ==; In-Reply-To: <877cdx6ryu.fsf@localhost> (message from Ihor Radchenko on Sun, 07 Jul 2024 17:18:33 +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:321509 Archived-At: > From: Ihor Radchenko > Cc: mardani29@yahoo.es, emacs-devel@gnu.org > Date: Sun, 07 Jul 2024 17:18:33 +0000 > > Eli Zaretskii writes: > > >> 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. > > I 100% agree. > That's what helm provides, say, for `completing-read-multiple'. > But for `read-file-name' specifically, there is no way to extend the > built-in completion. We have Ibuffer and Dired (and other similar features), which functions that return lists of marked entities. That is what needs to be used for multiple selections, not some loop over read-file-name and its ilk. > I wish that *completions* buffer allowed selecting multiple candidates > at once when using `completing-read-multiple' or similar commands. I think completion is the wrong framework for this purpose, because the user might want to select files/buffers/whatever whose names don't share anything in common.