From: Rodrigo Morales <moralesrodrigo1100@gmail.com>
To: 48657@debbugs.gnu.org
Subject: bug#48657: Defvar delimiter for dired-copy-filename-as-kill
Date: Tue, 25 May 2021 14:12:02 -0500 [thread overview]
Message-ID: <87v97639x9.fsf@gmail.com> (raw)
I regularly use "dired-copy-filename-as-kill" (by default, it is mapped
to " w") for inserting filenames to the kill ring when being in a dired
buffer.
I'm having the following issue when interacting with filenames that
contain spaces: Because the space is used as the delimiter for the
copied filenames, it is difficult (nearly impossible) to know the
beginning and end of the copied filenames.
I looked at the source code of the function and found that the space
character is hardcoded as the delimiter (see below).
#+BEGIN_SRC emacs-lisp
(defun dired-copy-filename-as-kill (&optional arg)
...
(mapconcat #'identity
(if arg
(cond ((zerop (prefix-numeric-value arg))
(dired-get-marked-files))
((consp arg)
(dired-get-marked-files t))
(t
(dired-get-marked-files
'no-dir (prefix-numeric-value arg))))
(dired-get-marked-files 'no-dir))
" ") ;; <---- [[[ Here's the hardcoded delimiter ]]]
...)
#+END_SRC
I thought that it would be useful to have a defvar that allows
specifying the delimiter for copied filenames through the mentioned
function. Perhaps, its name could be "dired-copy-filename-delimiter".
P.S. This is my first time interacting with this mailing list; forgive
me if I did something wrong.
next reply other threads:[~2021-05-25 19:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 19:12 Rodrigo Morales [this message]
2021-05-25 19:34 ` bug#48657: Defvar delimiter for dired-copy-filename-as-kill Eli Zaretskii
2021-10-24 7:11 ` Stefan Kangas
2021-10-24 12:01 ` Eli Zaretskii
2021-10-24 12:27 ` Stefan Kangas
2021-10-24 14:01 ` Eli Zaretskii
2021-10-24 14:27 ` Stefan Kangas
2022-07-15 10:37 ` Lars Ingebrigtsen
2022-07-15 14:16 ` Drew Adams
2021-05-25 19:44 ` bug#48657: [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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v97639x9.fsf@gmail.com \
--to=moralesrodrigo1100@gmail.com \
--cc=48657@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).