all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Eshel Yaron <me@eshelyaron.com>
Cc: Drew Adams <drew.adams@oracle.com>,
	 Justin Fields <justinlime1999@gmail.com>,
	 "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: [External] : Re: [PATCH] Add file-ring to dired-aux.el
Date: Sun, 27 Oct 2024 09:47:20 +0200	[thread overview]
Message-ID: <86ttcyc8vz.fsf@mail.linkov.net> (raw)
In-Reply-To: <m1plnntkhs.fsf@macbookpro.home> (Eshel Yaron's message of "Sat,  26 Oct 2024 09:02:23 +0200")

> 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	other threads:[~2024-10-27  7:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21  8:11 [PATCH] Add file-ring to dired-aux.el Justin Fields
2024-10-21  9:48 ` Eli Zaretskii
2024-10-21 10:14   ` Justin Fields
2024-10-21 10:38     ` Eli Zaretskii
2024-10-28 10:31       ` Björn Bidar
     [not found]       ` <87v7xctt6p.fsf@>
2024-10-28 12:42         ` Eli Zaretskii
2024-10-21 12:35   ` Michael Heerdegen via Emacs development discussions.
2024-10-22 18:15 ` Juri Linkov
2024-10-22 18:43   ` Eli Zaretskii
2024-10-23  6:47     ` Justin Fields
2024-10-22 22:24   ` [External] : " Drew Adams
2024-10-26  7:02     ` Eshel Yaron
2024-10-27  7:47       ` Juri Linkov [this message]
2024-10-28  7:16         ` Eshel Yaron
2024-10-28 18:53           ` Juri Linkov
  -- strict thread matches above, loose matches on Subject: below --
2024-10-21 15:05 Justin Fields
2024-10-21 17:47 ` [External] : " Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ttcyc8vz.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=justinlime1999@gmail.com \
    --cc=me@eshelyaron.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.