unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: David Lambert <b49p23tivg@gmail.com>
Cc: 60195@debbugs.gnu.org
Subject: bug#60195: 27.1; dired failed to delete file with multi-line name
Date: Mon, 19 Dec 2022 14:42:03 +0200	[thread overview]
Message-ID: <83mt7jefac.fsf@gnu.org> (raw)
In-Reply-To: <62adbb76-74ab-7868-64a8-81bc3f051cc1@gmail.com> (message from David Lambert on Sun, 18 Dec 2022 23:42:56 -0500)

> Date: Sun, 18 Dec 2022 23:42:56 -0500
> From: David Lambert <b49p23tivg@gmail.com>
> 
> I had a file named
> ' 0 -1 -2 -3'$'\n'' -4 -5 -6 -7'$'\n'' -8 -9 -10 -11'$'\n\n''-12 -13 -14 
> -15'$'\n''-16 -17 -18 -19'$'\n''-20 -21 -22 -23'$'\n'
> 
> attempting to delete it with the usual d x yes instructions, emacs did
> not remove the file.

This is a known limitation.  The workaround, per the Emacs manual and
the doc string of dired-listing-switches, is:

     Dired does not handle files that have names with embedded newline
  characters well.  If you have many such files, you may consider adding
  ‘-b’ to ‘dired-listing-switches’.  This will quote all special
  characters and allow Dired to handle them better.  (You can also use the
  ‘C-u C-x d’ command to add ‘-b’ temporarily.)

Unfortunately, we cannot add -b to the switches by default because it
is problematic with other nonprintable characters that Dired handles
well without -b.





      reply	other threads:[~2022-12-19 12:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19  4:42 bug#60195: 27.1; dired failed to delete file with multi-line name David Lambert
2022-12-19 12:42 ` Eli Zaretskii [this message]

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=83mt7jefac.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=60195@debbugs.gnu.org \
    --cc=b49p23tivg@gmail.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 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).