From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: Q: Is there a built-in way to read multiple file names? Date: Sat, 13 Jul 2024 14:19:21 +0000 Message-ID: <8734od74t2.fsf@posteo.net> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9064"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 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:16:34 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 1sSdYA-0002Ao-3r for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Jul 2024 16:16:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSdXy-0004Eo-VB; Sat, 13 Jul 2024 10:16:22 -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 1sSdXv-0004EG-A5 for emacs-devel@gnu.org; Sat, 13 Jul 2024 10:16:21 -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 1sSdXt-0008GR-H3 for emacs-devel@gnu.org; Sat, 13 Jul 2024 10:16:19 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0E4BF240103 for ; Sat, 13 Jul 2024 16:16:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1720880175; bh=N9gBU8uXymHp1aa/63APnwlNRaDWjZ7xMFHfyjGaUxw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Autocrypt:OpenPGP:From; b=di2Oyrmq0QHqOa3dEQTf9K0/tub3VzCnT8Wq244D+VzoEYYEgnwIuVKVgGtKsENho CkOkhPP3ecaVnIGTjJiBNf9VKKi9vKgDKU3HtptaPvPBWQzAOTrLstAwS+KRdAH03L crroH/iWhBjHbLmp67uLD74pix5cwzaY4tzi7m9S0NZUkX1ScC+upj//UXJXtedoIW JlBUq5Wm5ZKkRX1lI0i5PJG5X83sk6miaZRoFD36a1xWgfmO+d4oeoIcAb+Ti0RWxs Lu7gmVJCkFcFfe3AqNy/NAesTEHrJE22WXRcz5DR0Zqns1pjd06t4e9+fR5ZEMXjMk idPoGn6kANG5w== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WLr9T5hqdz9rxM; Sat, 13 Jul 2024 16:16:13 +0200 (CEST) In-Reply-To: <87zfqlpfty.fsf@localhost> (Ihor Radchenko's message of "Sat, 13 Jul 2024 13:43:53 +0000") Autocrypt: addr=thievol@posteo.net; prefer-encrypt=mutual; keydata=xsDNBF8ylcIBDADG+hy+zR6L4/vbdDDZuSaMmSrU3A5QZJpeBCvxTr7MpzzruZbhLPW1K3R6N2MA edi8Y+C8o27FVRIjpdbaKMGu9je7JV/TbUQYo3SOwCK1vM4LUn4V6ZLzSYkuiEt4eyMoiDdyvN0p kcK6P9x9DCetcEVszXzQg+yzCVrQ2hXWDXWT4M18EC3wtO7RHPouMqGiwBFhBAYErCqFWFxQHkfb tG/4yGyJ58rglb65O3qijjMWvYwcWZun9/7qm8Z4/4mHopmo2zgU+OrptnLSZfkZGz3Y7Uf452xQ GVq0Fv75NPvQru7y+DYVhuVXXyAmGxt+vf4rIiixMBbhKEPjcxEPAa2LTzex2IsTZR+QVG9uDnqC WcgaOEQ58fzXNvNhtwwF/Rgio2XWAJVdmFWS59/k9W58CIUSNKBMZh2XeGdEmtHvDtCxW3z6FJha 36RzOM3fMNNiAGdFZJA84gcdloJR+sHCDTTPT3784fjr+V8An7sI581NGFzkRQqPvEQCZbUAEQEA Ac0SdGhpZXZvbEBwb3N0ZW8ubmV0wsEOBBMBCgA4AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheA FiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmL3HCoACgkQDsVtFB0W75OVEAv/f6XxmtIFz08fUb8h Bp/zJP6IC4/rhhh+0GMRIRzLN8DK0jV8JCzYdFHiRJOy2lNIOpmrrCmjRRxferc2G42+ePFIsslx hU46VSz1Z83NwIG3mpdYNV5WUTUdgzxExHTNTFCd7NKv0nlHKQaA OpenPGP: url=https://posteo.de/keys/thievol@posteo.net.asc; preference=encrypt Received-SPF: pass client-ip=185.67.36.66; envelope-from=thievol@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:321609 Archived-At: Ihor Radchenko writes: > Eli Zaretskii writes: > >>> My concern about dired and similar is that it is not possible to exit >>> them and go back to the original place as easily as C-g in the >>> completion prompt. Interactive narrowing is also not as easy as in the >>> completion. >> >> I didn't mean Dired as use it for browsing a directory. I meant a UI >> for selecting multiple files that reuses Dired, and lets users exit it >> with "C-c C-c" or somesuch. >> >> IOW, my intent was to point out the features to generalize and extend >> in order to have what you want. (For buffers, I think Ibuffer already >> offers an almost complete solution.) > > May you please explain in more details how you envision such multi-file > selection interface? > > (For context, I am interested in this question to extend M-x org-attach > where I want to allow users select multiple files at once; or, > similarly, to extend the email attachment prompt) For your helm users you can already use something like this: (defvar helm-comp-read-use-marked) (if (bound-and-true-p helm-mode) (let ((helm-comp-read-use-marked t)) (completing-read prompt candidates)) ; or read-file-name... (completing-read-multiple prompt candidates)) >>> IMHO, helm proves that completion framework can be used for very quick >>> selection. It does it via: >>> >>> 1. The notion of "current" candidate from the list that can be navigated >>> right from the minibuffer (like next/previous-completion in the >>> *completions*) >>> 2. minibuffer command to mark/unmark candidates quickly >>> 3. ability to retain marked candidates even the prompt input changes >>> >>> I find it quick and convenient to use, despite being a completion >>> framework. >>> >>> I also do not see why the same cannot be done based on the basis of >>> completion-list-mode. >> >> The display parts might be suitable for selection, but the entire >> completion machinery behind this makes absolutely no sense for the >> purpose of selection based on attributes that are not names or >> collection of strings. > > Is it? AFAIK, packages like consult allow searching by metadata. Isn't > custom COLLECTION function not suitable? -- Thierry