all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Milan Zimmermann <milan.zimmermann@gmail.com>
To: 59650@debbugs.gnu.org, 59650-done@debbugs.gnu.org
Cc: Juanma Barranquero <lekktu@gmail.com>
Subject: bug#59650: 29.0.50; Eshell: Non-idempotent behavior of undefined commands
Date: Mon, 28 Nov 2022 18:28:59 -0500	[thread overview]
Message-ID: <CAEc2VK2FuCrqxsCVfsRVVR1Nj+2+uQE7dSh-4Zgq3n=WfzOqwA@mail.gmail.com> (raw)
In-Reply-To: <CAAeL0STXtBJ7W+snrkWmr_N4fLqoN6QRbzODT0qJOWt+ENBTuw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 7492 bytes --]

Thanks for this recipe, this is exactly what I wanted, as simply setting
eshell-bad-command-tolerance to 0 does not work.

I am closing this bug, although I would consider
disabling 'eshell-fix-bad-commands a configuration request :)


On Mon, Nov 28, 2022 at 3:49 AM Juanma Barranquero <lekktu@gmail.com> wrote:

> You can remove the checking command
>
> (add-hook 'eshell-mode-hook
>           (lambda ()
>             (remove-hook 'eshell-alternate-command-hook
> 'eshell-fix-bad-commands t)))
>
> or some variant of it. The command is added to the hook unconditionally,
> with no customization option, AFAICS.
>
> On Mon, Nov 28, 2022 at 9:34 AM Milan Zimmermann <
> milan.zimmermann@gmail.com> wrote:
>
>> I am reporting this realizing, this non-idempotent behavior will likely
>> not be considered a bug.
>>
>> However, in a scripting language, when one would want to use scripts not
>> attended, it is disturbing (at least, to me).
>>
>> Try any command that does not exist, four (4) times. The first three
>> times, we get "Command not found". The fourth time, we are prompted for
>> an alias. This is not desirable. If anything, why not ask the first time?
>>
>> ========================
>> ~/tmp $ 1
>> 1: command not found
>> ~/tmp $ 1
>> 1: command not found
>> ~/tmp $ 1
>> 1: command not found
>> ~/tmp $ 1 ### Prompt: Define alias for "1"
>> ========================
>>
>> Is there a way to change this, to never ask for an alias? I
>> apologize if I missed some customization, I did look quite a bit.
>>
>>
>> Addendum:
>> =================================
>> I also offer this slant on the issue:
>>
>> ~/tmp $ if ${> 3 1} {echo "FIRST"} {echo "SECOND"}
>> FIRST
>> ~/tmp $ if ${> 3 1} {echo "FIRST"} {echo "SECOND"}
>> FIRST
>> ~/tmp $ if ${> 3 1} {echo "FIRST"} {echo "SECOND"}
>> FIRST
>> ~/tmp $ if ${> 3 1} {echo "FIRST"} {echo "SECOND"} ###  Prompt: Define
>> alias for "nil"
>>
>>
>> This actually shows a bug in the conditionals. I assume the test returns
>> nil which for some reason is, on the 4th attempt to considered a
>> command?
>>
>> Maybe it is confused because of this behavior:
>>
>> ~/tmp $ if ${< 3 1} {echo "FIRST"} {echo "SECOND"}
>> Eshell does not support input redirection
>>
>> and same here:
>>
>> ~/tmp $ if {< 3 1} {echo "FIRST"} {echo "SECOND"}
>> Eshell does not support input redirection
>>
>> I assume all this should be reported as a separate bug?
>>
>> Thanks
>> Milan
>>
>>
>> In GNU Emacs 29.0.50 (build 1, x86_64-suse-linux-gnu, GTK+ Version
>> 3.24.34, cairo version 1.17.6)
>> System Description: openSUSE Tumbleweed
>>
>> Configured using:
>>  'configure --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu
>>  --program-prefix= --disable-dependency-tracking --prefix=/usr
>>  --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
>>  --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include
>>  --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var
>>  --sharedstatedir=/var/lib --mandir=/usr/share/man
>>  --infodir=/usr/share/info --disable-build-details --without-pop
>>  --with-mailutils --without-hesiod --with-gameuser=:games
>>  --with-kerberos --with-kerberos5 --with-file-notification=inotify
>>  --with-modules --enable-autodepend --prefix=/usr
>>  --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
>>  --localstatedir=/var --sharedstatedir=/var/lib
>>  --libexecdir=/usr/libexec --with-file-notification=yes
>>
>>  --enable-locallisppath=/usr/share/emacs/29.0.50/site-lisp:/usr/share/emacs/site-lisp
>>  --without-x --with-json --without-xim --with-sound --with-xpm
>>  --with-jpeg --with-tiff --with-gif --with-png --with-rsvg --with-dbus
>>  --without-xft --without-gpm --with-pgtk --without-native-compilation
>>  --with-toolkit-scroll-bars --with-libotf --with-m17n-flt --with-cairo
>>  --without-xwidgets --with-dumping=pdumper 'CFLAGS=-O2 -Wall
>>  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong
>>  -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection
>>  -Werror=return-type -flto=auto -D_GNU_SOURCE
>>  -DGDK_DISABLE_DEPRECATION_WARNINGS -DGLIB_DISABLE_DEPRECATION_WARNINGS'
>>  LDFLAGS=-flto=auto'
>>
>> Configured features:
>> ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
>> LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY
>> PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
>> TOOLKIT_SCROLL_BARS WEBP XIM GTK3 ZLIB
>>
>> Important settings:
>>   value of $LANG: en_CA.UTF-8
>>   value of $XMODIFIERS: @im=ibus
>>   locale-coding-system: utf-8-unix
>>
>> Major mode: Eshell
>>
>> Minor modes in effect:
>>   shell-dirtrack-mode: t
>>   eshell-prompt-mode: t
>>   eshell-hist-mode: t
>>   eshell-pred-mode: t
>>   eshell-cmpl-mode: t
>>   eshell-proc-mode: t
>>   eshell-arg-mode: t
>>   tooltip-mode: t
>>   global-eldoc-mode: t
>>   show-paren-mode: t
>>   electric-indent-mode: t
>>   mouse-wheel-mode: t
>>   tool-bar-mode: t
>>   menu-bar-mode: t
>>   file-name-shadow-mode: t
>>   global-font-lock-mode: t
>>   font-lock-mode: t
>>   blink-cursor-mode: t
>>   line-number-mode: t
>>   indent-tabs-mode: t
>>   transient-mark-mode: t
>>   auto-composition-mode: t
>>   auto-encryption-mode: t
>>   auto-compression-mode: t
>>
>> Load-path shadows:
>> None found.
>>
>> Features:
>> (shadow sort mail-extr emacsbug message mailcap yank-media puny dired
>> dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
>> epg-config gnus-util text-property-search mm-decode mm-bodies mm-encode
>> mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
>> rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date cl-seq
>> em-unix em-term term disp-table shell subr-x ehelp em-script em-prompt
>> em-ls em-hist em-pred em-glob em-extpipe em-cmpl em-dirs esh-var
>> pcomplete comint ansi-osc ansi-color ring em-basic em-banner em-alias
>> esh-mode eshell esh-cmd generator esh-ext esh-opt esh-proc esh-io
>> esh-arg esh-module esh-groups esh-util cus-edit pp cus-start cus-load
>> icons wid-edit cl-loaddefs cl-lib files-x rmc iso-transl tooltip cconv
>> eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
>> elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd
>> tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
>> newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
>> rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
>> font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
>> simple cl-generic indonesian philippine cham georgian utf-8-lang
>> misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
>> cp51932 hebrew greek romanian slovak czech european ethiopic indian
>> cyrillic chinese composite emoji-zwj charscript charprop case-table
>> epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
>> loaddefs theme-loaddefs faces cus-face macroexp files window
>> text-properties overlay sha1 md5 base64 format env code-pages mule
>> custom widget keymap hashtable-print-readable backquote threads dbusbind
>> inotify dynamic-setting system-font-setting font-render-setting cairo
>> gtk pgtk lcms2 multi-tty make-network-process emacs)
>>
>> Memory information:
>> ((conses 16 77472 8445)
>>  (symbols 48 8768 0)
>>  (strings 32 24219 1387)
>>  (string-bytes 1 726949)
>>  (vectors 16 14928)
>>  (vector-slots 8 203659 15195)
>>  (floats 8 34 36)
>>  (intervals 56 345 0)
>>  (buffers 984 11))
>>
>

[-- Attachment #2: Type: text/html, Size: 8708 bytes --]

      parent reply	other threads:[~2022-11-28 23:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28  8:33 bug#59650: 29.0.50; Eshell: Non-idempotent behavior of undefined commands Milan Zimmermann
2022-11-28  8:48 ` Juanma Barranquero
2022-11-28  8:51   ` Juanma Barranquero
2022-11-28 23:28   ` Milan Zimmermann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEc2VK2FuCrqxsCVfsRVVR1Nj+2+uQE7dSh-4Zgq3n=WfzOqwA@mail.gmail.com' \
    --to=milan.zimmermann@gmail.com \
    --cc=59650-done@debbugs.gnu.org \
    --cc=59650@debbugs.gnu.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.