From unknown Tue Jun 24 17:26:06 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#29157 <29157@debbugs.gnu.org> To: bug#29157 <29157@debbugs.gnu.org> Subject: Status: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" Reply-To: bug#29157 <29157@debbugs.gnu.org> Date: Wed, 25 Jun 2025 00:26:06 +0000 retitle 29157 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" reassign 29157 emacs submitter 29157 Pierre Neidhardt severity 29157 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 05 06:38:00 2017 Received: (at submit) by debbugs.gnu.org; 5 Nov 2017 11:38:00 +0000 Received: from localhost ([127.0.0.1]:51272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBJFX-0004hi-RT for submit@debbugs.gnu.org; Sun, 05 Nov 2017 06:38:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBJFW-0004hV-1a for submit@debbugs.gnu.org; Sun, 05 Nov 2017 06:37:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBJFP-0003Wm-VD for submit@debbugs.gnu.org; Sun, 05 Nov 2017 06:37:52 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57442) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eBJFP-0003Wi-Rm for submit@debbugs.gnu.org; Sun, 05 Nov 2017 06:37:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBJFO-00046a-LH for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2017 06:37:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBJFL-0003Uj-Id for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2017 06:37:50 -0500 Received: from mail-wr0-x233.google.com ([2a00:1450:400c:c0c::233]:50222) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eBJFL-0003UP-AN for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2017 06:37:47 -0500 Received: by mail-wr0-x233.google.com with SMTP id p96so6073844wrb.7 for ; Sun, 05 Nov 2017 03:37:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=CESNicPrJ4j1kfrWAaG18Fnd5Y+yonp5jdQKYNnEhXE=; b=H4FBlONLOUArEkPJbA8+Q8pDiTwrTkluEjje+qDDn++KWlqdiQIGVh4sm5PeA7mEux dLrnJ2PxnzspGEqssZmIYhe5CX14iLJTbIDP3abEj8l0Fq0htPPmvm83qr/VfooBiI3q 9Ux/ux2Puvpj0FhRve6qsAU+JN1ScZHXKjn6ouIrgUcL31kuIKjGkCQZqDGuG/+EL2sW 1ji3R5d85lLFsuWAP9rhQf8X/DrIN8qG14YLGOhF7p7TgjFXHc29SH48VJG9h2VBKeCA 1N1OYB4Z6774fvesP4fw6S8a8KFsM2RPaqw6yZCBxuqftBMK+L3N5vJEpfECAj95T8mO kfPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version:content-transfer-encoding; bh=CESNicPrJ4j1kfrWAaG18Fnd5Y+yonp5jdQKYNnEhXE=; b=G7K+wTOIzzUfhe1AiEPnhpOTvAJ6E+1Ix+15fPXMB+elTolt1w9JqO8e16L+yBDFh5 x2HJRYZfJwW33dse0+llUnZej1gQROQjWAPRXjnmXzdcAFxIrUalXcwWg8bqtu3o7mUh q+cPLKd36WmshSworkUMhS2FI/C/8Vsn4Jcz7Ab22Xpn1SH2voGFI0+uTPK5ICWwEVYI dxAOeD4hlwtllD977xBRZuIM+p19hd8qoCLxNAhyNEqFDLj/e+EidlPGwk6zJorW5+fY GKdi1tYtFVkcwF7TQV9SuVW4+sHQUAMG8h/lYWecdk96yWLx5hZziWPoKu2UArbKGrLK p8Tg== X-Gm-Message-State: AMCzsaWqkkljtFMx/L72zYScg4lUngN9YOhV+8ZaBmbfh/gBRB0iRUxM ChC02XgVNk5a5lTmhVBAngdfxw== X-Google-Smtp-Source: ABhQp+TJDXViw2imagBQ1OPcNl5M86YSdD24pUb5ipqwBqmWOhONDDLIjZVNYt1FzDsGyOV1N/pwLw== X-Received: by 10.223.134.106 with SMTP id 39mr9660398wrw.134.1509881865926; Sun, 05 Nov 2017 03:37:45 -0800 (PST) Received: from dhiov23k ([197.0.145.22]) by smtp.gmail.com with ESMTPSA id v16sm3153619wra.14.2017.11.05.03.37.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2017 03:37:45 -0800 (PST) User-agent: mu4e 0.9.18; emacs 25.3.1 From: Pierre Neidhardt To: bug-gnu-emacs@gnu.org Subject: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" Date: Sun, 05 Nov 2017 12:37:44 +0100 Message-ID: <87tvy9rm5z.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) - emacs -Q - M-x eshell > date +%Z Invalid time specification > date "+%Z" Invalid time specification > date #+%Z Sun Nov 5 12:35:51 2017 > echo $PATH | sed "s/[^o]foo[^o]/bar/g" Unknown predicate character ‘b’ Am I misunderstanding Eshell's syntax? In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.16) of 2017-11-05 built on dhiov23k Windowing system distributor 'The X.Org Foundation', version 11.0.11905000 System Description: Gentoo Base System release 2.4.1 Configured using: 'configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/emacs-25.3 --htmldir=/usr/share/doc/emacs-25.3/html --libdir=/usr/lib64 --program-suffix=-emacs-25 --infodir=/usr/share/info/emacs-25 --localstatedir=/var --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp --with-gameuser=:gamestat --without-compress-install --with-file-notification=inotify --enable-acl --without-dbus --without-modules --without-gpm --without-hesiod --without-kerberos --without-kerberos5 --with-xml2 --without-selinux --with-gnutls --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns --without-gconf --without-gsettings --without-toolkit-scroll-bars --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --with-imagemagick --with-xft --without-cairo --without-libotf --without-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets GENTOO_PACKAGE=app-editors/emacs-25.3 'CFLAGS=-march=ivybridge -O2 -pipe' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB GTK3 X11 Important settings: value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 05 08:58:32 2017 Received: (at 29157) by debbugs.gnu.org; 5 Nov 2017 13:58:32 +0000 Received: from localhost ([127.0.0.1]:51343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBLRY-0007UY-4k for submit@debbugs.gnu.org; Sun, 05 Nov 2017 08:58:32 -0500 Received: from mail-it0-f49.google.com ([209.85.214.49]:51050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBLRW-0007UL-LJ for 29157@debbugs.gnu.org; Sun, 05 Nov 2017 08:58:30 -0500 Received: by mail-it0-f49.google.com with SMTP id 72so2389061itl.5 for <29157@debbugs.gnu.org>; Sun, 05 Nov 2017 05:58:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=vV9i6f8ggnxA/g83ymOf8N9gpLapJiJ7rdXqYrkykXw=; b=JmSlDBHY1ErY/4QX5lBNSiYicks8w/sgIPFaVZ2qv5EAPKMz6jg4Cw04T0GlgwEIXx 9/Y9WOsTGOYrCbOzFu90GL4esvE/gm8aTllkHg8ufAndOyhT8zrQh2BnrVR8EDNbQh8E qOXUshD7n6oBGYqEL+krryOHSbqfKSUlIKOLp5HzKa8yfuzztkBrdBZGBX0oEg4ngRDC gZoxUNvl0IT/yWi/iGecKms7NhZ1KVXdq0/E0TcfGPtDE3Po/dPom5B2H5euBnTP7QZq 6iknLfdyw5ePnRSokHCxbG1ntlrf8Pxbd3ot0+zKVjBxaSQ7TTX4iYg2QNmQoEmdJJrJ nzxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=vV9i6f8ggnxA/g83ymOf8N9gpLapJiJ7rdXqYrkykXw=; b=IELfcoGHykpa98PqqccZzJy/+hvpLsMGDx6jqGWI30sPndj8IFd27Ol0fNYFlB3L4j ywoiFLrHZfOduhTZoohtDfa1Hp2S9HZQ0J8UfBRICfp19eKQMusKjXZrMnl/IGgdl0cM 9qj0KiBCWcNCqVS5WEj1Zu71kNLJzUocI6cTh9onzo/r3odXuzCsGXw9UgHJm0DEGLMp O26LKaCPaL0Y1gG6nWXdPXysoMQtJNfEOqgV7b0jyCdtNlgc0G75+gkMd/Eyjjx+Wv66 vvzF3V4aoOaN8pa+jthgaVvGP+yN93nmfAd9yyiHOHt/GMSbKt9zk8TojTtPM2jske00 5r4g== X-Gm-Message-State: AJaThX7lMTZEtbCM9CbXhr/aeMGgUqFGMKcH8lTh+6/lHre8Q/vgdWnG WatFiRLA8vPT5tpKbchTnpdyLA== X-Google-Smtp-Source: ABhQp+TUD83oe8xGDcQLl9ImJWPBoUBWv2+Dni6GNLC28mdgVXeMxJJgiBY6e+7aFeusfVVLrbQ5qA== X-Received: by 10.36.9.144 with SMTP id 138mr6071816itm.106.1509890304772; Sun, 05 Nov 2017 05:58:24 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id e89sm4242390itd.3.2017.11.05.05.58.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2017 05:58:23 -0800 (PST) From: Noam Postavsky To: Pierre Neidhardt Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> Date: Sun, 05 Nov 2017 08:58:22 -0500 In-Reply-To: <87tvy9rm5z.fsf@gmail.com> (Pierre Neidhardt's message of "Sun, 05 Nov 2017 12:37:44 +0100") Message-ID: <87lgjk7rpd.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Pierre Neidhardt writes: > - emacs -Q > - M-x eshell > > > date +%Z > Invalid time specification ~/src/emacs $ which date eshell/date is an alias for =E2=80=98current-time-string=E2=80=99 in = =E2=80=98em-unix.el=E2=80=99. ~/src/emacs $ which *date /bin/date ~/src/emacs $ *date +%Z EST > > echo $PATH | sed "s/[^o]foo[^o]/bar/g" > Unknown predicate character =E2=80=98b=E2=80=99 M-x toggle-debug-on-error gives more hints about this. Apparently this matches a "history reference": (defun eshell-history-reference (reference) "Expand directory stack REFERENCE. The syntax used here was taken from the Bash info manual. Returns the resultant reference, or the same string REFERENCE if none matched." ;; `^string1^string2^' ;; Quick Substitution. Repeat the last command, replacing ;; STRING1 with STRING2. Equivalent to `!!:s/string1/string2/' Debugger entered--Lisp error: (error "Unknown predicate character =E2=80=98= b=E2=80=99") signal(error ("Unknown predicate character =E2=80=98b=E2=80=99")) error("Unknown predicate character `%c'" 98) eshell-parse-modifiers() eshell-hist-parse-modifier("printf '<<%s>>\\n' \"s/[^o]foo/\"" ":s/o]foo[= /o]/bar/g\"/") eshell-history-reference("\"s/[^o]foo[^o]/bar/g\"") eshell-expand-history-references(# 81) run-hook-with-args(eshell-expand-history-references # 81) eshell-send-input(nil) funcall-interactively(eshell-send-input nil) call-interactively(eshell-send-input nil nil) command-execute(eshell-send-input) My suggestion for this is just to stop adding eshell-expand-history-references to eshell-expand-input-functions, and maybe even deprecate eshell-expand-history-references. I find the history expansion mechanism to be an annoyance in bash as well. --- i/lisp/eshell/em-hist.el +++ w/lisp/eshell/em-hist.el @@ -218,9 +218,6 @@ eshell-input-filter-initial-space =20 (defun eshell-hist-initialize () "Initialize the history management code for one Eshell buffer." - (add-hook 'eshell-expand-input-functions - 'eshell-expand-history-references nil t) - (when (eshell-using-module 'eshell-cmpl) (add-hook 'pcomplete-try-first-hook 'eshell-complete-history-reference nil t)) From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 05 09:16:42 2017 Received: (at 29157) by debbugs.gnu.org; 5 Nov 2017 14:16:42 +0000 Received: from localhost ([127.0.0.1]:51358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBLj8-0007ww-E5 for submit@debbugs.gnu.org; Sun, 05 Nov 2017 09:16:42 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:46220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBLj7-0007wk-Gw for 29157@debbugs.gnu.org; Sun, 05 Nov 2017 09:16:41 -0500 Received: by mail-wm0-f54.google.com with SMTP id r68so9192109wmr.1 for <29157@debbugs.gnu.org>; Sun, 05 Nov 2017 06:16:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=UabzcNuNT2EPXdre+YLrS73O8jzhvzDJ5CUBJghhYRk=; b=KOSPnx7Cu8hGXjbEoAuc+uvjaUQnfQrOiohydUl9onEixYn0x3S2n65jqnXirYNGNl iVu/vxD+Ch4GbL3+9H4BkWC36TuIVaW2xjj+T1KC+DI/5bn8zAepgLNA9M5xK41CSY32 LN+PCCAMi9Sz1p+1dCNi4yR+NHiYw5BfaX72pLpY5gIPfjb56VQLosB2hAkbxIlwsHBq /atvkcMUefCjaUwt3W8MYM7LpCwGoAMrZtmaQ+YwqEe3BgFCYxYU9KZmJ2x5FYCmyhhb eS4zozpvoBx7u8N0PG8e7lUOjaO4lKmEKXrDRbsTfl7h4dVKtD7yJFoNz4GwyHrfWuGu zAyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=UabzcNuNT2EPXdre+YLrS73O8jzhvzDJ5CUBJghhYRk=; b=mOjM6kHHLWN4k28Qqh273ORpqUzy55z0XA2Q7oXgLzYMEhvhblszVoeITQ712kxBKd sr5KeryQO7zLZcn42Qf16c6ecdcb1l7QtsDftUi+u746zyGal+4bBOQxRfyJ48yWzJJ0 R+cd+iz6cD97vlA5c+fxoLNy5H1lr6i6n8KC3r7k5Kv7DmR5uBk5cUY90xQyaDxfdD5L EQMLOnosr09jbhKaPuEb6W8wr66l5KMW0Ribd9lDxuZaLgpbn7hnOzWjyPLSBXGWIRXp vdF1Qw35TmdrFjoT4drdUt68Bqb7aBhp377Y/mERUaXHK7T96wid5Zb17AcBKjfdS+8I teLw== X-Gm-Message-State: AJaThX6vKFxlHRq6zp1u3o1Ne54zW+0oHAikgWyxtiLkC5Fds0cInliw WSBHwoeqbxg3wNdaCNcSGaQqDzwQ X-Google-Smtp-Source: ABhQp+SRX58T9v6Nr6aaNJWOY1r610oSP1iH/QKLlMUyGH4JL8Q0pjBBG4hUP6y48fsmSCrrWayEpg== X-Received: by 10.28.131.2 with SMTP id f2mr2858232wmd.137.1509891395579; Sun, 05 Nov 2017 06:16:35 -0800 (PST) Received: from dhiov23k ([197.0.145.22]) by smtp.gmail.com with ESMTPSA id w4sm10357206wrc.17.2017.11.05.06.16.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2017 06:16:34 -0800 (PST) References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Pierre Neidhardt To: Noam Postavsky Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" In-reply-to: <87lgjk7rpd.fsf@users.sourceforge.net> Date: Sun, 05 Nov 2017 15:16:33 +0100 Message-ID: <87lgjkoloe.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Noam Postavsky writes: > Pierre Neidhardt writes: > >> - emacs -Q >> - M-x eshell >> >> > date +%Z >> Invalid time specification > > ~/src/emacs $ which date > eshell/date is an alias for ‘current-time-string’ in ‘em-unix.el’. > ~/src/emacs $ which *date > /bin/date > ~/src/emacs $ *date +%Z > EST Duh! That was stupid, sorry. Anyways, that might ring an alarm here: maybe eshell/date should not exist. What's the point of having it? I'm not sure. It is obviously less powerful than the system `date'. >> > echo $PATH | sed "s/[^o]foo[^o]/bar/g" >> Unknown predicate character ‘b’ > > M-x toggle-debug-on-error gives more hints about this. Apparently this > matches a "history reference": > > (defun eshell-history-reference (reference) > "Expand directory stack REFERENCE. > The syntax used here was taken from the Bash info manual. > Returns the resultant reference, or the same string REFERENCE if none > matched." > ;; `^string1^string2^' > ;; Quick Substitution. Repeat the last command, replacing > ;; STRING1 with STRING2. Equivalent to `!!:s/string1/string2/' > > Debugger entered--Lisp error: (error "Unknown predicate character ‘b’") > signal(error ("Unknown predicate character ‘b’")) > error("Unknown predicate character `%c'" 98) > eshell-parse-modifiers() > eshell-hist-parse-modifier("printf '<<%s>>\\n' \"s/[^o]foo/\"" ":s/o]foo[/o]/bar/g\"/") > eshell-history-reference("\"s/[^o]foo[^o]/bar/g\"") > eshell-expand-history-references(# 81) > run-hook-with-args(eshell-expand-history-references # 81) > eshell-send-input(nil) > funcall-interactively(eshell-send-input nil) > call-interactively(eshell-send-input nil nil) > command-execute(eshell-send-input) > > > My suggestion for this is just to stop adding > eshell-expand-history-references to eshell-expand-input-functions, and > maybe even deprecate eshell-expand-history-references. I find the > history expansion mechanism to be an annoyance in bash as well. > > --- i/lisp/eshell/em-hist.el > +++ w/lisp/eshell/em-hist.el > @@ -218,9 +218,6 @@ eshell-input-filter-initial-space > > (defun eshell-hist-initialize () > "Initialize the history management code for one Eshell buffer." > - (add-hook 'eshell-expand-input-functions > - 'eshell-expand-history-references nil t) > - > (when (eshell-using-module 'eshell-cmpl) > (add-hook 'pcomplete-try-first-hook > 'eshell-complete-history-reference nil t)) That does it for me. I did not even know this feature existed. I'd it proves more useful in an environment with poor selection / editing capabilities, i.e. a terminal shell. Emacs does not need that when you can fuzzy-search your history and modify your prompt with arbitrary bindings / Lisp code. -- Pierre Neidhardt There are more things in heaven and earth than any place else. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 05 10:16:27 2017 Received: (at 29157) by debbugs.gnu.org; 5 Nov 2017 15:16:27 +0000 Received: from localhost ([127.0.0.1]:52312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBMex-0001CW-34 for submit@debbugs.gnu.org; Sun, 05 Nov 2017 10:16:27 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:55081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBMeu-0001CN-Vj for 29157@debbugs.gnu.org; Sun, 05 Nov 2017 10:16:25 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3yVK601KjDz1qsh5; Sun, 5 Nov 2017 16:16:24 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3yVK6002RJz1r2y6; Sun, 5 Nov 2017 16:16:23 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id WgDh0dM77lKz; Sun, 5 Nov 2017 16:16:23 +0100 (CET) X-Auth-Info: 6tgATJ0KoKjRcn+LIxo0mtJkKdYnf4usS41qyOYx6wBAy3yu2q7zOydweP7XW9XC Received: from localhost (ppp-188-174-159-215.dynamic.mnet-online.de [188.174.159.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 5 Nov 2017 16:16:23 +0100 (CET) Received: by localhost (Postfix, from userid 1000) id C0BAC2C135B; Sun, 5 Nov 2017 16:16:22 +0100 (CET) From: Andreas Schwab To: Noam Postavsky Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> X-Yow: Kids, the seven basic food groups are GUM, PUFF PASTRY, PIZZA, PESTICIDES, ANTIBIOTICS, NUTRA-SWEET and MILK DUDS!! Date: Sun, 05 Nov 2017 16:16:22 +0100 In-Reply-To: <87lgjk7rpd.fsf@users.sourceforge.net> (Noam Postavsky's message of "Sun, 05 Nov 2017 08:58:22 -0500") Message-ID: <87y3nkycvt.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, Pierre Neidhardt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Nov 05 2017, Noam Postavsky wrote: > ;; `^string1^string2^' > ;; Quick Substitution. Repeat the last command, replacing > ;; STRING1 with STRING2. Equivalent to `!!:s/string1/string2/' That substitution is only supposed to be performed when occuring at the start of the line. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 09 21:04:22 2017 Received: (at 29157) by debbugs.gnu.org; 10 Nov 2017 02:04:23 +0000 Received: from localhost ([127.0.0.1]:32941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCygA-0000Py-MH for submit@debbugs.gnu.org; Thu, 09 Nov 2017 21:04:22 -0500 Received: from mail-io0-f179.google.com ([209.85.223.179]:47216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCyg9-0000Pl-Kj for 29157@debbugs.gnu.org; Thu, 09 Nov 2017 21:04:22 -0500 Received: by mail-io0-f179.google.com with SMTP id h70so11970475ioi.4 for <29157@debbugs.gnu.org>; Thu, 09 Nov 2017 18:04:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=5IeBc5iDe6wJBZX4IJg8IUxLRyACXeYSW4iuZBpbu/Y=; b=sjKxn1Ic67X/9vC1PbhYJ7lGRB8zXZEh7MKiPnO2mE/Le4K86zlDD5PMaiTwqxB+Yd l1eWzMxy5JMwlLW1lTLhNLyAQlXycjCIEaxBHbGbJrO+XwZvYK3Pqh6jYzNkzsb99RVV Iq9hyHNEb+EdsGhduiXIQp3D7RbUVBAfiJWIcp+h8hHTViLGSjA2fs9LJhkhPPckYppF 8KsClABhAVvAXi0Hh+J0yBUKm5oNuEKDNW5omtS0g0Mg87SRGWjBG2NFfj/48SGjPMId YEGUjuKq9F0ZyqOxUHrj966/pdrYA3komhXlQ5S+qalDn21NRIykIEhYRUqU7xVYkDHg Mysw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=5IeBc5iDe6wJBZX4IJg8IUxLRyACXeYSW4iuZBpbu/Y=; b=WoEtn3+XoYmTVJyR+zQNF29IcmTP/hYrdYsdzPKNsguacIUvWrRRr31jg3WVEQccRY orv0/r8tZ42yEmnUJ/hchVjAwXM9YDwloOPDMLS6SlifpkRG3Mj3kJJxCNAirq0tPCTU gh8RWe0MwBbq1Y31ckojf0kD0YkrV2ZnINcRAx6ni205NN0JfzqLH7Gkp2bFJmVrqCNf SCZsLhr7Rgb62mbJvcyn3uVDKal9OwWGRzy4AFAVijPCPxVPrjZ8iXPlZbW9qyWMR9tw aNoecPSok3A4kE/wgFLcmdFv0CnFt/Le6uQ4vqUfIhzj5qUre+PAnMYO5uazL+1QxPBf GEww== X-Gm-Message-State: AJaThX6VNOCA8WbWm0zjZAhBFwbMsFXVJ+4DkNNgwEjSaRvP2Qnkv20m jF2kNpyHWzalwg7YFPOpa4Y= X-Google-Smtp-Source: AGs4zMZgjPxfoSnAr57JVO0GG5t34hDFa/6+4Fv7LXxBnOTWEaOmn06GVb33N883hp9/ZXvNE6cogw== X-Received: by 10.107.107.3 with SMTP id g3mr3116421ioc.250.1510279456105; Thu, 09 Nov 2017 18:04:16 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id r16sm4081262ioi.61.2017.11.09.18.04.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Nov 2017 18:04:14 -0800 (PST) From: Noam Postavsky To: Andreas Schwab Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87y3nkycvt.fsf@linux-m68k.org> Date: Thu, 09 Nov 2017 21:04:13 -0500 In-Reply-To: <87y3nkycvt.fsf@linux-m68k.org> (Andreas Schwab's message of "Sun, 05 Nov 2017 16:16:22 +0100") Message-ID: <8760ai51pe.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, Pierre Neidhardt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Andreas Schwab writes: > On Nov 05 2017, Noam Postavsky wrote: > >> ;; `^string1^string2^' >> ;; Quick Substitution. Repeat the last command, replacing >> ;; STRING1 with STRING2. Equivalent to `!!:s/string1/string2/' > > That substitution is only supposed to be performed when occuring at the > start of the line. Hmm, I see that's the case by experimenting with bash, although the bash manual doesn't seem to actually say that. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 22 22:13:35 2017 Received: (at 29157) by debbugs.gnu.org; 23 Nov 2017 03:13:35 +0000 Received: from localhost ([127.0.0.1]:53253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHhxG-00032n-MW for submit@debbugs.gnu.org; Wed, 22 Nov 2017 22:13:34 -0500 Received: from mail-it0-f42.google.com ([209.85.214.42]:43920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHhxE-00032Z-Up for 29157@debbugs.gnu.org; Wed, 22 Nov 2017 22:13:33 -0500 Received: by mail-it0-f42.google.com with SMTP id m191so8564809itg.2 for <29157@debbugs.gnu.org>; Wed, 22 Nov 2017 19:13:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=2J5kLsVCJENaSr6F7R/r/ifphspwNu569y7/Yik7Vhw=; b=gXLWjhxE1uUDuiFILOExDkDOXjjK/Gu0FNJMTWyHdq4NHe9ivRdB4JYxL09wtd4Okh +sxD+iV/uXsd1Q4lOvD+J3c0rdo8Z7lsNyxgX6Kdk4hFKwDtsTXpExS0r1zFam2fSdAQ CodZ8NpDVhTSkTpepGSE9gX8xfEtJM6ncmuuSxp0wh83p4/9NLRce14Vj9Hk3DxvEHd7 JLkv8gwZO14LfiplhKLeMOuLONtlaF4u6pO98G9vySKhKGA0ZtlX0+bWe4SRVxUZSVpf 2+kzqcgQzki/imF28aePfnblDmIpK4lyVBSW09G4XeoisO+Fc5KCzgD5fPC6YH8Rv9+g CJpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=2J5kLsVCJENaSr6F7R/r/ifphspwNu569y7/Yik7Vhw=; b=T1KcdAq93Ev2vqWza/vScZvN0vwBiw5jLJz7mud5KpMNfbRu0kykZuzi9RJOdIuKpF 05rIzEa2R1PSWM9jzCjic0uW+lNyzzQWUo+kVCYP/WwG0sS7+jV8tUj/t7RnsOQuTCOU 5BTpTYVMlKDbaFMyuM8IMCUSbXJUAft+AEgo6xUKpR7g3Kr+h+ijHKymgnYkKNeEkaqk G4NOnb5M00V2X+ocfBy4tdoqUYqqfcQ46R86sUiUzUuM5r6UXdQkS8a+Tgga/SkBHCMU q/bLSMY3qEutXEhB+3wXRF8BOb1kXKNIncs0JydZq80sRPHMpyqYPqtFTsLn4XBEPn1f A0UA== X-Gm-Message-State: AJaThX4kcopl0XbSjUcjwwHNEYxOOxkSPQLdRk7n87cQU162iixiBkhd dZChNgIm8rqd78fAsn3vw/7DvQ== X-Google-Smtp-Source: AGs4zMays+tIs/e4y9lFxnVM7zmQT7CUe90/0GjVItXHcyXbWb7qaV93K0ndkCZjmGonQEF6w8Pm8A== X-Received: by 10.36.245.133 with SMTP id k127mr9735884ith.136.1511406807107; Wed, 22 Nov 2017 19:13:27 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id y133sm2723750itf.7.2017.11.22.19.13.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Nov 2017 19:13:25 -0800 (PST) From: Noam Postavsky To: Pierre Neidhardt Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> Date: Wed, 22 Nov 2017 22:13:24 -0500 In-Reply-To: <87lgjkoloe.fsf@gmail.com> (Pierre Neidhardt's message of "Sun, 05 Nov 2017 15:16:33 +0100") Message-ID: <87shd5znzf.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) --=-=-= Content-Type: text/plain Pierre Neidhardt writes: > Anyways, that might ring an alarm here: maybe eshell/date should not > exist. What's the point of having it? I'm not sure. It is obviously > less powerful than the system `date'. Eshell has lots of commands like that. I guess it makes it more portable? > That does it for me. I did not even know this feature existed. I'd it > proves more useful in an environment with poor selection / editing > capabilities, i.e. a terminal shell. Emacs does not need that when you > can fuzzy-search your history and modify your prompt with arbitrary > bindings / Lisp code. I agree. Although the expansion in this case is arguably a bug (as Andreas pointed out), I don't have much interest in fixing it. I propose just to disable it by default (in master). --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Disable-history-expansion-in-eshell-Bug-29157.patch Content-Description: patch >From c2753c383e603acfe15f70ee0cb3c93e624c6c39 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 22 Nov 2017 21:59:35 -0500 Subject: [PATCH] Disable history expansion in eshell (Bug#29157) History expansion is not so useful since interactive history commands are already provided. It can produce surprising errors when the user is not aware of the history designator syntax. * lisp/eshell/em-hist.el (eshell-hist-initialize): Don't add eshell-expand-history-references to eshell-expand-input-functions. * etc/NEWS: Announce it. --- etc/NEWS | 9 +++++++++ lisp/eshell/em-hist.el | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index c47ca42d27..5a01b912ec 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -109,6 +109,15 @@ Snake and Pong are more playable on HiDPI displays. *** Completing filenames in the minibuffer via 'C-TAB' now uses the styles as configured by the variable 'completion-styles'. +** Eshell + +--- +*** Expansion of history event designators is disabled by default. +To restore the old behavior, use + + (add-hook 'eshell-expand-input-functions + #'eshell-expand-history-references) + * New Modes and Packages in Emacs 27.1 diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 8084c12653..df462a7058 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -218,9 +218,6 @@ eshell-input-filter-initial-space (defun eshell-hist-initialize () "Initialize the history management code for one Eshell buffer." - (add-hook 'eshell-expand-input-functions - 'eshell-expand-history-references nil t) - (when (eshell-using-module 'eshell-cmpl) (add-hook 'pcomplete-try-first-hook 'eshell-complete-history-reference nil t)) -- 2.11.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 01:56:13 2017 Received: (at 29157) by debbugs.gnu.org; 23 Nov 2017 06:56:13 +0000 Received: from localhost ([127.0.0.1]:53279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHlQj-0008Vu-DN for submit@debbugs.gnu.org; Thu, 23 Nov 2017 01:56:13 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:35406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHlQh-0008Ve-GN for 29157@debbugs.gnu.org; Thu, 23 Nov 2017 01:56:11 -0500 Received: by mail-wm0-f43.google.com with SMTP id y80so14348529wmd.0 for <29157@debbugs.gnu.org>; Wed, 22 Nov 2017 22:56:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=0pYb60gWAHZQEwPyjr5G+vxfQ1VNdHOYNlvXpihoA1c=; b=Op68aVIO7oyst+KteWMi45+jEnSRoQrFN7YwuTIMKCv/9jc5oZky9+i/s+Yi1o1Kt5 jermTo/yZVnF090xXearR/mmE5sQ3+VGaeupwezlZe3ciGUjnEnKZAEfHagSdpGznSE/ g2xWo5WUy8t5FMQzvFyaxlNiirlb9dP76c5M/njtdzt1KXqiJW7BJTeyWHFv6csVJITb JWgNNNBaZkayTAY6XdMRCZQ/riN/1atYahKw/tQR0H7pMKlAhbdcLrm+c5oVNV6qz6ix xKLetnHyOs5p3R0yhvTFx3fkBi/weAHXMN0nS8EB9tDld2DjPlTyHPMEyU8XIobJH4oD A5CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=0pYb60gWAHZQEwPyjr5G+vxfQ1VNdHOYNlvXpihoA1c=; b=HuumF/8t6jWO/0/BFayWVi40lwtwMBSRHvQ1Xv9PnvOy24mra6P1Z1+1muclJwbvVl 0VnLtsuGmztTn1x0oNtf8P263HyXr9N08JWZ3h/nYGPj1bPc5HCaNZ+bQpAcrWYfPF66 5WEyKiYfzDYtfKpFaXrSFo04frQF4/cAfTIN8anATrKaNwEpkH+/moS6k1wQ94G6XGcC HTHRKcXMUGdTNQeUB4j6dZMPRknJ+Z6x7mgKXyW7OE5wpec4LbHFeiMVG1QgTNwW/81e W0IfKNuvBY4WzqGLvJx0SWg8/G4TGNcEWmCKxGDRI/JEgSjwqxCH63THisXvuy5XHmPo k5OQ== X-Gm-Message-State: AJaThX5MNZUgupbHYNuCJ90yuWfTH3pvjL//sGgiePopz/cUtG7WXfmd OrMw0jsMguOwKj7QqcaRGwnk2w== X-Google-Smtp-Source: AGs4zMZoMYD06q/sv97jP3VyfmwjDmVD3FVeWGEU+3bHYUgjIjIkL0VdhUsEtFltW+GjTLIWP2Wq1w== X-Received: by 10.28.132.19 with SMTP id g19mr5746062wmd.90.1511420165072; Wed, 22 Nov 2017 22:56:05 -0800 (PST) Received: from dhiov23k ([197.1.229.248]) by smtp.gmail.com with ESMTPSA id 80sm4847614wmk.14.2017.11.22.22.56.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Nov 2017 22:56:03 -0800 (PST) References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Pierre Neidhardt To: Noam Postavsky Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" In-reply-to: <87shd5znzf.fsf@users.sourceforge.net> Date: Thu, 23 Nov 2017 07:55:58 +0100 Message-ID: <87po891o1t.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Noam Postavsky writes: > Pierre Neidhardt writes: > >> Anyways, that might ring an alarm here: maybe eshell/date should not >> exist. What's the point of having it? I'm not sure. It is obviously >> less powerful than the system `date'. > > Eshell has lots of commands like that. I guess it makes it more portable? I'm really not sure where to go from here. Disabling eshell/date makes Eshell less portable on one system at least, that is Windows. But what does "portability" mean in this context? Are the coreutils meant to be part of Eshell? Why? Supporting `date' but not its arguments does not make up for actual portability I believe. Case in point: I got fooled. Let's take the case of BSD vs. GNU: bash or zsh do not wrap around `ls', so the behaviour will not be the same on BSD and GNU. Why should Eshell be any different? Eshell is meant to be interactive: does portability matter in that case? My current stance leans towards removing `date' and other commands that seem to be here for "portability" only. Wrappers like `grep' have a clear purpose: redirecting to a dedicated buffer. I think it's find to keep such commands. > I agree. Although the expansion in this case is arguably a bug (as > Andreas pointed out), I don't have much interest in fixing it. I > propose just to disable it by default (in master). Thank you. -- Pierre Neidhardt Would the last person to leave Michigan please turn out the lights? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAloWcP4ACgkQm9z0l6S7 zH9JeggAjIDZPyiRjneVk6vc688+a5djAWO+2XkqaxxZirfBbXhm4JerG86zNtes YlTxMBe/3OUfwalOaNPdTZcoX2AFQgSJztB8vfaM7UDZWycAoifagiv3IQ/UUVF5 jKU2d0sedFi7KWKVPAD4xCuuhy6S69NUy2EYovLweEAckRiLyl2xajOc8tyZ0a/I f99QtxE1DuCwspEM642AXPUc0Rf9wg5/MFDNEdWTsyvE4eolMTvNY0Bn4/dr7p75 J57elomf9evqtXv6fm6VZLPayGKg5jYGOEvXuWt0gEWoSFOdvFZm5hrUekpOKusE nNhP9LpzpcJmm/tEIRPLgXVTICmszQ== =fbEJ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 07:59:22 2017 Received: (at 29157) by debbugs.gnu.org; 23 Nov 2017 12:59:22 +0000 Received: from localhost ([127.0.0.1]:53470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHr6A-0002Tg-5Z for submit@debbugs.gnu.org; Thu, 23 Nov 2017 07:59:22 -0500 Received: from mail-it0-f54.google.com ([209.85.214.54]:43906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHr68-0002TQ-Fm for 29157@debbugs.gnu.org; Thu, 23 Nov 2017 07:59:20 -0500 Received: by mail-it0-f54.google.com with SMTP id m191so10021554itg.2 for <29157@debbugs.gnu.org>; Thu, 23 Nov 2017 04:59:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=uGpf6o0ydkKJhS/oXnizxLfU3/g64kMjCc+6QkEVlEw=; b=ROODpmEf0osH9rIeDl1ksUJ5/Ekw7zo0PckIn4sXQcuLmr4ACZB1/pZ2USCMthiViC UJ6Z0uVGltsE2ioRArsnj1ZfzqdrXrRFYCOO7e5hfb6k249Xpr0LYhJmnu4gQcs91JJo mWiSzOpD7q1gHMHrMnP4ngosLqO8Xa1oL4ic/QqBPvD6xSyJvWfr1mCljjZgrX5/rDzl 3XN90resKJ7jIrzgHGChlwuFEhYAt/J6HhZ0j/zqP7gQBetiBrKaGDb5dLJJGxbYOK4L oYYq5sJTGd397iPGFZHoJK2H00T/LCvYdzT+TRlQtkvc8snme+yzp5sQreBscY1uscRJ CjSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=uGpf6o0ydkKJhS/oXnizxLfU3/g64kMjCc+6QkEVlEw=; b=PDtE7xid+2Q3XXptuovNExQ4jK3UgP382fS0ec7WmT4jy9+D1twhfO5NKWvvd/EOfN OIXijL7/8NvcI40scWIxbkWJCwGYuW5iFXugkRy580o7YxFFnw4WJgrhtdwi8qMjgHKG fDEJcPHhROlt87fAcSudrjRdyOyqEaMWV20hhicTMtwG7EUeU5GlWcOSfQQfbk6P1KOA SfAuMmpHWQqoBQf9rRrYymHM1GpEh9uMN54uhFF+u7n/a7ZKBD1rfmHdFhYjNpZztbsT KpwIxW9Pls9BFZs4aVFcej2vy08XI/cz9SvLINTOVaH95Aox6njKxqFlus6AgodV72/l uqhg== X-Gm-Message-State: AJaThX4d8allzmtCETP3D+vW/HHKNLRrrf94qO9tFr7MD2byt6ykaZv5 8P4QltSzEtCgOq8ux+Qwt43jOQ== X-Google-Smtp-Source: AGs4zMaiEMvvdzJ360x4NAkJOVG5uhHTg468hprVl6UiuUCbn6cCTuxTAyr07f7KsQG6QmHL2fD+iw== X-Received: by 10.36.83.137 with SMTP id n131mr12344943itb.82.1511441954358; Thu, 23 Nov 2017 04:59:14 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id 139sm2819659itm.2.2017.11.23.04.59.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Nov 2017 04:59:12 -0800 (PST) From: Noam Postavsky To: Pierre Neidhardt Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> Date: Thu, 23 Nov 2017 07:59:10 -0500 In-Reply-To: <87po891o1t.fsf@gmail.com> (Pierre Neidhardt's message of "Thu, 23 Nov 2017 07:55:58 +0100") Message-ID: <87po89ywv5.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) --=-=-= Content-Type: text/plain Pierre Neidhardt writes: > Disabling eshell/date makes Eshell less portable on one system at least, > that is Windows. But what does "portability" mean in this context? Are > the coreutils meant to be part of Eshell? Why? Supporting `date' but not > its arguments does not make up for actual portability I believe. Case > in point: I got fooled. > > Let's take the case of BSD vs. GNU: bash or zsh do not wrap around `ls', > so the behaviour will not be the same on BSD and GNU. Why should Eshell > be any different? Eshell isn't exactly the same as bash or zsh. You can use M-x shell if you prefer them. We could fallback to the external command if given arguments. This is being done currently for other commands like eshell/rm (for unrecognized arguments, that is). --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-eshell-date-use-external-date-for-any-arguments-Bug-.patch Content-Description: patch >From ab25f638ccff0ebec36b78f9b47092fe9fb103b3 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Thu, 23 Nov 2017 07:51:13 -0500 Subject: [PATCH] eshell/date: use external date for any arguments (Bug#29157) * lisp/eshell/em-unix.el (eshell/date): Throw `eshell-external' if given any arguments. (eshell-unix-initialize): Add "date" to `eshell-complex-commands'. --- lisp/eshell/em-unix.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index c486d2c51d..342a045d42 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -148,13 +148,18 @@ eshell-unix-initialize (make-local-variable 'eshell-complex-commands) (setq eshell-complex-commands (append '("grep" "egrep" "fgrep" "agrep" "glimpse" "locate" - "cat" "time" "cp" "mv" "make" "du" "diff") + "cat" "date" "time" "cp" "mv" "make" "du" "diff") eshell-complex-commands))) -(defalias 'eshell/date 'current-time-string) (defalias 'eshell/basename 'file-name-nondirectory) (defalias 'eshell/dirname 'file-name-directory) +(defun eshell/date (&rest args) + (when args + (throw 'eshell-external + (eshell-external-command "date" args))) + (current-time-string)) + (defvar em-interactive) (defvar em-preview) (defvar em-recursive) -- 2.11.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 11:27:17 2017 Received: (at 29157) by debbugs.gnu.org; 23 Nov 2017 16:27:17 +0000 Received: from localhost ([127.0.0.1]:54054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHuLM-0007WL-Vh for submit@debbugs.gnu.org; Thu, 23 Nov 2017 11:27:17 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHuLK-0007W7-FL for 29157@debbugs.gnu.org; Thu, 23 Nov 2017 11:27:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHuL9-0002Iy-IO for 29157@debbugs.gnu.org; Thu, 23 Nov 2017 11:27:09 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHuL9-0002Ib-3Q; Thu, 23 Nov 2017 11:27:03 -0500 Received: from [176.228.60.248] (port=1947 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eHuL7-0006Eb-R6; Thu, 23 Nov 2017 11:27:02 -0500 Date: Thu, 23 Nov 2017 18:26:52 +0200 Message-Id: <8360a1arlf.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <87po89ywv5.fsf@users.sourceforge.net> (message from Noam Postavsky on Thu, 23 Nov 2017 07:59:10 -0500) Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Noam Postavsky > Date: Thu, 23 Nov 2017 07:59:10 -0500 > Cc: 29157@debbugs.gnu.org > > > Disabling eshell/date makes Eshell less portable on one system at least, > > that is Windows. But what does "portability" mean in this context? Are > > the coreutils meant to be part of Eshell? Why? Supporting `date' but not > > its arguments does not make up for actual portability I believe. Case > > in point: I got fooled. > > > > Let's take the case of BSD vs. GNU: bash or zsh do not wrap around `ls', > > so the behaviour will not be the same on BSD and GNU. Why should Eshell > > be any different? > > Eshell isn't exactly the same as bash or zsh. You can use M-x shell if > you prefer them. > > We could fallback to the external command if given arguments. This is > being done currently for other commands like eshell/rm (for unrecognized > arguments, that is). That doesn't sound right to me (for rm as well): it will fail in strange ways for systems where the external command is absent or deficient. Eshell has both internal and external implementations because it wants to be able to handle Lisp objects and Lisp-like syntax, not just files, pipes, and other shell stuff. So people who expect Eshell to be just another shell are expecting something that Eshell was never designed to be. That's why Eshell offers the possibility to optionally invoke the external implementation -- but it should be done explicitly by the users, not by us second-guessing what they mean, because reliably guessing which arguments are for an external command and which for the internal Eshell implementation is impossible. Observe: ~/git/emacs/branch $ date 42 Wed Dec 31 19:00:42 1969 But ~/git/emacs/branch $ *date 42 /bin/date: invalid date ‘42’ So I'm not sure such a naïve solution is TRT in this case, because we are losing valuable features by doing that, and those features are not just an accident, they were intentionally included in Eshell. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 12:55:05 2017 Received: (at 29157) by debbugs.gnu.org; 25 Nov 2017 17:55:06 +0000 Received: from localhost ([127.0.0.1]:58159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIefR-0007Ey-LB for submit@debbugs.gnu.org; Sat, 25 Nov 2017 12:55:05 -0500 Received: from mail-wr0-f172.google.com ([209.85.128.172]:36223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIefQ-0007EM-6A for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 12:55:04 -0500 Received: by mail-wr0-f172.google.com with SMTP id y42so22819144wrd.3 for <29157@debbugs.gnu.org>; Sat, 25 Nov 2017 09:55:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=CZnRC+bqKxRQrCg9wDehjg3+t5Ei2HEq2VdR2ylG/PI=; b=twuI+P7HlzZLaKG5tAKFnW1FgYeZ3WxIjlUFI6B5WOw+u2mA5V8bH199cCiGWn7prb XuiHqKSY3EESacyPNE5Wj8LlFugMqn9rkocnimsKQFTvlJhSGwONn23QBb+5Hpr8j+5/ st8gc2FK2mVB7BWyk7efa8KkBe3+C4lVrvQnnB7VpbOt3ReFJmndf4uXKV/K/T/NvUyI IfW/UJjKfOTSx5LJewYWhia6ghH7oKXjjeu9xH/lWtmm4OLNTCb5lkjhbS+y7ME+T1TX c34y64RQu+yrcagZlYnlWFMUKl3fN1tHKXT6cyyGB5S6dk4TLdoXU+WCtLSqC239Z8dV Zt1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=CZnRC+bqKxRQrCg9wDehjg3+t5Ei2HEq2VdR2ylG/PI=; b=FV+8a/J3AjFLVXAyiJG2CKPYmlYiBgEEw7bQv+rXXGQbN48oNDb7mh2skufVfIJRGc k17Bxn7Kxne1wqCd/CiQ9dOfVbwP6S6gQWuAQntXrIRfJG1+UA8NtiSH7mLgm0a3FGiD TO+7hPfpygrwJqjO4nwnZLprdomOwJP5ZE6ZXtJ+7nxO5nYBMzEfvPhcyb6eJoaqcLDf EPBN9wrFqjON5ZVwBd/1LRBTEUDSOCN5RhAqsT/ccw+hrNs7Ak6FEGLGMCJeYushZvJP krHgPXa2FZ7D/g64ORvulxlQP8G+6KXvSehAM631O/nxnu+RNAxKnh6kw/GIA4GJTl/j J2NA== X-Gm-Message-State: AJaThX5WG65Vaab1yBw/nKRfe4BKX3X28itjlVrLax7vUx/5+q0HO406 C/rt4sw3koNyGmc1B7fqTbmLjA== X-Google-Smtp-Source: AGs4zMay3mHEWHHX0+XBh8IlUoF2EdN5pUUc1UD6tsoDSkxneGwcHuk9+9BN3p353HN4K7wahEmQxA== X-Received: by 10.223.171.85 with SMTP id r21mr4188131wrc.182.1511632497636; Sat, 25 Nov 2017 09:54:57 -0800 (PST) Received: from dhiov23k ([197.1.219.177]) by smtp.gmail.com with ESMTPSA id 19sm12932077wmv.41.2017.11.25.09.54.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Nov 2017 09:54:56 -0800 (PST) References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" In-reply-to: <8360a1arlf.fsf@gnu.org> Date: Sat, 25 Nov 2017 18:54:51 +0100 Message-ID: <87lgiui6qc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: > Observe: > > ~/git/emacs/branch $ date 42 > Wed Dec 31 19:00:42 1969 > But > ~/git/emacs/branch $ *date 42 > /bin/date: invalid date =E2=80=9842=E2=80=99 > > So I'm not sure such a na=C3=AFve solution is TRT in this case, because we > are losing valuable features by doing that, and those features are not > just an accident, they were intentionally included in Eshell. I think you are right. I did not know that eshell/date could be used this way. The issue here is mostly my lack of awareness about what is an Elisp command and what is a system program. Maybe having different syntax highlighting for the "verb" depending on whether it's a system program or an Elisp command would help avoiding the pitfall. Is there a trivial way to do this? If not I'll work on it. Maybe create a package if that does not fit the philosophy of mainline Emacs. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAloZrmwACgkQm9z0l6S7 zH9jkwf/aGhxqFv6j4mJjEjkKbSzmomOLIqgsrxuiYZwFP/1eeEPZvUqj+qiYVRD ehR47aTO4//+KVHWD7/JmgXgD+pgMeCBw3KNcj6zDqCCw74WlZZ5QUb9968Ir/tC +XWZ4vbKFPonEVweyQj1xPiEEH+MDdix5SiqEsTLdQTZ1KvqSvebmSh9aAGQSCUl cULnBOjW2Id5zsqClq7Fx+zcLkgYs/6be+zTwYeVKHqTgbtbehxPeel+MHOdxFHP f2F1ySUqjbPAp4eLHr9EQxQafhjgI6wLK02lyBkgHyRbwTGmcTc6lL/XNlW98k4f uD5uGuBELyrcawdiEbPfMnEf1P9/zQ== =d+w3 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 13:32:42 2017 Received: (at 29157) by debbugs.gnu.org; 25 Nov 2017 18:32:42 +0000 Received: from localhost ([127.0.0.1]:58186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIfFq-0008AZ-Aq for submit@debbugs.gnu.org; Sat, 25 Nov 2017 13:32:42 -0500 Received: from mout.gmx.net ([212.227.15.15]:55612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIfFp-0008AN-DE for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 13:32:41 -0500 Received: from detlef.gmx.de ([212.86.62.61]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MNZgw-1eCbVA0voQ-007Hhf; Sat, 25 Nov 2017 19:32:26 +0100 From: Michael Albinus To: Pierre Neidhardt Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> Date: Sat, 25 Nov 2017 19:32:25 +0100 In-Reply-To: <87lgiui6qc.fsf@gmail.com> (Pierre Neidhardt's message of "Sat, 25 Nov 2017 18:54:51 +0100") Message-ID: <874lpi9pl2.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:eSxChB8PhOxCYHx1So7AkvjvmrcZ1Cj82eA2AW8sdUBBlnMjTGO 7HKbUg1M6qpgkqbM2ZjrvWPAgUlJ1Y2477CCt01v1mA4ic0JO3IOKFu+SuuwlE5FXuPIlo8 jm9injaKc2WDdzp3ci1uxhTawSZgUtX31ymXNG8JMVYyPC+u899vzqt2XRAxFn9X+AeU422 tUm4QBV/iajMtdQA2fHpQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:8eqo60Hrjm0=:tiLgw0vsrULc+Ky7iJYTeP Br2FLxjkBG0yMu0F9UyT9QTbwbuCG2MXEILci151Z6MHuthcJJqqVoEwNstA1folN/tpwz/9J K7zn7pWoguWDMdK7jEYp5iqFsKgcLFifW9BKiaQNREwiGzQS6dJ+tpf7mtUQo+qj4iuulhxAA HJmw1lAu/9g8XydcLNm7OVi4h2/yVhN6JL+SiFinJuO+NqogZMes5lWf7eYJKD7IYHbsALAAj y8P3pPjFUJgAW308TGt9LNvUHS8rKc2zq5ckJPSg9sLYBAG0MzWEywyvd7uBkR5yBp3MMFK4U sI2MVprXcaaaMpzNpZ0VPlHsD+2874iFI3gHW0a1yw29FR3pg2jjB7WJUsEPxIjjfYkXm6yO7 SSh7QwTTyf5T5fX181x16VTikAu4N9bqm6lCW0jmIM5Jeneiysk8V3+NcY8c0LqNQlpM7K1pt QkmhKHmA67m/zkmdAh3TIerDSujVVypONUghxXh3HMSE+CXZXW++1+Z5qzwWt4dxFcY6htbv5 6h42OpLfTgwD56YniH+bA00NSoF8NZmHeasR3cItCkNbJnenZaxg7viC2VpYWEde/tQ4L+0Ii AQNxuJtBwFQVH/aXGh4WqQDcYFaARsk3zAAQKfCklvlgSXm09DFDxMKS0JJAxGH12PYxEOpg3 SgYI4Y7LXaVfSyXMISjA9a5wHXacnRImwAnjjthLLklWZIhFJk2IkYIEWkI4Xv2wQ5mPjjnbo bAjKKLqT0K1S6umVseJkuXWM7ELkkW88RWxqLmO/eNivvnJXAPt3omCqgi6LhIoUfpwNu9SvY g7uRIIMN8TCLthfrhbfwBK+Cza13YaOmENPFL0SCtMDm1Elb5g= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 29157 Cc: Eli Zaretskii , 29157@debbugs.gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Pierre Neidhardt writes: Hi Piere, > The issue here is mostly my lack of awareness about what is an Elisp > command and what is a system program. You can always use `which' in the eshell buffer: --8<---------------cut here---------------start------------->8--- ~ $ which date eshell/date is an alias for =E2=80=98current-time-string=E2=80=99 in =E2=80= =98em-unix.el=E2=80=99. ~ $ which *date /bin/date --8<---------------cut here---------------end--------------->8--- And `which' itself is an eshell function: --8<---------------cut here---------------start------------->8--- ~ $ which which eshell/which is a compiled Lisp function in =E2=80=98esh-cmd.el=E2=80=99. ~ $ which *which /usr/bin/which --8<---------------cut here---------------end--------------->8--- See also (info "(eshell) Built-ins") Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 13:35:27 2017 Received: (at 29157) by debbugs.gnu.org; 25 Nov 2017 18:35:27 +0000 Received: from localhost ([127.0.0.1]:58193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIfIV-0008Ey-0s for submit@debbugs.gnu.org; Sat, 25 Nov 2017 13:35:27 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:42499) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIfIT-0008El-J5 for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 13:35:25 -0500 Received: by mail-wm0-f45.google.com with SMTP id 124so10597021wmv.1 for <29157@debbugs.gnu.org>; Sat, 25 Nov 2017 10:35:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=PA1vSrroxok7PiE5vOqCJ6mpPn+VPpKaR28Lj17IKt8=; b=XN8RUS9BR2LGI5QUCqp4et4mRlcddI4BukWzuRnV6QnxThK7PZggfpFJtcgfR1hghk 5DlHax9CIXkc9PvWe9gDLLj37N9jFYroprPr9nXWEG2ANtfNgboNeDopsTo72Qek48St rOsz3Z8j5BBRoKNiJBpwGGRD2EILZDLdiN4Ev0MW+hlmnsRZ3xi/Vyw7b1180A8jbQKT dRygihPPjFFvaQcJPSHGw7YD4J39gIALXt3SlPv+QZRswK14gikNqYkXlkLzRzgLlwBY pUtSrwB59oWdIrcYS3PfqWsf+mAHcbNt4K56hjT1L/4NAbsxh8niJCZdehfxycT/EjAu Yocg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=PA1vSrroxok7PiE5vOqCJ6mpPn+VPpKaR28Lj17IKt8=; b=dNdHas1AIfDwQLqAPWyDXzxVu66O4jTK+SWtQ6wZdDqiXbYTKnQ7O5voblltoi8qa9 7Ou3Ra82+A1SDZOU26FreOO3ZvWhClQsEtZ/Go9RiFELCY/U6uevTBB13ifhELosXWXv WX657hZN6z71IXkds2hojALes2vu3RJnaL2BtdqDr281oApcTwPF4bH1k+/vjROoMWDY SJMDqx3XLT7RXmyzLC10SyT0g1G5YmcmrMhHemT8wFP3F2T5vUp24q+vqD4433EShtwT s6IRZAzGT0NNIBDebgp5I4Lt+hMlIMSUibi4jYHMTfn6m/4TVEmDidmG5aiz1EMnF8p4 Byig== X-Gm-Message-State: AJaThX4eK3sk2zIRoNqfnXLmGa1012Tkoku67NaOhJ1tEnUFNe4QvwIS JMGoKe9J3GlAGGmAwEwQ/Jk= X-Google-Smtp-Source: AGs4zMY+pf6Sh+PAQjji0tfHDBy0Mu5Zg4Y1BG0DPunf07LxgO7Dn90Po1uJ0QyPyNBT32f9kwA3dg== X-Received: by 10.28.93.21 with SMTP id r21mr4548568wmb.152.1511634919900; Sat, 25 Nov 2017 10:35:19 -0800 (PST) Received: from dhiov23k ([197.1.219.177]) by smtp.gmail.com with ESMTPSA id s195sm14232186wmb.33.2017.11.25.10.35.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Nov 2017 10:35:19 -0800 (PST) References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <874lpi9pl2.fsf@gmx.de> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Pierre Neidhardt To: Michael Albinus Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" In-reply-to: <874lpi9pl2.fsf@gmx.de> Date: Sat, 25 Nov 2017 19:35:17 +0100 Message-ID: <87k1yei4uy.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29157 Cc: Eli Zaretskii , 29157@debbugs.gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Of course, I know that, but I meant "off the top of my head". Knowing which one is which requires some experience. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAloZt+UACgkQm9z0l6S7 zH8YoggArpkTdCP8VbCh7q7OitwzlWrxu6q3BQo5ulvTVwdUXNgo2J/vVJ/ShWDV ae+aCDTeDCG5siWuRCsXciGvTdy96kIfmeaYc8CfPYao27O2+SAXBoRe+CQkede3 Sc1A/sa3tI1R/KVXxZJnKaKeia2d+O5GlcKC46sFbWVt7xYrn8Tz/+H/pplfw6CW VUWYE7XYrbvqZlTzSPeVTflrpI+PPyPxzq9MnSw7XVTBOdxM2ZEhcHnV4etoekDC /xx3wrtkscbhQbBg5aRfcLBZFoioT8Q9S7icv+QGGKsSCfSvIQ5IXveTcfN4RiVJ gVlqtRJTbVbn+zlh9tJwevLB69PUYA== =3Zez -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 13:50:56 2017 Received: (at 29157) by debbugs.gnu.org; 25 Nov 2017 18:50:56 +0000 Received: from localhost ([127.0.0.1]:58200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIfXU-00009r-BB for submit@debbugs.gnu.org; Sat, 25 Nov 2017 13:50:56 -0500 Received: from mail-it0-f49.google.com ([209.85.214.49]:46223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIfXS-00009c-Dm for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 13:50:54 -0500 Received: by mail-it0-f49.google.com with SMTP id 72so4917678itl.5 for <29157@debbugs.gnu.org>; Sat, 25 Nov 2017 10:50:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=kvn5NchEFFsE5qg2ylG8SN551Qsiqfeh8jCUm7LawmQ=; b=Jofajp3fVYfC2haKQ4QnsLT+Z3vggLw5+8guzzcOjeWHyNVFmC1jXeKYP5BUVeWx72 CM8m2YW4F8KZmrH05QlDomNgg2UKoMYXFsMx6h9j7viVv0LAb2VcOX5us8MZPDikjnY8 pNvCBL0qTJiJ/9A2WlnznavHOFPNftc6mxwoDV3zaKkLa8q4RLymfyUsOHn44X3rBboA CN2hkrABNVwNgO5/sNv9hxVuEQBTdGfXf2h2YU6h4yWZkW3neGusgykTU0Rzot4+cljd 0IlHDBUF498WIc/JHxiInKXptsbYCCC7JxgZrD22oiCr2tYXq04KbOTAZw4KcmBOfl+X 3QmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=kvn5NchEFFsE5qg2ylG8SN551Qsiqfeh8jCUm7LawmQ=; b=Q82Ki8zuM/bGmLtvCUy0bVm3KCdjqvqownAhK0BHoKZiPuYyB1c9wGrW10FqDI6kQa iCCHK0dJ5j5AN8k+eif1pypYb2V1Bcj4jy5+HEv3+DAXAKL0pLqBRK62MrD0F4bOxmap Py03HHsHX+tyk7UyqjaYk+HUyAmNi9h+p52LrdrXTZvAPlwWX5jPU8cLAr4mXK7tmFUB 2M+00oYudw2RJGw7kYLdiaBhXkc+pkDRpDnc5u8bOgXv/ER18TLOPsQ6RvWoCG3Velxm 8sa0UjihaTGvkXhJme2htamjWTu+Cnd8YW3xltZYIkxbfOnQNlsIXlrLQQBu4qHhv+mc zXuA== X-Gm-Message-State: AJaThX58j8nUDCoL1WcUe70BsADwjk3Z43K398nl7dnEZdC+frXAnyYu RDMhnlCMPfheU6QLPPWVC1WphA== X-Google-Smtp-Source: AGs4zMa/Oui7Uu1aOj4f+DwaJyBE6+p6JLgvlb1rhWaNlANqPSm9r7+QT68EYUC9EHP1WWoKosx74A== X-Received: by 10.36.2.212 with SMTP id 203mr22381208itu.43.1511635848488; Sat, 25 Nov 2017 10:50:48 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id n68sm10173068ion.57.2017.11.25.10.50.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Nov 2017 10:50:47 -0800 (PST) From: Noam Postavsky To: Pierre Neidhardt Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> Date: Sat, 25 Nov 2017 13:50:46 -0500 In-Reply-To: <87lgiui6qc.fsf@gmail.com> (Pierre Neidhardt's message of "Sat, 25 Nov 2017 18:54:51 +0100") Message-ID: <871skmyyyh.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 29157 Cc: Eli Zaretskii , 29157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) Pierre Neidhardt writes: > Eli Zaretskii writes: > >>> We could fallback to the external command if given arguments. This is >>> being done currently for other commands like eshell/rm (for unrecognized >>> arguments, that is). >> That doesn't sound right to me (for rm as well): it will fail in >> strange ways for systems where the external command is absent or >> deficient. Currently eshell falls back to external command for unrecognized arguments when passing :external to eshell-eval-using-options. A quick grep for :external brings up: rm, mkdir, rmdir, mv, cp, ln, cat, du, time, env, ls. >> Observe: >> >> ~/git/emacs/branch $ date 42 >> Wed Dec 31 19:00:42 1969 >> But >> ~/git/emacs/branch $ *date 42 >> /bin/date: invalid date =E2=80=9842=E2=80=99 >> >> So I'm not sure such a na=C3=AFve solution is TRT in this case, because = we >> are losing valuable features by doing that, So we could also check for an integer argument. >> and those features are not >> just an accident, they were intentionally included in Eshell. Hmm, my impression of eshell is more like "throw a bunch of features at the wall and see what sticks" but without the "see what sticks" part. > The issue here is mostly my lack of awareness about what is an Elisp > command and what is a system program. > > Maybe having different syntax highlighting for the "verb" depending on > whether it's a system program or an Elisp command would help avoiding > the pitfall. > > Is there a trivial way to do this? If not I'll work on it. There is no such feature, as far as I know. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 14:29:44 2017 Received: (at 29157) by debbugs.gnu.org; 25 Nov 2017 19:29:44 +0000 Received: from localhost ([127.0.0.1]:58215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIg91-000154-UI for submit@debbugs.gnu.org; Sat, 25 Nov 2017 14:29:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIg90-00014q-Dj for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 14:29:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIg8s-0003Go-3O for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 14:29:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIg8s-0003Gi-0U; Sat, 25 Nov 2017 14:29:34 -0500 Received: from [176.228.60.248] (port=4500 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eIg8q-0005pC-8Q; Sat, 25 Nov 2017 14:29:33 -0500 Date: Sat, 25 Nov 2017 21:29:08 +0200 Message-Id: <83y3mu6ttn.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <87lgiui6qc.fsf@gmail.com> (message from Pierre Neidhardt on Sat, 25 Nov 2017 18:54:51 +0100) Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Cc: Noam Postavsky , 29157@debbugs.gnu.org > Date: Sat, 25 Nov 2017 18:54:51 +0100 > > > ~/git/emacs/branch $ date 42 > > Wed Dec 31 19:00:42 1969 > > But > > ~/git/emacs/branch $ *date 42 > > /bin/date: invalid date ‘42’ > > > > So I'm not sure such a naïve solution is TRT in this case, because we > > are losing valuable features by doing that, and those features are not > > just an accident, they were intentionally included in Eshell. > > I think you are right. I did not know that eshell/date could be used > this way. Not just eshell/date: many Eshell built-ins behave like that, and they do that on purpose. > The issue here is mostly my lack of awareness about what is an Elisp > command and what is a system program. Why do you need to know that? If you want to know that so you could always get the same responses as from another system shell, then perhaps we should have an option to tell Eshell to always invoke an external program (maybe we already have such an option, but I couldn't find it). > Maybe having different syntax highlighting for the "verb" depending on > whether it's a system program or an Elisp command would help avoiding > the pitfall. Isn't it true that a verb that doesn't begin with a '*' is _never_ a system program in Eshell? From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 14:36:46 2017 Received: (at 29157) by debbugs.gnu.org; 25 Nov 2017 19:36:46 +0000 Received: from localhost ([127.0.0.1]:58220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIgFq-0001GC-Mn for submit@debbugs.gnu.org; Sat, 25 Nov 2017 14:36:46 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:36993) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIgFp-0001Fx-D3 for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 14:36:45 -0500 Received: by mail-wm0-f52.google.com with SMTP id v186so27918331wma.2 for <29157@debbugs.gnu.org>; Sat, 25 Nov 2017 11:36:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=/FRjcSebp/Zr/Zjs3NqXuNSTXrOK7T8d2UiRCGfBbnc=; b=ZG0HcbApixhYXgH268rA2/wc/4h5Cq5ZihGp2VMAbFCCvHu0dsaFORsiTlqLucLxqE lORefZbivuKQG61N22TPTstnHTp45sGqirLji8OA6m2JNJgcJ0fiova0RqWfEsVYPxZ9 bF2E6RKhAp/G7fo/af759SvBkXSD7yGWOkvru6yCqQplY5t5N8Xh/fFB7BtBS+VtIWeG /sNsGegLIwg8F1n1rd27g/SainYui5RNM/W6ds3qwvyMv05rjX1GhwszbZbd1RRQiWqm +V/W58wjzTurC9OBv2L81E9KuyrP1gpa+bImcMyQRG1K4j3idVQmX7imOYfy+pA34z+E pOxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=/FRjcSebp/Zr/Zjs3NqXuNSTXrOK7T8d2UiRCGfBbnc=; b=cUO63TI5Gz3dhaLmNPocnCSDGT7KVfsXddzGpXcFKM3PsWMhVYcvuE5ybDxxe7JSeG MZ9Nwy19aQu98FifnadEBtq44Zh4xYIJ0l/NK8yHtlhyvft72MMZal3PForgnSuFVgbS MfrnXeOWzSC6EULD9/C+Iy9dVU0zgBI3HGxfX3Y5ayBQo2P75pRb3pY+8SwtJY4xZGei tWLIftFiH9HAJIdsbNhoHJHEbcIZNaaihNM33ppKik6P3xWdvu5QZNw8+HBhimjg7yA3 uE0j3yU92BHC2XU9oQMSNrJ/1scYGg4h4hp6hmLin9X6dCwpDmmBDQRDhgDzgTD/gRB1 bzGA== X-Gm-Message-State: AJaThX5iKVEXw0i52Eu32aTQJNZhaQMUTQ+/N84uXKWR2D7Ux6Cb2aC2 O41Ud+eAGXkS/8jnUxz7ozUWi8rb X-Google-Smtp-Source: AGs4zMbXwsXwLcBTptz5/q+UBc5qLHqY4YgtQYlfdwIbQXMiuf/RjiQ3i1IXuN6fyuly4X+9VaP+Mw== X-Received: by 10.28.120.19 with SMTP id t19mr13598038wmc.64.1511638599324; Sat, 25 Nov 2017 11:36:39 -0800 (PST) Received: from dhiov23k ([197.1.91.220]) by smtp.gmail.com with ESMTPSA id 5sm12469387wrj.22.2017.11.25.11.36.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Nov 2017 11:36:38 -0800 (PST) References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <83y3mu6ttn.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" In-reply-to: <83y3mu6ttn.fsf@gnu.org> Date: Sat, 25 Nov 2017 20:36:36 +0100 Message-ID: <87indyi20r.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> The issue here is mostly my lack of awareness about what is an Elisp >> command and what is a system program. > > Why do you need to know that? > > If you want to know that so you could always get the same responses as > from another system shell, then perhaps we should have an option to > tell Eshell to always invoke an external program (maybe we already > have such an option, but I couldn't find it). [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [197.1.91.220 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.52 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.52 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ambrevar[at]gmail.com) 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> The issue here is mostly my lack of awareness about what is an Elisp >> command and what is a system program. > > Why do you need to know that? > > If you want to know that so you could always get the same responses as > from another system shell, then perhaps we should have an option to > tell Eshell to always invoke an external program (maybe we already > have such an option, but I couldn't find it). [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [197.1.91.220 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.52 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.52 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ambrevar[at]gmail.com) 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> The issue here is mostly my lack of awareness about what is an Elisp >> command and what is a system program. > > Why do you need to know that? > > If you want to know that so you could always get the same responses as > from another system shell, then perhaps we should have an option to > tell Eshell to always invoke an external program (maybe we already > have such an option, but I couldn't find it). No, not like that, more like a friendly reminder: "this 'date' behaves the Eshell way, while that 'rmdir' is the system program". >> Maybe having different syntax highlighting for the "verb" depending on >> whether it's a system program or an Elisp command would help avoiding >> the pitfall. > > Isn't it true that a verb that doesn't begin with a '*' is _never_ a > system program in Eshell? I'm tempted to answer "no, it's not true", but we might be misunderstood. As far as I got it, the '*' is here to force Eshell to use the system program, while no '*' tells Eshell to use its own version if available, or the system program otherwise. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAloZxkQACgkQm9z0l6S7 zH/JeQf9GjL5pBheNrrJVq3rjSWbtqvmEFHyajaUQdzaMhUnoR4dk+UOO6/1UoRW K/oP3KhBGsjKwwm27rXWvYCCcey1V0R889ijB006Hzje2NTZn1/tN9DCMRMcJprZ d005UR6t3msm/x4OeCivDusgrYiL9p8Ji3sr2Ne32X2E8soJy2q6dJw3Fw4+azMV TxxhKaj1qucRaBqDCJP0if9c/UfuPx1uVQeELwk9lTJWIEfzF1qFGZGJQiWiBj0U m7L5UttwvCSJBnM2vfvUjkFKRPjxVqGqWsw+KR8cn88o0q3UwQNUwah+nOO9E0kg 1ULrqxWlWFcUXa9zfWT+LKgRpYefUg== =Ap7Z -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 14:50:47 2017 Received: (at 29157) by debbugs.gnu.org; 25 Nov 2017 19:50:47 +0000 Received: from localhost ([127.0.0.1]:58224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIgTO-0001a6-VX for submit@debbugs.gnu.org; Sat, 25 Nov 2017 14:50:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIgTM-0001Zu-SU for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 14:50:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIgT9-0004jS-Dl for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 14:50:36 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIgT9-0004jL-9n; Sat, 25 Nov 2017 14:50:31 -0500 Received: from [176.228.60.248] (port=4505 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eIgT7-00009d-Gd; Sat, 25 Nov 2017 14:50:31 -0500 Date: Sat, 25 Nov 2017 21:50:05 +0200 Message-Id: <83wp2e6suq.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <871skmyyyh.fsf@users.sourceforge.net> (message from Noam Postavsky on Sat, 25 Nov 2017 13:50:46 -0500) Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <871skmyyyh.fsf@users.sourceforge.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Noam Postavsky > Cc: Eli Zaretskii , 29157@debbugs.gnu.org > Date: Sat, 25 Nov 2017 13:50:46 -0500 > > >> That doesn't sound right to me (for rm as well): it will fail in > >> strange ways for systems where the external command is absent or > >> deficient. > > Currently eshell falls back to external command for unrecognized > arguments when passing :external to eshell-eval-using-options. A quick > grep for :external brings up: rm, mkdir, rmdir, mv, cp, ln, cat, du, > time, env, ls. By "unrecognized arguments" do you mean unrecognized switches? If so, this is not the same issue as the one I was raising. > >> Observe: > >> > >> ~/git/emacs/branch $ date 42 > >> Wed Dec 31 19:00:42 1969 > >> But > >> ~/git/emacs/branch $ *date 42 > >> /bin/date: invalid date ‘42’ > >> > >> So I'm not sure such a naïve solution is TRT in this case, because we > >> are losing valuable features by doing that, > > So we could also check for an integer argument. But it isn't just integers: ~ $ date 42 "EDT-5" Thu Jan 1 05:00:42 1970 ~ $ date (list 23065 51329 644000 0) Sat Nov 25 21:46:09 2017 > >> and those features are not > >> just an accident, they were intentionally included in Eshell. > > Hmm, my impression of eshell is more like "throw a bunch of features at > the wall and see what sticks" but without the "see what sticks" part. That's one way of looking at Eshell, although it's not my way. Eshell was intended to be used from Lisp programs, and that's why its built-ins accept Lisp objects, values, and expressions as arguments. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 14:58:15 2017 Received: (at 29157) by debbugs.gnu.org; 25 Nov 2017 19:58:15 +0000 Received: from localhost ([127.0.0.1]:58234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIgad-0001lJ-2L for submit@debbugs.gnu.org; Sat, 25 Nov 2017 14:58:15 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIgab-0001l6-CP for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 14:58:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIgaS-0001lS-7X for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 14:58:08 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIgaS-0001lM-4M; Sat, 25 Nov 2017 14:58:04 -0500 Received: from [176.228.60.248] (port=4509 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eIgaQ-0002EQ-Ab; Sat, 25 Nov 2017 14:58:04 -0500 Date: Sat, 25 Nov 2017 21:57:38 +0200 Message-Id: <83vahy6si5.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <87indyi20r.fsf@gmail.com> (message from Pierre Neidhardt on Sat, 25 Nov 2017 20:36:36 +0100) Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <83y3mu6ttn.fsf@gnu.org> <87indyi20r.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Cc: npostavs@users.sourceforge.net, 29157@debbugs.gnu.org > Date: Sat, 25 Nov 2017 20:36:36 +0100 > > > If you want to know that so you could always get the same responses as > > from another system shell, then perhaps we should have an option to > > tell Eshell to always invoke an external program (maybe we already > > have such an option, but I couldn't find it). > > No, not like that, more like a friendly reminder: "this 'date' behaves > the Eshell way, while that 'rmdir' is the system program". But the answer to that question depends on the arguments and sometimes on the switches, doesn't it? E.g., Eshell's 'rm' can delete processes and buffers, and unintern symbols, in addition to deleting files. What exactly it does depends on the arguments. And if you invoke it with -d switch, it will call the external program, but if you invoke with -f or -i or -n, it will use the built-in. So just given the verb, I don't see how you can have that indication. > > Isn't it true that a verb that doesn't begin with a '*' is _never_ a > > system program in Eshell? > > I'm tempted to answer "no, it's not true", but we might be > misunderstood. > > As far as I got it, the '*' is here to force Eshell to use the system > program, while no '*' tells Eshell to use its own version if available, > or the system program otherwise. So you want to have an indication when there's _no_ built-in implementation at all, is that it? From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 15:06:11 2017 Received: (at 29157) by debbugs.gnu.org; 25 Nov 2017 20:06:11 +0000 Received: from localhost ([127.0.0.1]:58238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIgiI-0001xw-Sy for submit@debbugs.gnu.org; Sat, 25 Nov 2017 15:06:11 -0500 Received: from mail-it0-f54.google.com ([209.85.214.54]:35065) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIgiH-0001xj-3d for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 15:06:09 -0500 Received: by mail-it0-f54.google.com with SMTP id x28so1483433ita.0 for <29157@debbugs.gnu.org>; Sat, 25 Nov 2017 12:06:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=bOBWD5nRCeh9uLgDcw9G7JMshFqIFzKx9yyQpzyR+lY=; b=eLjojzRrbirpRyDs07rZZmjfRSWF2ZkVklSA7gToZXfzl3KRNGq9LFRxfk+JMXhJeC 6Z9n4ImJaAo9Fv9vbQmAfL/goy3hH6N+OG3fvCgimRb6phkA7yq3SkhtgCFHWNyNyUpc QTAhQIUK+a7o27wV+xFmMKUzb6p76g4ls8XXAL9Yeu7WccJ7oaBLV9rsUsMR3nSQPGWZ YXl6cjOJMF5sEJ7Dumc9z1YdXTjbD2VswZa40exFCNW5GfSHGztwnEtCitXoQN5H03fg LRrqXZqlp//4cXoy56GFbhhs17JTrHnVILTlABPro+yMxEijmCUlGdA0KwczezKheUEB 9Nsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=bOBWD5nRCeh9uLgDcw9G7JMshFqIFzKx9yyQpzyR+lY=; b=gAjtGjYhy91gg8VZtBocnmqs+Zwg16IEeVW/mX6tycOfBYhtW2X80EdR8OR/Qgrxmg bGoxhvXslEXJghtgZrCw6T71c/GRwaXjaoO85a+1hy0vQLcFpKpYzyQIa1eZqrpuuH0S ZV7hbTB2d/Gn8qob526BBtEJiknYTqWk9+2He3szQnpxBxZJkO4jXHd6ea88rC+jCJwI /nwV0hH1/6PlENXU0u1g+lpda/5XJ+EWxx2K1oUKA5GfI/xq0uO014ftIzeZh5nijH1D gkZc5FKBIKEkCyErNldxkyRSfT0hodGHIYY93NiUuklvQPjPiDuiFK9++QcX4aG0WDQC e14w== X-Gm-Message-State: AJaThX5rYuUhCeM9Ze0GrvvdNxVxfVWrnnWXUTMdzdlnPtosypiHafYV u0WK6bIhGcaYCKj5AtyxOiY= X-Google-Smtp-Source: AGs4zMbJzTclFh2zt3zlcHLk9DyXv/yjt6E8ChyFolcqbsrmdNkbbovQbOeDaPhK7IqwYQ64C+GwrQ== X-Received: by 10.36.145.203 with SMTP id i194mr21892898ite.73.1511640363609; Sat, 25 Nov 2017 12:06:03 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id p68sm5542098itc.26.2017.11.25.12.06.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Nov 2017 12:06:02 -0800 (PST) From: Noam Postavsky To: Eli Zaretskii Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <871skmyyyh.fsf@users.sourceforge.net> <83wp2e6suq.fsf@gnu.org> Date: Sat, 25 Nov 2017 15:06:01 -0500 In-Reply-To: <83wp2e6suq.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 Nov 2017 21:50:05 +0200") Message-ID: <87y3muxgwm.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Eli Zaretskii writes: > By "unrecognized arguments" do you mean unrecognized switches? If so, > this is not the same issue as the one I was raising. Ah, I see. I wan't really aware of that distinction. >> So we could also check for an integer argument. > > But it isn't just integers: > > ~ $ date 42 "EDT-5" > Thu Jan 1 05:00:42 1970 > ~ $ date (list 23065 51329 644000 0) > Sat Nov 25 21:46:09 2017 Ugh, stop taking me so literally, and just read my mind! ;P How about checking for a set of arguments that is compatible with what current-time-string accepts. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 15:26:27 2017 Received: (at 29157) by debbugs.gnu.org; 25 Nov 2017 20:26:27 +0000 Received: from localhost ([127.0.0.1]:58250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIh1u-0002UD-Sz for submit@debbugs.gnu.org; Sat, 25 Nov 2017 15:26:27 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIh1t-0002U1-MP for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 15:26:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIh1n-0001ra-4q for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 15:26:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIh1j-0001py-6F; Sat, 25 Nov 2017 15:26:15 -0500 Received: from [176.228.60.248] (port=4542 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eIh1h-0000Da-9b; Sat, 25 Nov 2017 15:26:15 -0500 Date: Sat, 25 Nov 2017 22:25:47 +0200 Message-Id: <83tvxi6r78.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <87y3muxgwm.fsf@users.sourceforge.net> (message from Noam Postavsky on Sat, 25 Nov 2017 15:06:01 -0500) Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <871skmyyyh.fsf@users.sourceforge.net> <83wp2e6suq.fsf@gnu.org> <87y3muxgwm.fsf@users.sourceforge.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Noam Postavsky > Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com > Date: Sat, 25 Nov 2017 15:06:01 -0500 > > > ~ $ date 42 "EDT-5" > > Thu Jan 1 05:00:42 1970 > > ~ $ date (list 23065 51329 644000 0) > > Sat Nov 25 21:46:09 2017 > > Ugh, stop taking me so literally, and just read my mind! ;P > > How about checking for a set of arguments that is compatible with what > current-time-string accepts. Is it really possible to do that reliably? Or maybe you meant to catch errors signaled by current-time-string, and invoke the external command then. If so, I'd agree. But we should then allow customization of the external command's name, because on Windows it will be something like 'gdate', to avoid calling the incompatible Windows shell's built-in (which also prompts interactively for input). From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 16:42:02 2017 Received: (at 29157) by debbugs.gnu.org; 25 Nov 2017 21:42:02 +0000 Received: from localhost ([127.0.0.1]:58290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIiD4-0004FY-DV for submit@debbugs.gnu.org; Sat, 25 Nov 2017 16:42:02 -0500 Received: from mail-it0-f54.google.com ([209.85.214.54]:37999) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIiD2-0004F3-D0 for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 16:42:00 -0500 Received: by mail-it0-f54.google.com with SMTP id n134so17121665itg.3 for <29157@debbugs.gnu.org>; Sat, 25 Nov 2017 13:42:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Ab4hJvhJ/IRguP003Rs1MRFEhGycWJrTYWTxVPPMkck=; b=C6dHZJq8lAARcx6p8+IPrNrieZDZ7V9gy7YhF5CNiwZslpjc132nL0a9pG1uItbaHv ltCIdtbzi7cgi0QT9k4uKwnTgvLPPZ8Akh7Z7YkvmIFKoJCk3FqLaZOQpnzyO8kKHxtG jlx7vHmldJKTwp5ntZBbGeibxM4zkxR0pBbF2fTZ+gLIc1I7xaFvPk96FkNvDkFIqyfm qHDuXAFElPpw2UF4D2sssF1YzZHzb+pn+9Ftgi7WOzrGynk8fKHJDot9uN9e9ZjOG7gP iAfEYTV1BBRlO852IOj9F32cbeZw4Br93IjMagVCt1sgOWGLn6z59hAD/CD2tpTIcmIu 8fzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=Ab4hJvhJ/IRguP003Rs1MRFEhGycWJrTYWTxVPPMkck=; b=P2X8URHrYy+LglxoEPEe7RlfqpjjLghT2YgCZ5XVlD1WeMIwSojcmsxQf8jIXQqAVR vH/NmPwIeWGchCGdVSdpGhsULZnVarjhdtAYeCI4Uc1aLPZ5rM4PmGF7w67JtYbM3ql3 RXAl57MMAoDfwxtVnIM2dvwHPno5lo3FZquJ/2/Vm3XBLSz2eS+1Ysx+7eKGxDUMSVoT xaeAHvjctooTUqTrWimgnOJMzHPTy0/Re275y9HK+rLRFLguzHcs50efczSF2LQwQAi8 xlQIPf90LJcEs9ALW/8KPM76BL170LsBIqDLAhtDDzk8dkyAuuvOAU6cfxPP8668oQdb 6CbQ== X-Gm-Message-State: AJaThX6t2NhOsanlPTrhCDOYroEKCI4ntM18odnt76BZtnyE7gxbYS9J SiDgSBBVP4fzRLv/GIIB4WI= X-Google-Smtp-Source: AGs4zMb2mdpKMZyctCL8ZTNqCBQwAZY14LdDiDDevcBDieEldZVTUOqEmpM+iKjG/w7d7Z2vSizfxw== X-Received: by 10.36.10.73 with SMTP id 70mr22010743itw.145.1511646114682; Sat, 25 Nov 2017 13:41:54 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id e139sm5723217ioe.62.2017.11.25.13.41.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Nov 2017 13:41:53 -0800 (PST) From: Noam Postavsky To: Eli Zaretskii Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <871skmyyyh.fsf@users.sourceforge.net> <83wp2e6suq.fsf@gnu.org> <87y3muxgwm.fsf@users.sourceforge.net> <83tvxi6r78.fsf@gnu.org> Date: Sat, 25 Nov 2017 16:41:52 -0500 In-Reply-To: <83tvxi6r78.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 Nov 2017 22:25:47 +0200") Message-ID: <87vahyxcgv.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Eli Zaretskii writes: >> How about checking for a set of arguments that is compatible with what >> current-time-string accepts. > > Is it really possible to do that reliably? Should be okay if we err on the side of current-time-string: (pcase (cl-list* (nth 0 args) (nth 1 args) (nthcdr 2 args))) (`(,(or (pred listp) (pred integerp)) ,(or 'nil 't 'wall (pred stringp))) t)) > Or maybe you meant to catch errors signaled by current-time-string, That's another possibility, it would be more precise. > and invoke the external command then. If so, I'd agree. But we > should then allow customization of the external command's name, > because on Windows it will be something like 'gdate', to avoid calling > the incompatible Windows shell's built-in (which also prompts > interactively for input). I'm not in front of a Windows box at the moment, but I thought a cmd.exe builtin like that could only be invoked by doing calling "cmd /C date". From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 22:35:34 2017 Received: (at 29157) by debbugs.gnu.org; 26 Nov 2017 03:35:34 +0000 Received: from localhost ([127.0.0.1]:58438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eInjB-0005n1-Vb for submit@debbugs.gnu.org; Sat, 25 Nov 2017 22:35:34 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eInjA-0005mn-11 for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 22:35:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eInj4-0003xV-2t for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 22:35:26 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIniz-0003w5-68; Sat, 25 Nov 2017 22:35:21 -0500 Received: from [176.228.60.248] (port=4701 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eIniy-0007sK-Gr; Sat, 25 Nov 2017 22:35:20 -0500 Date: Sun, 26 Nov 2017 05:35:06 +0200 Message-Id: <83shd17lw5.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <87vahyxcgv.fsf@users.sourceforge.net> (message from Noam Postavsky on Sat, 25 Nov 2017 16:41:52 -0500) Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <871skmyyyh.fsf@users.sourceforge.net> <83wp2e6suq.fsf@gnu.org> <87y3muxgwm.fsf@users.sourceforge.net> <83tvxi6r78.fsf@gnu.org> <87vahyxcgv.fsf@users.sourceforge.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Noam Postavsky > Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com > Date: Sat, 25 Nov 2017 16:41:52 -0500 > > > and invoke the external command then. If so, I'd agree. But we > > should then allow customization of the external command's name, > > because on Windows it will be something like 'gdate', to avoid calling > > the incompatible Windows shell's built-in (which also prompts > > interactively for input). > > I'm not in front of a Windows box at the moment, but I thought a cmd.exe > builtin like that could only be invoked by doing calling "cmd /C date". By default, yes. But people tend to do weird things with shell setup in Emacs. And customization is an opt-in feature, so the default is unaffected. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 22:36:19 2017 Received: (at 29157) by debbugs.gnu.org; 26 Nov 2017 03:36:19 +0000 Received: from localhost ([127.0.0.1]:58443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eInjv-0005oS-8o for submit@debbugs.gnu.org; Sat, 25 Nov 2017 22:36:19 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eInju-0005oA-Be for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 22:36:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eInjl-0004Jc-BM for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 22:36:13 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eInjl-0004JW-85; Sat, 25 Nov 2017 22:36:09 -0500 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:37965) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1eInjk-0001E0-Rh; Sat, 25 Nov 2017 22:36:08 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 15BE220A78; Sat, 25 Nov 2017 22:36:08 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Sat, 25 Nov 2017 22:36:08 -0500 X-ME-Sender: Received: from localhost (76-234-69-149.lightspeed.frokca.sbcglobal.net [76.234.69.149]) by mail.messagingengine.com (Postfix) with ESMTPA id 8649D24009; Sat, 25 Nov 2017 22:36:07 -0500 (EST) From: "John Wiegley" To: Eli Zaretskii Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" In-Reply-To: <83y3mu6ttn.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 Nov 2017 21:29:08 +0200") Date: Sat, 25 Nov 2017 19:21:01 -0800 Message-ID: References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <83y3mu6ttn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: npostavs@users.sourceforge.net, 29157@debbugs.gnu.org, Pierre Neidhardt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) >>>>> "EZ" == Eli Zaretskii writes: EZ> Not just eshell/date: many Eshell built-ins behave like that, and they do EZ> that on purpose. eshell/date is an alias for `current-time-string'. The fact that this Lisp function accepts arguments, and those arguments can be passed on the Eshell command-line, isn't something I thought of at the time. In hindsight, a separate eshell/date function should have been created that would handle its arguments like the system command. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 22:36:19 2017 Received: (at 29157) by debbugs.gnu.org; 26 Nov 2017 03:36:19 +0000 Received: from localhost ([127.0.0.1]:58445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eInjv-0005oU-GJ for submit@debbugs.gnu.org; Sat, 25 Nov 2017 22:36:19 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eInju-0005oB-Bh for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 22:36:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eInjn-0004LE-Eo for 29157@debbugs.gnu.org; Sat, 25 Nov 2017 22:36:13 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eInjn-0004L4-9x; Sat, 25 Nov 2017 22:36:11 -0500 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:40567) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1eInjm-0001Ix-Te; Sat, 25 Nov 2017 22:36:11 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 7ED2D207BF; Sat, 25 Nov 2017 22:36:10 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Sat, 25 Nov 2017 22:36:10 -0500 X-ME-Sender: Received: from localhost (76-234-69-149.lightspeed.frokca.sbcglobal.net [76.234.69.149]) by mail.messagingengine.com (Postfix) with ESMTPA id 1EFC524136; Sat, 25 Nov 2017 22:36:10 -0500 (EST) From: "John Wiegley" To: Eli Zaretskii Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" In-Reply-To: <83wp2e6suq.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 Nov 2017 21:50:05 +0200") Date: Sat, 25 Nov 2017 19:21:49 -0800 Message-ID: References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <871skmyyyh.fsf@users.sourceforge.net> <83wp2e6suq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) >>>>> "EZ" == Eli Zaretskii writes: EZ> That's one way of looking at Eshell, although it's not my way. Eshell was EZ> intended to be used from Lisp programs, and that's why its built-ins EZ> accept Lisp objects, values, and expressions as arguments. Eshell was intended to be a UNIX-like environment on non-UNIX systems, and as a bonus to provide useful interactions with Lisp. It wasn't built first as a Lisp interaction mode. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 04:17:43 2017 Received: (at 29157) by debbugs.gnu.org; 26 Nov 2017 09:17:43 +0000 Received: from localhost ([127.0.0.1]:58549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIt4I-0005q5-V8 for submit@debbugs.gnu.org; Sun, 26 Nov 2017 04:17:43 -0500 Received: from mail-wr0-f173.google.com ([209.85.128.173]:34196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIt4H-0005pt-CD for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 04:17:41 -0500 Received: by mail-wr0-f173.google.com with SMTP id k18so18739820wre.1 for <29157@debbugs.gnu.org>; Sun, 26 Nov 2017 01:17:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=mv20x0A0FK8Fn/vn4Un7Ppbd9u++Y7CyscUPTi+LaPg=; b=AR1z7R4LLW+BRSl3S5fp9/ATJdVuT+ReFHVjtUpPyXJg9tTOI/rnJ4tl9a5V1SmhpD uy1KRp5L6fNVfsQkMidO84F0cnMLm0QBGas4JZfjSGnyMHsZNCDndO0d2fpd4pckireE wLsgOuPRMyOyazJYyFNT3HbfubM+hlHo0rPQaXESI9t0jSxhNdNedxITdLuQFn1mfUUF 51dARPBbkPermilsrqVfqQhqpdKxJfv7wthYlNi1ggChloIxOg5DBmcaqUvHIVIdb1XL 9ermeaE2eJwUm+VaWaqKMIBdQJhC0XgaBvDAdT0J8dfAcTKk8IOLHNDx89xTwdAShzv7 BUqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=mv20x0A0FK8Fn/vn4Un7Ppbd9u++Y7CyscUPTi+LaPg=; b=aPgcIRalQX/k3ZnX1ijruoQQcEJW6bbmlTJ1tHbvrJxMd1VeHRNpjy7n0doUqboyHN cE4dZGouswu0a7fJhb/X4ETiO9/8u3wNsqpiVWI0MOVunm4N58vqjsE8TVrSxWfSKLDp lhbNHFVyrWcfYVYNBNUF1hIbYiQUorHu8oDCZJquDjTgFbTmaBH+rwRuKH3Nw/7hvL5g CPE69g6ThiMgWy9zeZK1flcO/sikuuoRdOlyiZJXDsnL9Xo5zfhVZ+uO9pRsUIvlN8pD kIelR5Qe1ZOmHAmeSuhDGYGX0yiobfrdVfurp202xmN/trmbjtnEyYyXtFmURDkQI8j7 hE+g== X-Gm-Message-State: AJaThX7HCJW0yeo2WfhvSTb7emNjTJSAp7Tdf7H6sobG4qFTW/uR1bqx LZSHngfWp3rjexvDf/oONY1QHA== X-Google-Smtp-Source: AGs4zMYgZO+nrdUcaoB/EsX2vyS/eV7JlbE5MSvk8FCJ6I9t4p+f2tAw6BUPXFczRPayoq5Qz3dugA== X-Received: by 10.223.142.143 with SMTP id q15mr23606845wrb.6.1511687855316; Sun, 26 Nov 2017 01:17:35 -0800 (PST) Received: from dhiov23k ([197.1.154.186]) by smtp.gmail.com with ESMTPSA id x63sm11373493wma.39.2017.11.26.01.17.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Nov 2017 01:17:34 -0800 (PST) References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <83y3mu6ttn.fsf@gnu.org> <87indyi20r.fsf@gmail.com> <83vahy6si5.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" In-reply-to: <83vahy6si5.fsf@gnu.org> Date: Sun, 26 Nov 2017 10:17:30 +0100 Message-ID: <87mv39v1p1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> > If you want to know that so you could always get the same responses as >> > from another system shell, then perhaps we should have an option to >> > tell Eshell to always invoke an external program (maybe we already >> > have such an option, but I couldn't find it). >> >> No, not like that, more like a friendly reminder: "this 'date' behaves >> the Eshell way, while that 'rmdir' is the system program". > > But the answer to that question depends on the arguments and sometimes > on the switches, doesn't it? E.g., Eshell's 'rm' can delete processes > and buffers, and unintern symbols, in addition to deleting files. > What exactly it does depends on the arguments. And if you invoke it > with -d switch, it will call the external program, but if you invoke > with -f or -i or -n, it will use the built-in. So just given the > verb, I don't see how you can have that indication. Wow, I did not know that. This is not documented in the docstring, but I just saw it is mentioned in the help message. That maybe it the root of the issue: what's the standard way of documenting 'eshell/*' commands? I think both `-h' and `C-h f' should document the same thing, it's confusing otherwise. Lest users suffer too much from the "Where did I find that valuable help again?" syndrom. >> > Isn't it true that a verb that doesn't begin with a '*' is _never_ a >> > system program in Eshell? >> >> I'm tempted to answer "no, it's not true", but we might be >> misunderstood. >> >> As far as I got it, the '*' is here to force Eshell to use the system >> program, while no '*' tells Eshell to use its own version if available, >> or the system program otherwise. > > So you want to have an indication when there's _no_ built-in > implementation at all, is that it? No. Basically if I write "rm" in Eshell, Eshell will _always_ call eshell/rm. Only afterwards it will make a call to /bin/rm, depending on the arguments. As a user, what I want to know is what Eshell will call _first_, because then I can know the starting point of what Eshell is going to do. Basically, my idea is simple: - If 'eshell/foo' exists, use some eshell-builtin face on "foo". The user will then know that s/he should lookup the documentation of eshell/foo. - Otherwise use the normal face. The user will then refer to the man page and the like. -- Pierre Neidhardt If the grass is greener on other side of fence, consider what may be fertilizing it. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAloahqoACgkQm9z0l6S7 zH/5Zwf/c8ZR4DRKgr1YjotRk19MEswwHEmZ/MJaebFYcsO8EcH2Fg4t1jYOJrMJ QHaRt+ZpKBjydOoP8O4+DRnEDG3J6IF1NRkBdTMescnJQBiPvO7K4gkZgDDMZ8D7 EysMyWmdqyhX0+rymVrFd/BK1ORTL/ZPkcDk1p0DVQ7diP/aruuLUKTqbEfAR9Aj XqeL3wK68ovM8dw9Px9oMcQe+S+tLxltU4q12KBi1hOI8BHUgWfr5KGkInlK9N3O Cu1rtYuwK/YiJ+jlYZjHDMZ+/JJSAn523LHpepNXgDS6IWnnkAbHLKpTUPvInyag 87rpz6ix9lmdCCW5ex6PhNiCTtUPsQ== =Zk7e -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 10:34:27 2017 Received: (at 29157) by debbugs.gnu.org; 26 Nov 2017 15:34:27 +0000 Received: from localhost ([127.0.0.1]:59465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIyws-00076C-W9 for submit@debbugs.gnu.org; Sun, 26 Nov 2017 10:34:27 -0500 Received: from eggs.gnu.org ([208.118.235.92]:32855) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIywr-00075z-7l for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 10:34:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIywj-00073W-2c for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 10:34:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIywX-0006y6-5i; Sun, 26 Nov 2017 10:34:05 -0500 Received: from [176.228.60.248] (port=4924 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eIywW-0005gs-JB; Sun, 26 Nov 2017 10:34:05 -0500 Date: Sun, 26 Nov 2017 17:33:51 +0200 Message-Id: <83o9np6om8.fsf@gnu.org> From: Eli Zaretskii To: "John Wiegley" In-reply-to: (johnw@gnu.org) Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <83y3mu6ttn.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: npostavs@users.sourceforge.net, 29157@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: "John Wiegley" > Cc: Pierre Neidhardt , 29157@debbugs.gnu.org, npostavs@users.sourceforge.net > Date: Sat, 25 Nov 2017 19:21:01 -0800 > > >>>>> "EZ" == Eli Zaretskii writes: > > EZ> Not just eshell/date: many Eshell built-ins behave like that, and they do > EZ> that on purpose. > > eshell/date is an alias for `current-time-string'. The fact that this Lisp > function accepts arguments, and those arguments can be passed on the Eshell > command-line, isn't something I thought of at the time. Maybe not in this case, but other Eshell commands definitely feature similar behaviors, and there you cannot convince me it's an accident, because the behavior is documented in the doc string. > In hindsight, a separate eshell/date function should have been created that > would handle its arguments like the system command. There is such a function: *date. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 10:36:11 2017 Received: (at 29157) by debbugs.gnu.org; 26 Nov 2017 15:36:11 +0000 Received: from localhost ([127.0.0.1]:59469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIyyZ-00078v-B4 for submit@debbugs.gnu.org; Sun, 26 Nov 2017 10:36:11 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIyyX-00078j-Ja for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 10:36:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIyyR-0007iy-Pw for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 10:36:04 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIyyL-0007fW-QH; Sun, 26 Nov 2017 10:35:57 -0500 Received: from [176.228.60.248] (port=4925 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eIyyL-0001QV-77; Sun, 26 Nov 2017 10:35:57 -0500 Date: Sun, 26 Nov 2017 17:35:44 +0200 Message-Id: <83mv396oj3.fsf@gnu.org> From: Eli Zaretskii To: "John Wiegley" In-reply-to: (johnw@gnu.org) Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <871skmyyyh.fsf@users.sourceforge.net> <83wp2e6suq.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: "John Wiegley" > Cc: Noam Postavsky , 29157@debbugs.gnu.org, ambrevar@gmail.com > Date: Sat, 25 Nov 2017 19:21:49 -0800 > > >>>>> "EZ" == Eli Zaretskii writes: > > EZ> That's one way of looking at Eshell, although it's not my way. Eshell was > EZ> intended to be used from Lisp programs, and that's why its built-ins > EZ> accept Lisp objects, values, and expressions as arguments. > > Eshell was intended to be a UNIX-like environment on non-UNIX systems, and as > a bonus to provide useful interactions with Lisp. It wasn't built first as a > Lisp interaction mode. Well, maybe historically I'm wrong, but factually I'm right: what we have now is a shell that can act on Lisp objects and Lisp expressions, and this fact is even documented in the manual. I personally find this feature useful and a lot of fun, and I think it would be a pity to lose it. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 10:53:30 2017 Received: (at 29157) by debbugs.gnu.org; 26 Nov 2017 15:53:30 +0000 Received: from localhost ([127.0.0.1]:59499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIzFK-0007Yd-A7 for submit@debbugs.gnu.org; Sun, 26 Nov 2017 10:53:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIzFI-0007YR-C8 for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 10:53:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIzF9-0006Ux-P6 for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 10:53:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIzF9-0006Ut-Kq; Sun, 26 Nov 2017 10:53:19 -0500 Received: from [176.228.60.248] (port=4930 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eIzF9-0002uu-0N; Sun, 26 Nov 2017 10:53:19 -0500 Date: Sun, 26 Nov 2017 17:53:05 +0200 Message-Id: <83indx6nq6.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <87mv39v1p1.fsf@gmail.com> (message from Pierre Neidhardt on Sun, 26 Nov 2017 10:17:30 +0100) Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <83y3mu6ttn.fsf@gnu.org> <87indyi20r.fsf@gmail.com> <83vahy6si5.fsf@gnu.org> <87mv39v1p1.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Cc: npostavs@users.sourceforge.net, 29157@debbugs.gnu.org > Date: Sun, 26 Nov 2017 10:17:30 +0100 > > > But the answer to that question depends on the arguments and sometimes > > on the switches, doesn't it? E.g., Eshell's 'rm' can delete processes > > and buffers, and unintern symbols, in addition to deleting files. > > What exactly it does depends on the arguments. And if you invoke it > > with -d switch, it will call the external program, but if you invoke > > with -f or -i or -n, it will use the built-in. So just given the > > verb, I don't see how you can have that indication. > > Wow, I did not know that. This is not documented in the docstring, but > I just saw it is mentioned in the help message. > > That maybe it the root of the issue: what's the standard way of > documenting 'eshell/*' commands? > > I think both `-h' and `C-h f' should document the same thing, it's > confusing otherwise. Patches to that effect are welcome. > > So you want to have an indication when there's _no_ built-in > > implementation at all, is that it? > > No. Basically if I write "rm" in Eshell, Eshell will _always_ call > eshell/rm. Only afterwards it will make a call to /bin/rm, depending on > the arguments. > As a user, what I want to know is what Eshell will call _first_, because > then I can know the starting point of what Eshell is going to do. > > Basically, my idea is simple: > > - If 'eshell/foo' exists, use some eshell-builtin face on "foo". The > user will then know that s/he should lookup the documentation of > eshell/foo. > > - Otherwise use the normal face. The user will then refer to the man > page and the like. Well, I think you said the same thing I did, just from a different POV. So we are in agreement. Feel free to work on such a feature. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 16:45:58 2017 Received: (at 29157) by debbugs.gnu.org; 26 Nov 2017 21:45:58 +0000 Received: from localhost ([127.0.0.1]:59691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ4kM-0006oF-H8 for submit@debbugs.gnu.org; Sun, 26 Nov 2017 16:45:58 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ4kI-0006nx-7i for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 16:45:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJ4k8-0005aA-Bp for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 16:45:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJ4k8-0005a6-8b; Sun, 26 Nov 2017 16:45:40 -0500 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:45187) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1eJ4k7-0003cw-Rn; Sun, 26 Nov 2017 16:45:39 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 447392099B; Sun, 26 Nov 2017 16:45:39 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Sun, 26 Nov 2017 16:45:39 -0500 X-ME-Sender: Received: from localhost (76-234-69-149.lightspeed.frokca.sbcglobal.net [76.234.69.149]) by mail.messagingengine.com (Postfix) with ESMTPA id D81A8240B2; Sun, 26 Nov 2017 16:45:38 -0500 (EST) From: John Wiegley To: Eli Zaretskii Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" In-Reply-To: <83mv396oj3.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 26 Nov 2017 17:35:44 +0200") Date: Sun, 26 Nov 2017 13:44:42 -0800 Message-ID: References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <871skmyyyh.fsf@users.sourceforge.net> <83wp2e6suq.fsf@gnu.org> <83mv396oj3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) >>>>> "EZ" == Eli Zaretskii writes: EZ> Well, maybe historically I'm wrong, but factually I'm right: what we have EZ> now is a shell that can act on Lisp objects and Lisp expressions, and this EZ> fact is even documented in the manual. I personally find this feature EZ> useful and a lot of fun, and I think it would be a pity to lose it. Sure, very much agreed, it was an unintended result but a welcome one. :) -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 16:46:04 2017 Received: (at 29157) by debbugs.gnu.org; 26 Nov 2017 21:46:04 +0000 Received: from localhost ([127.0.0.1]:59693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ4kS-0006oW-G5 for submit@debbugs.gnu.org; Sun, 26 Nov 2017 16:46:04 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ4kK-0006nz-1N for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 16:45:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJ4kA-0005aU-HE for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 16:45:47 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJ4kA-0005aQ-E9; Sun, 26 Nov 2017 16:45:42 -0500 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:49529) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1eJ4k9-0003d1-VT; Sun, 26 Nov 2017 16:45:42 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 8029E208BD; Sun, 26 Nov 2017 16:45:41 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Sun, 26 Nov 2017 16:45:41 -0500 X-ME-Sender: Received: from localhost (76-234-69-149.lightspeed.frokca.sbcglobal.net [76.234.69.149]) by mail.messagingengine.com (Postfix) with ESMTPA id 1BA05240B2; Sun, 26 Nov 2017 16:45:41 -0500 (EST) From: John Wiegley To: Eli Zaretskii Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" In-Reply-To: <83o9np6om8.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 26 Nov 2017 17:33:51 +0200") Date: Sun, 26 Nov 2017 13:45:30 -0800 Message-ID: References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <83y3mu6ttn.fsf@gnu.org> <83o9np6om8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: npostavs@users.sourceforge.net, 29157@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) >>>>> Eli Zaretskii writes: > Maybe not in this case, but other Eshell commands definitely feature similar > behaviors, and there you cannot convince me it's an accident, because the > behavior is documented in the doc string. Wait, not trying to convince you of anything, just responding to what eshell/date acts weird when given arguments. It's "news to me" in other words. >> In hindsight, a separate eshell/date function should have been created that >> would handle its arguments like the system command. > There is such a function: *date. I mean, an implementation that works when no system "date" command exists, yet accepts arguments similar to what system date accepts. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 22:33:09 2017 Received: (at 29157) by debbugs.gnu.org; 27 Nov 2017 03:33:09 +0000 Received: from localhost ([127.0.0.1]:59876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJAAP-00027c-J7 for submit@debbugs.gnu.org; Sun, 26 Nov 2017 22:33:09 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJAAO-00027R-O3 for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 22:33:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJAAG-0007wZ-BS for 29157@debbugs.gnu.org; Sun, 26 Nov 2017 22:33:03 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJA9z-0007sb-IY; Sun, 26 Nov 2017 22:32:43 -0500 Received: from [176.228.60.248] (port=1822 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eJA9y-00070l-TM; Sun, 26 Nov 2017 22:32:43 -0500 Date: Mon, 27 Nov 2017 05:32:31 +0200 Message-Id: <83375075ww.fsf@gnu.org> From: Eli Zaretskii To: John Wiegley In-reply-to: (message from John Wiegley on Sun, 26 Nov 2017 13:45:30 -0800) Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <83y3mu6ttn.fsf@gnu.org> <83o9np6om8.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: npostavs@users.sourceforge.net, 29157@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: John Wiegley > Cc: ambrevar@gmail.com, 29157@debbugs.gnu.org, npostavs@users.sourceforge.net > Date: Sun, 26 Nov 2017 13:45:30 -0800 > > >> In hindsight, a separate eshell/date function should have been created that > >> would handle its arguments like the system command. > > > There is such a function: *date. > > I mean, an implementation that works when no system "date" command exists, yet > accepts arguments similar to what system date accepts. If someone wants to work on Eshell's 'date' so that it accepts more complicated arguments that the Coreutils version does, they should feel free, of course. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 03 15:43:55 2017 Received: (at 29157) by debbugs.gnu.org; 3 Dec 2017 20:43:55 +0000 Received: from localhost ([127.0.0.1]:43851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLb7C-00088J-Nx for submit@debbugs.gnu.org; Sun, 03 Dec 2017 15:43:54 -0500 Received: from mail-it0-f53.google.com ([209.85.214.53]:45722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLb7A-000881-GA; Sun, 03 Dec 2017 15:43:53 -0500 Received: by mail-it0-f53.google.com with SMTP id z6so8132653iti.4; Sun, 03 Dec 2017 12:43:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=j9Jum09HovCPblJ+XTzTNThFU7YvKcFkvpKYmhcFYYs=; b=jpjlovhw/hCvzYVdqTHLsr0p417iLzWVu23O3rm0F8ow5YC61uBZB2PMpfUsemA107 TQuT1mvCcT15NWMrwbanGNdyctUOuRthbo15ZZdwJca6qBb50sYk2jmH+MxSAxb21TfS QkFSD2hdG2euYfvElpYZSYTeBIld4EQny6AovRs5qy+ANJTiiL4h/s2dCHywWITmbp3t mwddlhou+zWX5RneiNmMOmUOMIRSjQoRSvMy2qniosWKpLlor1yAf/kCZsAdpX+qLSd6 hcAejD/WAgiPzA7451YG9fpiRV8d6kDpQD0q0VqGF79fUdKJJ7ExKLy9xlzzS1sv7jNG TqKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=j9Jum09HovCPblJ+XTzTNThFU7YvKcFkvpKYmhcFYYs=; b=nWNj6/l+zmvcKPobbo408ulZeQo2YNSpcjny1Zu7k+hdY0DD3VztZWMfMKHcv6xHjz XS75MasQY8kEPRaIyT13Yck1/1cqQuSbGT76g2+mf2aPwHmAfzavmJgm7Sq7SEe4WFvB MGt/QLw+ATkeXpWgGjOY/vrlGmzP79xBwbZYV/SN4mswUBjgzxvAzSIN51okTiSmUJcI MigLBbCdeBH6QVZm5Rs9R6uNDqW20IE0mPd9oWd97NAAQycUmsi/s4GOEGuwYYrKrxU4 bdKH32PrK9eub4rgncPIlLuF077qKmWYXAQckMZuqiJ4JVHvD3oaS2yCHswZgjnIA177 UZ+w== X-Gm-Message-State: AJaThX4hA6TCHty0Lj3oDjoaBC2pSRTWm4ehC6Jg0o30w3uiMmj8xYtG qbUaTgZ71wlv40wVXR4Frlu1gw== X-Google-Smtp-Source: AGs4zMYN/h9xHIv/KgeeNLFr3zPLy0nahGxhnf4QaTOStBR0F9FuryZezJE/DM7JzYTOXZNDqThjBQ== X-Received: by 10.107.78.24 with SMTP id c24mr20398057iob.87.1512333826651; Sun, 03 Dec 2017 12:43:46 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id 97sm5163461ioh.22.2017.12.03.12.43.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Dec 2017 12:43:45 -0800 (PST) From: Noam Postavsky To: Pierre Neidhardt Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> Date: Sun, 03 Dec 2017 15:43:44 -0500 In-Reply-To: <87po891o1t.fsf@gmail.com> (Pierre Neidhardt's message of "Thu, 23 Nov 2017 07:55:58 +0100") Message-ID: <874lp7iltr.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) close 29157 27.1 quit Pierre Neidhardt writes: >> I agree. Although the expansion in this case is arguably a bug (as >> Andreas pointed out), I don't have much interest in fixing it. I >> propose just to disable it by default (in master). > > Thank you. Pushed to master [1: 1cdd0e8cd8]. Closing the bug as it's basically "working as designed" (although enhanced versions of eshell/date would be welcomed as mentioned earlier on this bug thread). [1: 1cdd0e8cd8]: 2017-12-03 15:39:02 -0500 Disable history expansion in eshell (Bug#29157) https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1cdd0e8cd801aa1d6f04ab4d8e6097a46af8c951 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 04 03:44:54 2017 Received: (at 29157) by debbugs.gnu.org; 4 Dec 2017 08:44:54 +0000 Received: from localhost ([127.0.0.1]:44265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLmMw-0006oe-LD for submit@debbugs.gnu.org; Mon, 04 Dec 2017 03:44:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLmMu-0006oR-GU for 29157@debbugs.gnu.org; Mon, 04 Dec 2017 03:44:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLmMl-000470-BX for 29157@debbugs.gnu.org; Mon, 04 Dec 2017 03:44:47 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLmMl-00046r-8C; Mon, 04 Dec 2017 03:44:43 -0500 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:60321) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1eLmMl-00018Y-06; Mon, 04 Dec 2017 03:44:43 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 34773209E9; Mon, 4 Dec 2017 03:44:42 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Mon, 04 Dec 2017 03:44:42 -0500 X-ME-Sender: Received: from localhost (76-234-69-149.lightspeed.frokca.sbcglobal.net [76.234.69.149]) by mail.messagingengine.com (Postfix) with ESMTPA id B7480246D5; Mon, 4 Dec 2017 03:44:41 -0500 (EST) From: "John Wiegley" To: Noam Postavsky Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" In-Reply-To: <874lp7iltr.fsf@users.sourceforge.net> (Noam Postavsky's message of "Sun, 03 Dec 2017 15:43:44 -0500") Date: Mon, 04 Dec 2017 00:43:27 -0800 Message-ID: References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <874lp7iltr.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, Pierre Neidhardt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) >>>>> "NP" == Noam Postavsky writes: NP> Pushed to master [1: 1cdd0e8cd8]. Closing the bug as it's basically NP> "working as designed" (although enhanced versions of eshell/date would be NP> welcomed as mentioned earlier on this bug thread). Hi Noam, if would have been nice for you to discuss your change in this thread before pushing it. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 04 07:51:35 2017 Received: (at 29157) by debbugs.gnu.org; 4 Dec 2017 12:51:35 +0000 Received: from localhost ([127.0.0.1]:44397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLqDf-00065e-6U for submit@debbugs.gnu.org; Mon, 04 Dec 2017 07:51:35 -0500 Received: from mail-it0-f45.google.com ([209.85.214.45]:37078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLqDe-00065S-0b for 29157@debbugs.gnu.org; Mon, 04 Dec 2017 07:51:34 -0500 Received: by mail-it0-f45.google.com with SMTP id d137so6303381itc.2 for <29157@debbugs.gnu.org>; Mon, 04 Dec 2017 04:51:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=g02HHPuEObsN6bnGvCVmqY9dWYZEousb99QtTVl6eGI=; b=GXTAlHd5oFGkRCOd0DRZFeD4rOkZsJ8xpqfy0BsDawFlMngkPHinvCDEPkJQ+Tvz7x eYIL2Vjz3z1NSC8+Y1hVP8wCZGE54eZchi/L86y1jIRjuva7Zwfwr72yUkLJsZCGzZH1 3r+7/PmXeHnXFyfw0ZJcHp6JF+3DIHIjn66jm8e0/MWPKb+vEfMsbIrKumzGRm71uouD y8zS/Hx/CeZUWX1FmGB/byu9ZXDby2TGLSZFWKinztiOSKDbKZSnR1rE5l7V6ktFyokU UIjqX/osLrztSzy2ZLElZOkWJJZUheyauKm172HSwVWsEpZOpNZ7aji6JPaa/uAMfXjl vQlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=g02HHPuEObsN6bnGvCVmqY9dWYZEousb99QtTVl6eGI=; b=bQMpwf6FGUXns1nfKw2v/OaFCRLns9DytJQBOvm8Pw7Whf/wXMv2zqTwHsdfq2sJWM JNZe9d9cMEfw6ClzMIJX8DlTFv/STx3N0+eSRUiAI9sM6Vj2zPC/q2k715xTkUMRiH5R AE2JFfVuhkjxNKIMgIxsKmwFUI1yHKPjMhQVOYEvHUgDPLoHheZIQ0N5kI+OTjj0NNID Z9mShGllOuSPO9izYogw92Rj/g7zxHTWmYToJiRpfVem2tlyp4J1GRwDAMmw+B2qe1tC Q1IFM1SfqghfJUdmJRHQ6Dk7KdxVspqPm9wWW0xv/QytLEk5AnETvJIDBr9UptRNdnon TEVw== X-Gm-Message-State: AJaThX5iPqVK/1+Z39SqyQZmAcaFL2Q5+jWNQI9fRGa+KdugYS/Iqs9E RTBi//S1GMHx5sxXjAPWA/I= X-Google-Smtp-Source: AGs4zMaKdJ8zA41olXofVNr94KujDik0YGPDs6lmDwHYkl8RuW+kQO1L0388lOhHzsOjPhxTv1i6Hw== X-Received: by 10.107.101.16 with SMTP id z16mr22784004iob.85.1512391888249; Mon, 04 Dec 2017 04:51:28 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id e68sm4580012ite.0.2017.12.04.04.51.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Dec 2017 04:51:26 -0800 (PST) From: Noam Postavsky To: "John Wiegley" Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <874lp7iltr.fsf@users.sourceforge.net> Date: Mon, 04 Dec 2017 07:51:25 -0500 In-Reply-To: (John Wiegley's message of "Mon, 04 Dec 2017 00:43:27 -0800") Message-ID: <87mv2yhd0y.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 29157 Cc: 29157@debbugs.gnu.org, Pierre Neidhardt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) "John Wiegley" writes: >>>>>> "NP" == Noam Postavsky writes: > > NP> Pushed to master [1: 1cdd0e8cd8]. Closing the bug as it's basically > NP> "working as designed" (although enhanced versions of eshell/date would be > NP> welcomed as mentioned earlier on this bug thread). > > Hi Noam, if would have been nice for you to discuss your change in this thread > before pushing it. Hmm, I believe I have discussed it, see: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29157#8 // initial post of the change https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29157#11 // Pierre agreed with it https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29157#20 // Full change with NEWS posted https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29157#23 // Pierre agreed again https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29157#95 // Pushed after more than 1 week and no objections From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 21 03:18:41 2017 Received: (at 29157) by debbugs.gnu.org; 21 Dec 2017 08:18:41 +0000 Received: from localhost ([127.0.0.1]:45148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eRw3s-0004HE-LD for submit@debbugs.gnu.org; Thu, 21 Dec 2017 03:18:40 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eRw3r-0004H2-Br for 29157@debbugs.gnu.org; Thu, 21 Dec 2017 03:18:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRw3j-0002M7-CL for 29157@debbugs.gnu.org; Thu, 21 Dec 2017 03:18:34 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRw3j-0002M1-7Z; Thu, 21 Dec 2017 03:18:31 -0500 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:44521) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1eRw3i-0007YX-OF; Thu, 21 Dec 2017 03:18:30 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 444D920C10; Thu, 21 Dec 2017 03:18:30 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Thu, 21 Dec 2017 03:18:30 -0500 X-ME-Sender: Received: from localhost (76-234-69-149.lightspeed.frokca.sbcglobal.net [76.234.69.149]) by mail.messagingengine.com (Postfix) with ESMTPA id BEB322463E; Thu, 21 Dec 2017 03:18:29 -0500 (EST) From: John Wiegley To: Eli Zaretskii Subject: Re: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" In-Reply-To: <83375075ww.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 27 Nov 2017 05:32:31 +0200") Date: Thu, 21 Dec 2017 00:17:50 -0800 Message-ID: References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> <8360a1arlf.fsf@gnu.org> <87lgiui6qc.fsf@gmail.com> <83y3mu6ttn.fsf@gnu.org> <83o9np6om8.fsf@gnu.org> <83375075ww.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29157 Cc: npostavs@users.sourceforge.net, 29157@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) >>>>> "EZ" == Eli Zaretskii writes: EZ> If someone wants to work on Eshell's 'date' so that it accepts more EZ> complicated arguments that the Coreutils version does, they should feel EZ> free, of course. I imagine it would start somewhere like this: --8<---------------cut here---------------start------------->8--- (defun eshell/date (&rest args) "Implementation of date in Lisp." (setq args (eshell-flatten-list args)) (eshell-eval-using-options "rm" args '( (?d "date" nil nil "display time described by STRING, not 'now'") (nil "debug" nil nil "annotate the parsed date and warn about questionable usage") (?f "file" nil nil "like --date; once for each line of DATEFILE") (?I "iso-8601" nil nil "output date/time in ISO 8601 format") (?R "rfc-email" nil nil "output date and time in RFC 5322 format") (nil "rfc-3339" nil nil "output date/time in RFC 3339 format") (?r "reference" nil nil "display the last modification time of FILE") (?s "set" nil nil "set time described by STRING") (?u "utc" nil nil "print or set Coordinated Universal Time (UTC)") (nil "universal" nil nil "print or set Coordinated Universal Time (UTC)") (nil "help" nil nil "display this help and exit") (nil "version" nil nil "output version information and exit") :preserve-args :external "date" :show-usage :usage "[OPTION]... [+FORMAT] Display the current time in the given FORMAT, or set the system date.") (while args (let ((entry (car args))) ) (setq args (cdr args))) nil)) --8<---------------cut here---------------end--------------->8--- -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From unknown Tue Jun 24 17:26:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 18 Jan 2018 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator