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 18:52:00 +0000 Message-ID: <87r0buij3j.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35654"; 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 20:51:49 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 1sTQnd-00094w-KG for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Jul 2024 20:51:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTQmZ-0004HO-VP; Mon, 15 Jul 2024 14:50:43 -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 1sTQmW-0004H0-Vm for emacs-devel@gnu.org; Mon, 15 Jul 2024 14:50:41 -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 1sTQmR-0002UT-LR for emacs-devel@gnu.org; Mon, 15 Jul 2024 14:50:40 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E4302240028 for ; Mon, 15 Jul 2024 20:50:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1721069432; bh=dfl+9ZBF4ix1JWP4e0TT6ybEY1iY5u5JYmLF9HWXcNk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=jLsnk4+HDBF1M9xpl2/C+JflAqF//E1NmqWIc9Dhoz7hbSs5cjJBgrFiSjQptma6O ude+0e3n3KqW3dyUZiS6r2oIc3Iw/VufjXW0bxqEz+S1SU/DySZH7W/O1PhgCPzfq/ 5pEZA2julG/IMaRh0HEwdGXvVl8gWiQNNlUuTXRiGYwfqSMeos17sqCv/kQVavBByY IwDZY3FasTx9oKaPcBPiR3eQIRVi8qYIylOnqPQ8ttUqiTrDVtouca6lackEM6/Qec PK7JzRLivEfmAPd2ZHfASZaNxKE/Lbu86D9PobcSoYw7zoqW2v5JxdVjGrDYY8JnWp z2jLQ1jpCYOpQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WNB924Wwyz6v0X; Mon, 15 Jul 2024 20:50:30 +0200 (CEST) In-Reply-To: <8634ocjeze.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:321672 Archived-At: Eli Zaretskii writes: >> In my use case, the user may not immediately know if she needs to attach >> a single file or multiple files. So, having two separate interfaces for >> single file vs. multiple files is awkward. > > There's no need to use two interfaces. use just one: the one that can > handle several files. Selecting a single file from a list is known to > work and be natural for many years, including in Emacs. We even have > a convention that if no files are marked, the current file is the > selected one. I am not convinced that Dired UI is better, but I can see how dired UI can be a good choice for some people. Let's discuss what should be changed in dired to adapt it to multi-file selection. I am trying to simulate some use-cases when users need to select multiple files using dired: 1. Single file is trivial 2. Multiple files in the same folder are also trivial - use mark commands 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? I am thinking about something similar to my previous ideas - having a separate section in dired buffer that lists marked files. -------------- dired-select ------------------- [ Selected files ] * -rw-r--r-- 1 yantar92 1.2M Jul 6 15:31 xdisp.c (from Git/emacs/src/) * -rw-r--r-- 1 yantar92 2.5K May 3 15:24 local.mk (from Git/org-mode) * -rw-r--r-- 1 yantar92 3.8K Jul 13 18:16 Makefile (from Git/org-mode) [ Dir ] /home/yantar92/Git/org-mode: 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 -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 -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 My only concern is what to do when the folder contains many files and the first section listing the marked files may not be visible when scrolling the buffer. >> 2. It is not uncommon for me to attach files that have common >> names. Having completion under the fingertips is better compared to >> manually entering dired filters. (in dired, there is an extra key >> sequence required) > > 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? I feel that we are coming back to the idea of completing read... -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at