From: Eli Zaretskii <eliz@gnu.org>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: 27844@debbugs.gnu.org
Subject: bug#27844: 26.0.50; Dired w/ eshell-ls doesn't support wildcards in file name
Date: Tue, 01 Aug 2017 16:40:02 +0300 [thread overview]
Message-ID: <8360e71k5p.fsf@gnu.org> (raw)
In-Reply-To: <87lgn4j8ko.fsf@calancha-pc> (message from Tino Calancha on Tue, 01 Aug 2017 12:00:39 +0900)
> From: Tino Calancha <tino.calancha@gmail.com>
> Cc: 27844@debbugs.gnu.org
> Date: Tue, 01 Aug 2017 12:00:39 +0900
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Tino Calancha <tino.calancha@gmail.com>
> >> Date: Thu, 27 Jul 2017 18:23:08 +0900
> >>
> >> `eshell-extended-glob' returns a list of matches on success, otherwise
> >> it returns FILE; if no match i think we should signal an error.
> >
> > Whether this should be an error or just FILE is a matter of personal
> > preferences, I think. Some shells behave this way, others the other
> > way. So either we should leave your original patch as it was, or
> > introduce a defcustom to produce an error if the user so wants.
> Indeed such defcustom already does exist: eshell-error-if-no-glob
> (default to nil).
> You can see at the end of `eshell-extended-glob':
> (if eshell-error-if-no-glob
> (error "No matches found: %s" glob)
> glob)
I'm confused: I wasn't commenting on what eshell-extended-glob does, I
was commenting about your code:
+ (let ((matches (eshell-extended-glob file)))
+ (if (consp matches)
+ (mapcar #'file-relative-name matches)
+ (user-error (format "%s: No files matching wildcard" file))))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If eshell-extended-glob already signals an error when it's TRT, why do
you need to signal an error if Eshell doesn't? What am I missing?
Thanks.
next prev parent reply other threads:[~2017-08-01 13:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-27 3:27 bug#27844: 26.0.50; Dired w/ eshell-ls doesn't support wildcards in file name Tino Calancha
2017-07-27 9:23 ` Tino Calancha
2017-07-29 9:06 ` Eli Zaretskii
2017-08-01 3:00 ` Tino Calancha
2017-08-01 13:40 ` Eli Zaretskii [this message]
2017-08-01 14:06 ` Tino Calancha
2017-08-01 15:37 ` Eli Zaretskii
2017-08-01 16:04 ` Tino Calancha
2017-08-01 18:43 ` Eli Zaretskii
2017-08-02 8:49 ` Tino Calancha
2017-08-04 13:15 ` Eli Zaretskii
2017-07-29 9:05 ` Eli Zaretskii
2017-08-06 4:30 ` Tino Calancha
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=8360e71k5p.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=27844@debbugs.gnu.org \
--cc=tino.calancha@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).