From: "Drew Adams" <drew.adams@oracle.com>
To: 7112@debbugs.gnu.org
Subject: bug#7112: 24.0.50; [PATCH] `ls-lisp-insert-directory' should be no-op for empty FILE
Date: Sun, 26 Sep 2010 17:21:58 -0700 [thread overview]
Message-ID: <68BA79A0F7304F01870834FE12F89A36@us.oracle.com> (raw)
You can call `dired' passing a cons arg that includes a list of file
names. An empty file name causes this ugly error:
(error "Args out of range: \"\", -1")
The reason is the following code near the end of
`ls-lisp-insert-directory':
;; If not full-directory-p, FILE *must not* end in /, as
;; file-attributes will not recognize a symlink to a directory,
;; so must make it a relative filename as ls does:
(if (file-name-absolute-p file) (setq file (expand-file-name file)))
(if (eq (aref file (1- (length file))) ?/)
(setq file (substring file 0 -1)))
`ls-lisp-insert-directory' should in fact do nothing at all (no-op) if
FILE is "". The entire body should be wrapped in this:
(when (> (length file) 0)
...)
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2010-09-20 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
next reply other threads:[~2010-09-27 0:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 0:21 Drew Adams [this message]
2011-07-13 13:18 ` bug#7112: 24.0.50; [PATCH] `ls-lisp-insert-directory' should be no-op for empty FILE Lars Magne Ingebrigtsen
2011-07-13 15:13 ` Drew Adams
2011-08-02 20:06 ` Lars Magne Ingebrigtsen
2011-08-02 21:25 ` Drew Adams
2011-08-02 21:32 ` Lars Magne Ingebrigtsen
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=68BA79A0F7304F01870834FE12F89A36@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=7112@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).