GNU bug report logs - #7112
24.0.50; [PATCH] `ls-lisp-insert-directory' should be no-op for empty FILE

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Mon, 27 Sep 2010 00:20:03 UTC

Severity: minor

Tags: patch

Found in version 24.0.50

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 7112-close <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 7112-close <at> debbugs.gnu.org
Subject: Re: 24.0.50;
	[PATCH] `ls-lisp-insert-directory' should be no-op for empty FILE
Date: Tue, 02 Aug 2011 23:32:07 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> `ls-lisp-insert-directory' should not raise a low-level, Args out of
> range error.  It should itself DTRT for an empty file name.

Which is to give an error.  It's a nonsensical input.

>> > Why not try it yourself, using the emacs -Q recipe:
>> >
>> > M-: (dired '("foobar" "111.el" ""))
>> 
>> Why would you call this function with an empty string as a parameter?
>
> Because you can?  No experienced programmer takes refuge behind the argument
> "Why would anyone ever do that?" or "Don't worry; no one would ever do that."

It gives an error.  If you call `dired' with `t', you get

Debugger entered--Lisp error: (wrong-type-argument stringp t)
  file-name-as-directory(t)
  dired-noselect(t nil)

Don't do that, then.  I'm closing this report.
-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




This bug report was last modified 13 years and 356 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.