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: Sat, 13 Jul 2024 17:28:55 +0300 Message-ID: <86ikx9jrh4.fsf@gnu.org> References: <875xthfyz3.fsf@localhost> <87a5it6vr6.fsf@localhost> <86r0c5196r.fsf@gnu.org> <877cdx6ryu.fsf@localhost> <86o77914sh.fsf@gnu.org> <874j916qlv.fsf@localhost> <86ikxh13yc.fsf@gnu.org> <87zfqlpfty.fsf@localhost> <86jzhpjt4x.fsf@gnu.org> <87r0bxpecj.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36060"; 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 Sat Jul 13 16:29:59 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 1sSdl8-0009A3-NT for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Jul 2024 16:29:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSdkf-0007Ib-KC; Sat, 13 Jul 2024 10:29:29 -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 1sSdkc-0007I6-FU for emacs-devel@gnu.org; Sat, 13 Jul 2024 10:29:26 -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 1sSdkb-0001yO-9x; Sat, 13 Jul 2024 10:29:26 -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=XlV4sYR8BNYnw3KNEAfMOoOLR94qOiFy2Ip0Kdy0hTE=; b=sUvREVbgq8KI Eah7Az6gX8TweSdG1KWuTbb1jBnw/63zTQWBCUMSPssi8QwXlbK8yGvZi6H5cT3ISbXmdacI5mBPw td30wMCOL2TliA84ZKvigHkqgK2TJ/6N0WGbSEmkgOUw0DzwTZfXUz+I2+xj5ylLJROCeEqgokAh+ QPzFsYHHb6FcnfYoDdsAcZQcuWkvmO45hc0Lfttt63qXo6paDxEs/LvqigOcmvoNtxGK1cGHgb/jP 8T6jKV5G5rZQndc6ElOoiq8tvFF3IjyQGODUktqJJ54PidqNDCvTrxoEtnJwC7vhfEZ2j1dtK9SK6 APzMlJT1Um2+8LcOmloGwA==; In-Reply-To: <87r0bxpecj.fsf@localhost> (message from Ihor Radchenko on Sat, 13 Jul 2024 14:15:56 +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:321611 Archived-At: > From: Ihor Radchenko > Cc: mardani29@yahoo.es, emacs-devel@gnu.org > Date: Sat, 13 Jul 2024 14:15:56 +0000 > > Eli Zaretskii writes: > > > Basically, present a Dired-like list of files and let the users mark > > the files they want to select. Many GUI programs show file-selection > > dialogs, which allow selection of more than one file, and that is what > > I had in mind. > > Will something like > > ------------- dired-completion-mode ----------------- > [candidates] > -rw-r--r-- 1 yantar92 yantar92 936 Jun 25 10:22 CONTRIBUTE.org > -rw-r--r-- 1 yantar92 yantar92 35151 Jun 25 10:22 COPYING > ------------------- minibuffer ------------------------ > Choose files: CO > > work? Why do you need the minibuffer part "Choose files: CO"? why not simply let users mark the selected files using Dired mark commands? > Later, users can go back to minibuffer and change the input, narrowing > to a potentially different set of files: > > ------------- dired-completion-mode ----------------- > [selected files] > -rw-r--r-- 1 yantar92 yantar92 35151 Jun 25 10:22 COPYING > [candidates] > drwxr-xr-x 8 yantar92 yantar92 4096 Jul 13 16:04 .git > -rw-r--r-- 1 yantar92 yantar92 1044 Jun 25 10:22 .gitignore > -rw-r--r-- 1 yantar92 yantar92 95 Jun 25 10:22 .gitmodules > ------------------- minibuffer ------------------------ > Choose files: git I think the minibuffer part is over-engineering it. Dired has all the functionality you need, including the ability to go to different directories etc. There's no need to invoke completion-like UIs, which basically all assume the file names have common beginnings. This assumption is a limitation when selecting multiple files. > Let's focus on selecting multiple files via completion. How did "completion" enter the picture? The original question was about ways to select multiple files, which is much wider and more general than just completing on file names. When the user needs to select a file, completion is just a means of saving them some typing. That idea basically becomes irrelevant when users need to select several files whose names might not have anything in common. GUI applications have solved this problem long ago, so why should Emacs insist on inventing its own idiosyncratic solution?