emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Re: [PATCH] Add file-ring to dired-aux.el


From: Juri Linkov
Subject: Re: [External] : Re: [PATCH] Add file-ring to dired-aux.el
Date: Sun, 27 Oct 2024 09:47:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)

> FWIW, I found these ideas and the discussion so far really interesting.
> I'm experimenting with an implementation of this concept that uses a
> transient menu to both let you choose an action (copy/move/...) and show
> you which files you're about to act on.

The standard window "*Marked Files*" better handles a long list of files,
but if it can't be used, then maybe displaying a truncated list of files
would be ok.

> As a bonus, this also lets you choose other files to act on or
> a different target directory.

Selecting files using the minibuffer is much less convenient.

> I'm attaching my current implementation for reference if anybody's
> interested, as well as a screenshot of the menu that you get by copying
> some file names in one directory and then invoking a command in another.

Thanks, I tried it out, and everything works nicely.

> ;; Simply mark some files and hit `0 w' to copy their absolute names.

There is more room for improvement to make it more simple.
Instead of requiring a prefix argument `0 w',
`w' could be modified to put text properties
with absolute file names on relative file name strings
to be available for functions that need absolute file names.

> ;; hit `C-y' to invoke `filet'.

Here is the missing keybinding: (keymap-set dired-mode-map "C-y" #'filet)
since the primary use is for Dired.

>   [ :description (lambda () (concat "In directory "
>                                     (abbreviate-file-name
>                                      (expand-file-name default-directory))))

Maybe displaying the current directory is helpful for such
rare cases when it will be used from buffers other than Dired.
But it's more important to show the source directory name, e.g.

  "From directory: ..."

>     ("-f" "Files" "--files"
>      :class transient-option :multi-value rest :reader filet-read-files
>      ;; Align value with the next line.
>      :format " %k %d     (%v)")

Displaying relative file names looks really bad with a lot of
"../../../../../..".  It would be much nicer to display file names
relative to the source directory, especially when its name will be
displayed above.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]