From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#65604: [PATCH] Display the exit code if the last command failed in Eshell Date: Sat, 2 Sep 2023 15:46:11 -0700 Message-ID: <261eee80-5ccb-8680-b895-26379a837a52@gmail.com> References: <87cyz5wjtm.fsf@mssdvd.com> <05108d35-d095-c975-78b8-6b00fc7e6a08@gmail.com> <87o7iolg6o.fsf@mssdvd.com> <83v8cwfphy.fsf@gnu.org> <87wmxc4ah3.fsf@mssdvd.com> <83fs40fi35.fsf@gnu.org> <87msy8s344.fsf@mssdvd.com> <83a5u7g6f3.fsf@gnu.org> <87cyz38rj2.fsf@mssdvd.com> <98c6ac0f-08fd-8dd0-2213-8a482f5ac67f@gmail.com> <87msy4yl2c.fsf@mssdvd.com> <1f740d2f-ee68-7157-b6bb-d2725c9c67c3@gmail.com> <87zg24e1ei.fsf@mssdvd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13995"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65604-done@debbugs.gnu.org, Eli Zaretskii , me@eshelyaron.com To: Davide Masserut Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 03 00:47:09 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qcZOW-0003PO-HU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Sep 2023 00:47:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcZOI-0007SF-9I; Sat, 02 Sep 2023 18:46:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qcZOG-0007RR-6r for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2023 18:46:52 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qcZOF-0006jL-V5 for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2023 18:46:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qcZOP-0004pM-UQ for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2023 18:47:01 -0400 Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Sep 2023 22:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 65604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 65604@debbugs.gnu.org, jporterbugs@gmail.com, dm@mssdvd.com Original-Received: via spool by 65604-done@debbugs.gnu.org id=D65604.169369479018510 (code D ref 65604); Sat, 02 Sep 2023 22:47:01 +0000 Original-Received: (at 65604-done) by debbugs.gnu.org; 2 Sep 2023 22:46:30 +0000 Original-Received: from localhost ([127.0.0.1]:38870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcZNu-0004oU-0A for submit@debbugs.gnu.org; Sat, 02 Sep 2023 18:46:30 -0400 Original-Received: from mail-oo1-xc2b.google.com ([2607:f8b0:4864:20::c2b]:51200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcZNs-0004oH-Gu for 65604-done@debbugs.gnu.org; Sat, 02 Sep 2023 18:46:29 -0400 Original-Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-5733789a44cso164667eaf.2 for <65604-done@debbugs.gnu.org>; Sat, 02 Sep 2023 15:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693694773; x=1694299573; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=J+I9GbZGt/5Hwi1DMfm8IU2XflyBBoR3erK1EKlymr0=; b=Dd7yTCcJJn7mdeIuVKFvkhYfDp917mENh1acMPnHzFIaazOs0B9vjBz0tjS9SzwvRm fjqJu1q3crnOI7HcCnDGI3DbKncX7GVPjuC73JE2ybyH8FiPTy/gUBTxIyzcOnn+FEjD NJXexdNKKAZMSwZRl25YZAIPRtd05bVOmzvGgJpiOu6/mQh8FV2Z8PTJKdoE3ErSKaSV 2+Rv3O9ENgvuNHnexyVpWVtjkIeBnr0D9k25G6YAIENQUoAN/9v+GVg8+ZfjkyxUSuxp jf5l7RwXgqQfG+mvJ+/1OBJdbA4mRne60IrWroP4eBvJ78RPENM+I6JaNHDeKcCvHWGG ulwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693694773; x=1694299573; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=J+I9GbZGt/5Hwi1DMfm8IU2XflyBBoR3erK1EKlymr0=; b=JfDcOQIPpRJp5S4qAnc7LjnoRehmH1mUtjpH7CUF84T6B6ZbNpNfYDYYWzsiLkDgda x+lcsyrAonWlMnmHXd21bPaUoGKR+F/tM0icRngaqi2puDl5RZWvtDK4SXTOcRcAVmkC cl05geh3NC5oBi9Gh+r83S/eebLv6QiQjjEkkEr9edGvFZ+BPka2wpU80hoSePEEMzxR XxdvdxGhVf8KiyNadc/SP9p5uDyAjJGt/c4ebiuja2GulV/G3VdjULmRBHf03P3Gea+i gllhsUqOA8U+JlQcCAXRCm2M814+Lhgu8lzfbcInVQuf4Y1pBwdB1C9EeIc4RPtq63W4 RhnQ== X-Gm-Message-State: AOJu0YwpCamvlycNUBI2yLN6l4TNe0EF8eCFm9cFRwo2Oprqgq6+IdLe aN6mu/DMX/GRRc+tiSDRRV4= X-Google-Smtp-Source: AGHT+IHMsaSp4swjInex3SJkIUQCpjhoKD0UmtoZrnM43ZSglSnx9pWBWamuuOXCvF728ed1g82YlA== X-Received: by 2002:a05:6808:8f6:b0:3a7:330d:93da with SMTP id d22-20020a05680808f600b003a7330d93damr6462010oic.19.1693694772795; Sat, 02 Sep 2023 15:46:12 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id q18-20020a170902dad200b001b39ffff838sm5071280plx.25.2023.09.02.15.46.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 Sep 2023 15:46:12 -0700 (PDT) Content-Language: en-US In-Reply-To: <87zg24e1ei.fsf@mssdvd.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269062 Archived-At: Version: 30.1 On 9/2/2023 11:54 AM, Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > Jim Porter writes: > >> The prompt regexp is (thankfully) almost irrelevant in Emacs 30 >> now. It only matters for paragraph-movement commands, which we could >> probably just remap to the actual Eshell-specific commands to navigate >> forward and backward through the prompts. I should probably just make >> a patch for this and finally get rid of that regexp entirely. > > I didn't know that, thanks. I've now made it fully-obsolete, so it doesn't do anything anymore (now, Eshell implements its own paragraph navigation based on fields). > Sorry, I meant that if we decided to show a relative long message like > "Running" in the mode-line, then we should show it only when it lasts > for more than, let's say, 0.5s.  This would prevent the mode-line from > moving to right for just a fraction of a second when running fast > commands like cd or ls. Hmm, that's true. One benefit of the current mode-line implementation for Eshell is that the indicator always takes up the same width. I'll keep thinking about this. >> ... in any case, maybe the simplest way forward here is to put the >> (non-zero) exit status in the prompt like your original patch, and >> then separately, I can try to improve the customizability of the >> prompt, as well as thinking about what to do with the mode-line. > > I have updated the patch. Thanks. I rebased it on top of my changes and pushed it to master as 3d08d0dd80a. Closing this bug now.