From: Whitfield Diffie <whitfield.diffie@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Cc: 13165@debbugs.gnu.org
Subject: bug#13165: Fwd: Newlines in file names
Date: Fri, 14 Dec 2012 21:33:28 -0800 [thread overview]
Message-ID: <CAF+O-CUWyQQLfz+Qnj8TQypn-gB59n212mnhgHMW5mdSa8icyA@mail.gmail.com> (raw)
In-Reply-To: <s3lid2dg9i.fsf@fencepost.gnu.org>
>> In emacs 22.1.1, if you have a file whose name contains a carriage
>> return and put the cursor on the line with that file in dired, then
>> (file-exists-p (dired-get-filename)) is nil.
>
> It works fine if you add -b to dired-listing-switches.
I find it hard to see (null (file-exists-p (dired-get-filename)))
as anything but a bug; if -b didn't put the filenames in the right
form, dired should have done so.
I am, however, very grateful to you for setting me on the right
path. My problem was code in dired-insert-directory that reformats
filenames if it does not find b in the listing-switches. Your message
put me on the right track and I have solved the problem. Thank you.
What I am working with is a substantially revised dired, e.g.,
/Users/diffie/system/emacs/local/dired-mods:
dr-x 10 29Oct12 17:10:33 dired-sort-halves.el
dr-x 16 27Oct12 18:16:51 dired-sorting.el
-r-- 2006 22Apr09 07:41:09 directory-needs-reversion-p.el
-r-- 4714 7Feb12 20:19:43 dired-add-entry.el
-r-- 418 20Jun06 22:16:47 dired-add-file.el
-r-- 939 18Mar07 21:06:53 dired-add-zero-in-filename.el
-r-- 594 30Nov11 11:06:45 dired-approximate-position.el
-r-- 231 7Feb12 19:58:01 dired-at-headerline.el
in which there are numerous format switches. (Anyone who is
interested, is naturally welcome to it; I haven't compared it with
dired in later versions of Emacs.)
> emacs-22.1 -Q --eval '(setq dired-listing-switches "-alb")'
> This was a suggestion when this was a help request:
If it was a response to my help request, it didn't reach me.
> I see no prospect of Dired handling file names with newlines without the
> -b switch in use.
My dired doesn't depend on ls. I does use it at present but I
think directory-files would do just as well.
Thanks again,
Whit
next prev parent reply other threads:[~2012-12-15 5:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 19:47 Newlines in file names Whitfield Diffie
2012-12-11 14:02 ` Doug Lewan
2012-12-11 15:19 ` Whitfield Diffie
2012-12-11 16:34 ` Doug Lewan
2012-12-12 22:50 ` bug#13165: Fwd: " Whitfield Diffie
2012-12-12 23:04 ` Glenn Morris
2012-12-15 5:33 ` Whitfield Diffie [this message]
2012-12-15 20:04 ` Whitfield Diffie
2012-12-17 15:29 ` Stefan Monnier
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=CAF+O-CUWyQQLfz+Qnj8TQypn-gB59n212mnhgHMW5mdSa8icyA@mail.gmail.com \
--to=whitfield.diffie@gmail.com \
--cc=13165@debbugs.gnu.org \
--cc=rgm@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 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.