[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q: Is there a built-in way to read multiple file names?
From: |
Rahguzar |
Subject: |
Re: Q: Is there a built-in way to read multiple file names? |
Date: |
Sun, 14 Jul 2024 22:29:57 +0200 |
User-agent: |
mu4e 1.12.1; emacs 29.4 |
Hi Ihor,
Ihor Radchenko <yantar92@posteo.net> writes:
> Rahguzar <rahguzar@zohomail.eu> 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 <MARKED>
> [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
- Re: Q: Is there a built-in way to read multiple file names?, (continued)
- Re: Q: Is there a built-in way to read multiple file names?, Yuri Khan, 2024/07/16
- Re: Q: Is there a built-in way to read multiple file names?, Thierry Volpiatto, 2024/07/13
- Re: Q: Is there a built-in way to read multiple file names?, Ihor Radchenko, 2024/07/13
- Re: Q: Is there a built-in way to read multiple file names?, Max Nikulin, 2024/07/08
- Re: Q: Is there a built-in way to read multiple file names?, Ihor Radchenko, 2024/07/13
- Re: Q: Is there a built-in way to read multiple file names?, Max Nikulin, 2024/07/14
- Re: Q: Is there a built-in way to read multiple file names?, Ihor Radchenko, 2024/07/14
- Re: Q: Is there a built-in way to read multiple file names?, Max Nikulin, 2024/07/15
- Re: Q: Is there a built-in way to read multiple file names?, Rahguzar, 2024/07/13