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: Mon, 15 Jul 2024 19:52:26 +0000 Message-ID: <878qy2igat.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12072"; 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 Mon Jul 15 21:51:41 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 1sTRjY-00033D-Po for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Jul 2024 21:51:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTRj1-0000a1-2z; Mon, 15 Jul 2024 15:51:07 -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 1sTRiz-0000Zp-Qu for emacs-devel@gnu.org; Mon, 15 Jul 2024 15:51:05 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sTRiu-0006Ax-RT for emacs-devel@gnu.org; Mon, 15 Jul 2024 15:51:05 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B6257240101 for ; Mon, 15 Jul 2024 21:50:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1721073057; bh=1xzP5eCznXI1BqZJayQ0ZYHD3TcHMOg3P54U14AXWQA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=P3NhdgSs8YT05B/cw6M6ZP/pFuEgB6aMm7+GPIrjvrr1wmbeatph7sjCux2lafEiH qQr/VKE8BZhGmoBYJR0clLWvzm2otS3TbfouJWhKQELD5BBHbW0n8BvaEDTpkVcNQg S1zKdp95WqfxfyoyiF3LxrcGjs+sMs8gn2AOnKAJc10XDDkkYDAQYk4vAe6SC0kVn6 9PpKE2BnKb25TA4LrTNpYG8h1yh9tMo8zG7GPEMcZUxwLz4M2svP1fWDjwYBEJtlJN q7y15kytDusWzXGuSDj9NEJi04WHKTPTg+Ixtd0hcbL5rUQBnakEDR0VJdyIWv+8JI l4leCggx9LtgQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WNCVm71L9z9rxF; Mon, 15 Jul 2024 21:50:56 +0200 (CEST) In-Reply-To: <86frsaihom.fsf@gnu.org> Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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:321678 Archived-At: Eli Zaretskii writes: >> 3. What does not seem to be trivial is selecting multiple files residing >> in different folders. What do you think should be done to dired to >> get this? > > Why do you need to change anything? It should be possible to mark > some files, then go to a different directory and mark some more files, > etc. When the user eventually types "C-c C-c", the list of all the > selected files in all the directories is returned to the caller. How to unmark after you go to a different directory? > An alternative could be for the user to insert another directory into > the buffer, like 'i' in Dired does. '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. >> -------------- dired-select ------------------- >> [ Selected files ] >> * -rw-r--r-- 1 yantar92 1.2M Jul 6 15:31 xdisp.c (from Git/emacs/src/) >> [ Dir ] >> /home/yantar92/Git/org-mode: > ... > > This has two disadvantages: > > . if there are many files, moving too far down will scroll the > selected files out of view Sure. That's literally my concern as well. That's why I suggested to use completion-based interface rather than dired-based. With completions window, there is usually no need to scroll - typing in minibuffer is a lot more efficient to narrow down to the desired file. As an alternative, maybe we can list the selected files in the minibuffer? > . it is unusual, and so at least some users will be confused Any new UI will be unusual. As since we cannot use dired as is (AFAIU), introducing something new is simply inevitable. 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: /home/yantar92/Git/org-mode: [ Dirs ] drwxr-xr-x 3 yantar92 4.0K Jul 15 09:48 doc drwxr-xr-x 5 yantar92 4.0K Jul 15 09:06 etc drwxr-xr-x 2 yantar92 20K Jul 15 16:30 lisp drwxr-xr-x 2 yantar92 4.0K Jul 13 18:16 mk drwxr-xr-x 2 yantar92 4.0K Jun 12 2022 paches drwxr-xr-x 5 yantar92 4.0K Jul 15 10:45 testing [ Documents ] -rw-r--r-- 1 yantar92 936 Jun 25 10:22 CONTRIBUTE.org -rw-r--r-- 1 yantar92 1.9K Jun 25 10:22 README.org [ Default ] -rw-r--r-- 1 yantar92 35K Jun 25 10:22 COPYING -rw-r--r-- 1 yantar92 2.5K May 3 15:24 local.mk -rw-r--r-- 1 yantar92 3.8K Jul 13 18:16 Makefile >> > Files that have common names are usually listed together, so I don't >> > think this problem is as serious as you describe it. A useful feature >> > for selecting files is, when the user types a characters, to move >> > point the first file whose name begins with that character. If we >> > implement that, you get the best of all worlds. >> >> Why only to file that _begins_ with a character? Why not also moving to >> a file that have specific work in its name? regexp? > > 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. > But if you want to have selection based on regexps, then Dired has the > "% m REGEXP" command. So this, too, is already available. I was talking about jumping to regexp match. In any case, isearch should be available, including searching by regexp. Maybe it is good enough? Especially since we may not want to shadow existing single-letter bindings in dired. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at