all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Justin Fields <justinlime1999@gmail.com>,
	"michael_heerdegen@web.de" <michael_heerdegen@web.de>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Re: [PATCH] Add file-ring to dired-aux.el
Date: Mon, 21 Oct 2024 17:47:14 +0000	[thread overview]
Message-ID: <DS7PR10MB5232CEF4EC2EAF49E3A721A1F3432@DS7PR10MB5232.namprd10.prod.outlook.com> (raw)
In-Reply-To: <SN6PR03MB3871CA1929453B506FDB3993FC432@SN6PR03MB3871.namprd03.prod.outlook.com>

FWIW -

With Dired+ you can use:

* `M-0 w' to copy the absolute names of the marked files
  and dirs to the kill ring.  (Enhanced version of the
  standard `w'.)
  
   . `M-0' uses absolute names
   . `C-u' uses names relative to `default-directory'.

* `C-y' to yank (copy) those files (or another such
  filename list) into another Dired buffer.
  
   . Non-negative prefix arg prompts for target directory.
   . Non-positive prefix arg lists the files with
     details if you hit `l' when asked to confirm.

That is, `C-y' copies the files to the directory of the
current listing (maybe a subdir listing) in a Dired buffer.
With a non-negative prefix arg you're instead prompted for
the directory, with completion.  This is better than
`dired-dwim-target' etc.

This is the prompt to confirm yanking:

 Yank files whose names you copied?  (y or n; l to show file list)

`l' at the prompt lists the absolute filenames, by default.
But if you use a non-positive prefix arg with `C-y' then
`l' also lists the file attributes specified by option
`diredp-list-file-attributes'.  By default, that option
shows the permissions and time of last modification.
_______

https://www.emacswiki.org/emacs/download/dired%2b.el
_______


-- Doc strings ----------------

w runs the command dired-copy-filename-as-kill (found in
dired-mode-map), which is an interactive Lisp closure in ‘dired+.el’.

It is bound to w, menu-bar operate kill-ring.

(dired-copy-filename-as-kill &optional ARG)

Copy names of marked (or next ARG) files into the kill ring.
Multiple file names are separated by the value of variable
`diredp-filename-separator'.

When multiple names are copied, those with space or quotes (', ") are
enclosed in double-quote chars if option
`diredp-quote-copied-filenames-flag' is non-nil.

With a zero prefix arg, use the absolute file name of each marked file.
With C-u, use the file name relative to the Dired buffer's
`default-directory'.  (This still may contain slashes if in a subdirectory.)

If on a subdir headerline, use absolute subdir name instead;
prefix arg and marked files are ignored in this case.

You can then feed the file name(s) to other commands with M-x yank.

The value of global variable `diredp-last-copied-filenames' is updated
to the string list of file name(s), so you can obtain it even after
the kill ring is modified.
_______



C-y runs the command diredp-yank-files (found in dired-mode-map),
which is an interactive Lisp closure in ‘dired+.el’.

It is bound to C-y, menu-bar subdir diredp-yank-files.

(diredp-yank-files &optional DIR NO-CONFIRM-P DETAILS)

Yank (paste) files to the current directory.
With a non-negative prefix arg you are instead prompted for the target
 directory.
With a non-positive prefix arg you can see details about the files if
 you hit `l' when prompted to confirm pasting.  Otherwise you see only
 the file names.  The details you see are defined by option
 `diredp-list-file-attributes'.

The absolute names of the files to be yanked are taken from the
clipboard or, if that's empty, from names you've copied to the kill
ring using `M-0 w' or M-x diredp-copy-abs-filenames-as-kill.

Those copy-filename commands also:
 * Use the value of option `diredp-filename-separator' to separate the
   copied file names.
 * Set variable `diredp-last-copied-filenames' to the same string.
   `diredp-yank-files' uses the value of that variable, not whatever
   is currently at the head of the kill ring.

(To copy file names to the clipboard on MS Windows, you can use Windows
Explorer: Select the file names, then hold `Shift', right-click, and
choose `Copy as Path' from the menu.)

When called from Lisp:

Optional arg NO-CONFIRM-P means do not ask for confirmation to copy.
Optional arg DETAILS is passed to `diredp-y-or-n-files-p'.
_______



diredp-filename-separator is a variable defined in `dired+.el'.

Its value is "\0"

Documentation:
String used to separate file names in a `kill-ring' entry.
_______



diredp-quote-copied-filenames-flag is a variable defined in `dired+.el'.

Its value is t

Documentation:
Non-nil means w double-quotes file names containing SPC, ', or ".

You can customize this variable.
_______



diredp-list-file-attributes is a variable defined in `dired+.el'.

Its value is (5 8)

Documentation:
Which file attributes `diredp-list-file' uses, and when.
A list of file attribute numbers means use only the values of those
attributes.
A non-list means use all attribute values.

You can customize this variable.

  reply	other threads:[~2024-10-21 17:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21 15:05 [PATCH] Add file-ring to dired-aux.el Justin Fields
2024-10-21 17:47 ` Drew Adams [this message]
2024-10-22 15:53 ` Michael Heerdegen
  -- strict thread matches above, loose matches on Subject: below --
2024-10-21  8:11 Justin Fields
2024-10-22 18:15 ` Juri Linkov
2024-10-22 22:24   ` [External] : " Drew Adams
2024-10-26  7:02     ` Eshel Yaron
2024-10-27  7:47       ` Juri Linkov
2024-10-28  7:16         ` Eshel Yaron
2024-10-28 18:53           ` Juri Linkov

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=DS7PR10MB5232CEF4EC2EAF49E3A721A1F3432@DS7PR10MB5232.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=justinlime1999@gmail.com \
    --cc=michael_heerdegen@web.de \
    /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.