GNU bug report logs -
#7027
24.0.50; Dired error (wrong-type-arg stringp nil) with cons arg with wildcard in name
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Sun, 12 Sep 2010 22:07:02 UTC
Severity: normal
Tags: easy, moreinfo
Found in version 24.0.50
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7027 in the body.
You can then email your comments to 7027 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7027
; Package
emacs
.
(Sun, 12 Sep 2010 22:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 12 Sep 2010 22:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
emacs -Q
Eval this: (dired '("TTTT" "111.el" "b*.el")), assuming there is a file
111.el and some file matching b*.el (but no file with name "b*.el",
i.e. with a literal `*' in the name).
You get this error: (wrong-type-argument stringp nil)
The problem is in `ls-lisp-insert-directory':
(defun ls-lisp-insert-directory
(file switches time-index wildcard-regexp full-directory-p)
"..."
(if (or wildcard-regexp full-directory-p)
(let* ((dir (file-name-as-directory file))
...))))
This gets eval'd (where the ^@ is really a control char):
(ls-lisp-insert-directory nil (97 108) nil "\\`b[^^@]*\\.el\\'" nil)
That happens because of this call:
(insert-directory "b*.el" "-al" nil nil)
which calls (string-match "[[?*]" "b*.el") returning 1 (non-nil).
(file-exists-p "b*.el") then returns nil,
and (wildcard-to-regexp "b*.el") returns the regexp shown above.
A proper message should be shown (but no error raised) saying, as for
any non-existent file, "b*.el: doesn't exist or is inaccessible".
And processing should then continue, displaying Dired with all of the
existing files that correspond to the names in the cons arg (e.g. 111.el
in this case).
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2010-09-06 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
Added tag(s) easy.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Mon, 12 Jun 2017 00:23:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#7027
; Package
emacs
.
(Tue, 01 Oct 2019 20:00:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 7027 <at> debbugs.gnu.org (full text, mbox):
"Drew Adams" <drew.adams <at> oracle.com> writes:
> Eval this: (dired '("TTTT" "111.el" "b*.el")), assuming there is a file
> 111.el and some file matching b*.el (but no file with name "b*.el",
> i.e. with a literal `*' in the name).
>
> You get this error: (wrong-type-argument stringp nil)
Can you post the backtrace?
[...]
> This gets eval'd (where the ^@ is really a control char):
>
> (ls-lisp-insert-directory nil (97 108) nil "\\`b[^^@]*\\.el\\'" nil)
>
> That happens because of this call:
>
> (insert-directory "b*.el" "-al" nil nil)
>
> which calls (string-match "[[?*]" "b*.el") returning 1 (non-nil).
>
> (file-exists-p "b*.el") then returns nil,
> and (wildcard-to-regexp "b*.el") returns the regexp shown above.
I tried reproducing with
(ls-lisp-insert-directory nil '(97 108) nil (wildcard-to-regexp "b*.el") nil)
but that fails with a different error since FILE can't be nil.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 01 Oct 2019 20:00:03 GMT)
Full text and
rfc822 format available.
Reply sent
to
Stefan Kangas <stefan <at> marxist.se>
:
You have taken responsibility.
(Fri, 17 Apr 2020 10:23:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
bug acknowledged by developer.
(Fri, 17 Apr 2020 10:23:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 7027-done <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> "Drew Adams" <drew.adams <at> oracle.com> writes:
>
>> Eval this: (dired '("TTTT" "111.el" "b*.el")), assuming there is a file
>> 111.el and some file matching b*.el (but no file with name "b*.el",
>> i.e. with a literal `*' in the name).
>>
>> You get this error: (wrong-type-argument stringp nil)
>
> Can you post the backtrace?
>
> [...]
>
>> This gets eval'd (where the ^@ is really a control char):
>>
>> (ls-lisp-insert-directory nil (97 108) nil "\\`b[^^@]*\\.el\\'" nil)
>>
>> That happens because of this call:
>>
>> (insert-directory "b*.el" "-al" nil nil)
>>
>> which calls (string-match "[[?*]" "b*.el") returning 1 (non-nil).
>>
>> (file-exists-p "b*.el") then returns nil,
>> and (wildcard-to-regexp "b*.el") returns the regexp shown above.
>
> I tried reproducing with
>
> (ls-lisp-insert-directory nil '(97 108) nil (wildcard-to-regexp "b*.el") nil)
>
> but that fails with a different error since FILE can't be nil.
More information was requested, but none was given within 28 weeks, so
I'm closing this bug. If this is still an issue, please reply to this
email (use "Reply to all" in your email client) and we can reopen the
bug report.
Best regards,
Stefan Kangas
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 15 May 2020 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 37 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.