From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: Q: Is there a built-in way to read multiple file names? Date: Tue, 23 Jul 2024 11:13:07 +0000 Message-ID: <87v80wxsxo.fsf@localhost> 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> <86ikx9jrh4.fsf@gnu.org> <87frscjhhm.fsf@localhost> <8634ocjeze.fsf@gnu.org> <87r0buij3j.fsf@localhost> <86frsaihom.fsf@gnu.org> <878qy2igat.fsf@localhost> <86cyndire5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15732"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mardani29@yahoo.es, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 23 13:12:30 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 1sWDRW-0003si-DW for ged-emacs-devel@m.gmane-mx.org; Tue, 23 Jul 2024 13:12:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWDQy-0006Gk-7L; Tue, 23 Jul 2024 07:11:56 -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 1sWDQo-0005hR-El for emacs-devel@gnu.org; Tue, 23 Jul 2024 07:11:47 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWDQl-0005i4-Qp for emacs-devel@gnu.org; Tue, 23 Jul 2024 07:11:46 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E3FE3240028 for ; Tue, 23 Jul 2024 13:11:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1721733099; bh=v5ZB4FptAFGqB/ZQiyhIbnsi2h/mZ4n40x+TXjRnqm0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=Bu1xepPDPZYp4QZ9+jMvyxVUZyCOlyArHVXoyTyM1nHptQZpr6WEP+NkNf+S/wsp2 mputQSm9CKxb0Zlky6DDvGHogWJq9WE5iqr3fwMUR0UdzD6mdWzni2Zh0JY1ev3hJC iOLzDX8lCbnd16S0+UaAmyGN+vkg6Q4t4XDsk3uI5I7QD9nXk4LnCo36McsrDZvq/b UQgpzVncZrW9W6yH45LJVqkmqllO/p6o6M7nv6n/iM7QimEAU2PbtXulq8wyyqW5X9 4U+LdE/Gg+V6DwvMzQl3VH2SMafcT7sOJNw2h+hsKhrPKo1T2A4oeKInkj+3YL6azx wjEAiMdzh9YkA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WSvbv3Xj4z9rxN; Tue, 23 Jul 2024 13:11:39 +0200 (CEST) In-Reply-To: <86cyndire5.fsf@gnu.org> Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:321979 Archived-At: Eli Zaretskii writes: >> How to unmark after you go to a different directory? > > The same way you mark them? Or maybe I don't understand what > difficulties you have in mind. Imagine that a user marks two files: 1. /home/user/1/2/3/4/5/file1 2. /home/user/5/4/3/2/1/file2 During step (2), dired will display <...>/5/4/3/2/1/ directory. Now, imagine that file1 needs to be unmarked. To do it, the user will have to go up all the way to /home/user and descent down to 1/2/3/4/5 - very awkward. And even more awkward if the user does not remember the full path for file1. >> 'i' works poorly when the directories contain many files - you get way >> too long list of files, potentially with duplicate names, that is a >> nighmare to search through. Even with regexps. > > How is this different from a directory that has a lot of files to > begin with? Searching in an Emacs buffer is hardly a problem. At the > very least, it's way more convenient than searching a typical GUI > file-selection dialog, at least IME. The most important difference is that "i" may create duplicate file names, which never happens when there is a single directory. Then, searching cannot help much to narrow down to the desired file name. Also, there will always be more files in multiple directories compared to single directory (on average). So, users will have to search through longer file lists. >> > . it is unusual, and so at least some users will be confused >> >> Any new UI will be unusual. > > Selecting files from a Dired-like list is non unusual. Both Emacs > users and users who come from other GUI applications will feel right > at home. >> As since we cannot use dired as is (AFAIU), > > We can't? why not? IMHO, dired as it does not provide a good way to _show_ which files are selected without having to scroll through the whole file listing. >> Also, I am not sure if it is that much unusual - I replicated my dired >> look in the above. With >> https://github.com/Fuco1/dired-hacks?tab=readme-ov-file#filter-groups, >> it is how dired UI looks like. Example: > > You miss my point. The unusual part is that the selected files are > shown at the beginning of the buffer instead of being left in their > original places with an indication that they were selected. Sorry, I was not clear. I did not mean that marked files will be removed from the main file listing. I meant that marked files will be displayed on top _in addition_ to being marked in the normal listing. This is to see an overview of all the selected files together, without having to scroll through all the directory files (marked + unmarked). >> > Because it is unusual and idiosyncratic. By contrast, what I describe >> > exists in many selection dialogs, and so will be familiar. >> >> Yes, it is. Idiosyncratic for Emacs. Just like isearch. >> I really see no reason to _not_ allow flexibility we already have in >> Emacs and instead trying to mimic the limitations idiosyncatic to >> Windows/Mac. > > What limitations are those? No option to use custom `completion-styles'. >> Maybe it is good enough? Especially since we may not want to shadow >> existing single-letter bindings in dired. > > If that is the problem (but I don't see why, since most of those > bindings are to dired-do-SOMETHING, which are not relevant for > selecting files) I mostly referred to "m" (mark) and "u" (unmark) bindings. They are relevant. > ... , we can find a solution, like M- or > something. Could be an option, yes. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at