From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rahguzar Newsgroups: gmane.emacs.devel Subject: Re: Q: Is there a built-in way to read multiple file names? Date: Sun, 14 Jul 2024 22:29:57 +0200 Message-ID: <87ikx7ra2i.fsf@zohomail.eu> References: <87r0bxqms0.fsf@zohomail.eu> <87bk30jguc.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="22310"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.1; emacs 29.4 Cc: Thierry Volpiatto , 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 Mon Jul 15 04:22:20 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 1sTBM2-0005bq-PE for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Jul 2024 04:22:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTBLH-00041w-Lj; Sun, 14 Jul 2024 22:21:31 -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 1sT5rN-0004L2-9E for emacs-devel@gnu.org; Sun, 14 Jul 2024 16:30:17 -0400 Original-Received: from sender21-pp-o91.zoho.eu ([185.172.199.249]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sT5rE-0006gM-At; Sun, 14 Jul 2024 16:30:10 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1720988999; cv=none; d=zohomail.eu; s=zohoarc; b=MB8gu13N1XHTnhQlj7shJu1hj35gaEmG2LvNZohNOK8aJqT9NLoZPKcMx0DH+ccf9qPDFPJ7lxkP62unAjrnqhvU38cZbqkycH/EcuOj11/ad3fjFJRLXlfK+KlQ7KlrCIJy7IemD4kfkKbPPrh6QaUJK0D8HYv0EbNYEQl5vp0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1720988999; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=NnyahgGpa5N+WyCnamhY/SiMRAkS+nzGNeDULyWf8aI=; b=Yl/UpasFzel/6i069L4PGpLTZ8jPWiGxo70xwYCHUlu6F3t9CcYY5uD49Y2U4RRDWmI939k30rV73cstweJOFJ4wVIW05Ln5TW0FnX7TYmeGhWwFq1inRLgpqUsRN768ZTAaPfmosytka5LXNpo5yPearDAmKCt3AlpgMCpK2FA= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=zohomail.eu; spf=pass smtp.mailfrom=rahguzar@zohomail.eu; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1720988999; s=zoho; d=zohomail.eu; i=rahguzar@zohomail.eu; h=From:From:To:To:Cc:Cc:Subject:Subject:In-Reply-To:References:Date:Date:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To; bh=NnyahgGpa5N+WyCnamhY/SiMRAkS+nzGNeDULyWf8aI=; b=QP3dEnQ2meSDMFi/Ztif+VvMxiSc8kjmOHnC24oZrsuFeUWBnyjg0ebf9NfljeGJ 4LtxqLOBdSdRiBDPLLQd+YLL7n4zKAV6ZBe2IrTqM9cYGKb5qaX53FL93BdnH2LQbGL KFT1H2PYgQwxD1FGUp4Wsitk3Wurl7G4XugGfCLw= Original-Received: by mx.zoho.eu with SMTPS id 1720988998892363.52441596992276; Sun, 14 Jul 2024 22:29:58 +0200 (CEST) In-Reply-To: <87bk30jguc.fsf@localhost> (Ihor Radchenko's message of "Sun, 14 Jul 2024 12:30:51 +0000") X-ZohoMailClient: External Received-SPF: pass client-ip=185.172.199.249; envelope-from=rahguzar@zohomail.eu; helo=sender21-pp-o91.zoho.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 14 Jul 2024 22:21:28 -0400 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:321662 Archived-At: Hi Ihor, Ihor Radchenko writes: > Rahguzar writes: > >>> Sure, but I want the same thing to work for non-helm users. >>> Preferably, without having to write helm-specific/ivy-specific/etc code. >> >> If you want a mostly completing-read interface for this task, maybe the >> function filechooser-read-file-names [1] from my GNU ELPA package >> filechooser can help you. It uses a group-function to distinguish >> selected files from the rest. It works pretty well with vertico but I >> think should work with any UI which supports group-function well. It is >> entangled with some details of the package so probably not directly >> useful but I think adapting to an API similar to read-file-name is not >> too hard and hopefully can help with something similar to serve Org's >> needs. > > Yes, it is quite similar to what I described > > ------------- completions ----------------- > [selected files group] > -rw-r--r-- 1 yantar92 yantar92 35151 Jun 25 10:22 COPYING > [candidates group] > 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 tried using > > (let ((filechooser-filters '(("All" always . t))) > (filechooser-use-popup-frame nil)) > (filechooser-read-file-names "Files: ")) > > M-TAB selects file. > I did not find how to remove selected file. M-TAB on a selected file deselects it. It is basically a toggle. > The main problem is that it is not built-in, and I would like to get > something in the core to cater multi-file prompts. I would like that too, and if something like that is in the core I will change current implementation to depend on it. I am also happy to try to upstream the code if that is considered desirable. > A side note: The usual /old/path/to/file/~/restart/path does not work as expected. Can you please describe how it doesn't work? It works for me with vertico. I thought let binding minibuffer-completing-file-name was enough to get rfn-eshadow to work. Rahguzar