From unknown Sun Jun 15 10:55:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#70610: 30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-hook): Run the hook for once Resent-From: Lin Sun Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Apr 2024 16:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70610 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 70610@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17142355841304 (code B ref -1); Sat, 27 Apr 2024 16:34:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Apr 2024 16:33:04 +0000 Received: from localhost ([127.0.0.1]:49572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0kz2-0000Ky-DB for submit@debbugs.gnu.org; Sat, 27 Apr 2024 12:33:04 -0400 Received: from lists.gnu.org ([2001:470:142::17]:40626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0kz0-0000Kb-Uu for submit@debbugs.gnu.org; Sat, 27 Apr 2024 12:33:03 -0400 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 1s0kyc-0002U3-Da for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 12:32:38 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0kya-0002lt-Us for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 12:32:38 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-571be483ccaso3758910a12.2 for ; Sat, 27 Apr 2024 09:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714235555; x=1714840355; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=DqhWzOoTbs48V7xMemELlno05SlI8ehQV0mzBBu1g80=; b=HN9EbEFMdjKMEAUEEDR6pnJNXYp7dLVYPxGs7Dksh9wVo+78i6tlmHtOMgLYIZPfCB 6hAw4Jt9cgWHmf11pJhDp8WAXPaQB148/3gXxFUk/qG7q3TvuHF9Lt894774KmX4s+O+ DsWOyBbk2O2cQEhxsWDhZDc1Li4ADab8heVxI2o1iIkT75Q3F+/wSuGAMlHroOLL+c3o N72xwVnwvktSAziaRBTzRjmxkFYVuQVuNPlVPwujIMLRoAhEajY9pUkeS4yjy7aoWBMl B00O3Hq2opVTnTJiuarzRVEL/p5042sOtbkEAwgLpEACMhUwB0+pFiD8A3C+qRRIsu/F Rkfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714235555; x=1714840355; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=DqhWzOoTbs48V7xMemELlno05SlI8ehQV0mzBBu1g80=; b=CYVhqHK3YBM/JNr0D3vIhnfFoIlijf2Nydrf4++ZfUVvifjYVUx/diyB/x8JKIV0sz 1eOA8A2zN9FBbPev64lRFifaxewofromNlBGB0+yU02UW+hMROWKsy1rQUXfXY2rWFXg AUtI2wDX8xl/4jp96MpWUAepM6vNJHUtoCs1lTHcqb+XJxd470DlKza3w75AT6b/pq2q Y80GzyJ/MAX/kw+mZuHi8wXUMWV3rvg+b8snC+M56umh7js+EqnzPmlbNMAdZGgXkpVz 2A9CAWU1dg5FtjNFHsAEOtBKeCvC+TtIvv1kEjb9DCI9K9Md80/8xIfEjTM7vDL/MGJ+ wLyQ== X-Gm-Message-State: AOJu0YwZ7GPYwQdewalVW1QcZLlwYCXPc6mka4jULlXQgoWPWflkdrg9 H4ExuK44DwjWcwtJIiNV3VlSqeCTcGQLxwSUZvGFVJiiKLj5IB4VyfrlT+xmkFODxSTFtEwm/km pwZAW0sCYkRYn+OSRIlmsuNPw000A+iYZ X-Google-Smtp-Source: AGHT+IEnE+wNb6lFopWxxJhg0eOr22+QXnSMsgQX329ykKhUT7nCq2XkIcvAloqTcFnUSa8eLrEtG9/w4nExJ6VgUGI= X-Received: by 2002:a50:9b5b:0:b0:56b:ed78:f58 with SMTP id a27-20020a509b5b000000b0056bed780f58mr3644426edj.33.1714235555082; Sat, 27 Apr 2024 09:32:35 -0700 (PDT) MIME-Version: 1.0 From: Lin Sun Date: Sat, 27 Apr 2024 16:32:24 +0000 Message-ID: Content-Type: multipart/mixed; boundary="000000000000531ae0061716914c" Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=sunlin7.mail@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) 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 (/) --000000000000531ae0061716914c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, The document of `eshell-first-time-mode-hook' says it would be run the first time eshell started. > A hook that gets run the first time =E2=80=98eshell-mode=E2=80=99 is ente= red. > That is to say, the first time during an Emacs session. But it actually runs every time for an eshell buffer(start an eshell, exit it, start an eshell again). Here is the one line code to show that: (add-hook 'eshell-first-time-mode-hook '(lambda () (message "test"))) The patch will make the `eshell-first-time-mode-hook' only run once as its document described. Please help review the patch. Thanks Best Regards Lin --000000000000531ae0061716914c Content-Type: text/x-patch; charset="US-ASCII"; name="0001-lisp-eshell-esh-mode.el-eshell-first-time-mode-hook-.patch" Content-Disposition: attachment; filename="0001-lisp-eshell-esh-mode.el-eshell-first-time-mode-hook-.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lvibkwb50 RnJvbSAwOTRiZTg0MWJmMjI2MWZiNWVmYzBjYWNkMGE0MGQzNDY5NTkwNmQ3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMaW4gU3VuIDxzdW5saW43QGhvdG1haWwuY29tPgpEYXRlOiBT YXQsIDI3IEFwciAyMDI0IDA2OjU1OjQ5ICswMDAwClN1YmplY3Q6IFtQQVRDSF0gKiBsaXNwL2Vz aGVsbC9lc2gtbW9kZS5lbCAoZXNoZWxsLWZpcnN0LXRpbWUtbW9kZS1ob29rKTogUnVuCiB0aGUg aG9vayBmb3Igb25jZQoKLS0tCiBsaXNwL2VzaGVsbC9lc2gtbW9kZS5lbCB8IDYgKysrKy0tCiAx IGZpbGUgY2hhbmdlZCwgNCBpbnNlcnRpb25zKCspLCAyIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdp dCBhL2xpc3AvZXNoZWxsL2VzaC1tb2RlLmVsIGIvbGlzcC9lc2hlbGwvZXNoLW1vZGUuZWwKaW5k ZXggYjE1Zjk5YTAzNS4uNWRlMjAwY2U0YiAxMDA2NDQKLS0tIGEvbGlzcC9lc2hlbGwvZXNoLW1v ZGUuZWwKKysrIGIvbGlzcC9lc2hlbGwvZXNoLW1vZGUuZWwKQEAgLTQxOCw4ICs0MTgsMTAgQEAg ZXNoZWxsLW1vZGUKIAogICAoYWRkLWhvb2sgJ2tpbGwtYnVmZmVyLWhvb2sgIydlc2hlbGwta2ls bC1idWZmZXItZnVuY3Rpb24gdCB0KQogCi0gIChpZiBlc2hlbGwtZmlyc3QtdGltZS1wCi0gICAg ICAocnVuLWhvb2tzICdlc2hlbGwtZmlyc3QtdGltZS1tb2RlLWhvb2spKQorICAod2hlbiBlc2hl bGwtZmlyc3QtdGltZS1wCisgICAgKHNldHEgZXNoZWxsLWZpcnN0LXRpbWUtcCBuaWwpCisgICAg KHJ1bi1ob29rcyAnZXNoZWxsLWZpcnN0LXRpbWUtbW9kZS1ob29rKSkKKwogICAocnVuLWhvb2tz ICdlc2hlbGwtcG9zdC1jb21tYW5kLWhvb2spKQogCiAocHV0ICdlc2hlbGwtbW9kZSAnbW9kZS1j bGFzcyAnc3BlY2lhbCkKLS0gCjIuMjAuNQoK --000000000000531ae0061716914c-- From unknown Sun Jun 15 10:55:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#70610: 30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-hook): Run the hook for once Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 May 2024 09:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70610 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lin Sun , Jim Porter Cc: 70610@debbugs.gnu.org Received: via spool by 70610-submit@debbugs.gnu.org id=B70610.171464103722216 (code B ref 70610); Thu, 02 May 2024 09:11:02 +0000 Received: (at 70610) by debbugs.gnu.org; 2 May 2024 09:10:37 +0000 Received: from localhost ([127.0.0.1]:42551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2SSa-0005mG-PN for submit@debbugs.gnu.org; Thu, 02 May 2024 05:10:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2SSY-0005m9-Uv for 70610@debbugs.gnu.org; Thu, 02 May 2024 05:10:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2SS4-0001Um-9j; Thu, 02 May 2024 05:10:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=vcs7tA/D97p5oOq4dC3hT8gzbA3wFWlH5ZFCsvV+LCA=; b=SI5SZBEFnyrrjyNZ0/p2 fNRRIYeG5T94OWgulq3IgH5TvoHGyHJOOwvJG/qkFWcGiELBH7kzA9dbzCsAog4WAZetQtzSHU/K9 cn3+KQqFEuQxPl/0CMZ8/E4bkt22XoNVQenq+BkLpG+61WcLEmv/1AYJEMnDxiJy+Q7R2YyXZaJ8c LykKt9Bo77uxiHU/WX7yAAiVcNMCCLahmrW+PXLK9pHKaMlvL5cQBv2e8tQMV9X7r5greKijTcoy6 pVUVpIFnsQH+YR1dE93rUHl61Cb4tWQ9uEcFPs0NgqU6FC6t1WsECoMrcDCR1Qj3foyBq45jADz+7 kfPPVNqxEyn69g==; Date: Thu, 02 May 2024 12:09:58 +0300 Message-Id: <86a5l8mvfd.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Lin Sun on Sat, 27 Apr 2024 16:32:24 +0000) References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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: -3.3 (---) > From: Lin Sun > Date: Sat, 27 Apr 2024 16:32:24 +0000 > > The document of `eshell-first-time-mode-hook' says it would be run the > first time eshell started. > > A hook that gets run the first time ‘eshell-mode’ is entered. > > That is to say, the first time during an Emacs session. > > But it actually runs every time for an eshell buffer(start an eshell, > exit it, start an eshell again). > Here is the one line code to show that: > (add-hook 'eshell-first-time-mode-hook '(lambda () (message "test"))) > > The patch will make the `eshell-first-time-mode-hook' only run once as > its document described. > > Please help review the patch. Thanks > > Best Regards > Lin > > From 094be841bf2261fb5efc0cacd0a40d34695906d7 Mon Sep 17 00:00:00 2001 > From: Lin Sun > Date: Sat, 27 Apr 2024 06:55:49 +0000 > Subject: [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-hook): Run > the hook for once > > --- > lisp/eshell/esh-mode.el | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el > index b15f99a035..5de200ce4b 100644 > --- a/lisp/eshell/esh-mode.el > +++ b/lisp/eshell/esh-mode.el > @@ -418,8 +418,10 @@ eshell-mode > > (add-hook 'kill-buffer-hook #'eshell-kill-buffer-function t t) > > - (if eshell-first-time-p > - (run-hooks 'eshell-first-time-mode-hook)) > + (when eshell-first-time-p > + (setq eshell-first-time-p nil) > + (run-hooks 'eshell-first-time-mode-hook)) > + > (run-hooks 'eshell-post-command-hook)) > > (put 'eshell-mode 'mode-class 'special) > -- > 2.20.5 Jim, any comments on this change proposal? From unknown Sun Jun 15 10:55:35 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Lin Sun Subject: bug#70610: closed (Re: bug#70610: 30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-hook): Run the hook for once) Message-ID: References: <136a2db9-e459-160b-e3d8-aaef6f877a99@gmail.com> X-Gnu-PR-Message: they-closed 70610 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 70610@debbugs.gnu.org Date: Fri, 03 May 2024 03:17:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1714706222-10461-1" This is a multi-part message in MIME format... ------------=_1714706222-10461-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #70610: 30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-= hook): Run the hook for once which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 70610@debbugs.gnu.org. --=20 70610: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D70610 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1714706222-10461-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 70610-done) by debbugs.gnu.org; 3 May 2024 03:16:18 +0000 Received: from localhost ([127.0.0.1]:46069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2jPF-0002iC-DR for submit@debbugs.gnu.org; Thu, 02 May 2024 23:16:18 -0400 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]:55721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2jP9-0002i2-93 for 70610-done@debbugs.gnu.org; Thu, 02 May 2024 23:16:15 -0400 Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-6ea2ac4607aso4362545a34.3 for <70610-done@debbugs.gnu.org>; Thu, 02 May 2024 20:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714706143; x=1715310943; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=Shh+mDEFP/K39WP3F7TwY1uIxQmBoQNm511TkWyvjGc=; b=iPKakQxMhAQxZLt9ELA1q5wTu/HPJD9hqCq/yTM1tp4WDe34FrPsZjsqycPNtEqIxV 8bzHAd88ANKURN7KY1fYt5S27e1NMCGJe0CHHzRJxNG5Rw/koGYbJN9z4psbsuM8rCsL 4UU/pIxv+g4MIaZD/NU9d8lNT8D3EqI4NSRJ93xi29zLmrP9l/6Y76qswlNdUR3sFo3g oKghG9uNBp9cOsqlgHHFWddWq0wu2HQbx3qmm9JEwLOy+G/b9HI5eCMhvIyZmOkxdiTD WX+e7WcSm1HmpS/Srv2X4oph9zyDiTzFNhqrgTTxvI5Ag98AIV1t/Wm69q8Fiof0QifJ SEWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714706143; x=1715310943; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Shh+mDEFP/K39WP3F7TwY1uIxQmBoQNm511TkWyvjGc=; b=NYAUwz4X5YGuUfO3ZkcCB8CZGWMp46r8o+67FXtd1rQJQe9fwaTVbBhM3mTUZVJjlX IBkUfJ7jrS8J26r5QbDiylliUisJewZ7G5lS4WhcguBwHyyyfPInNjaBMkk669jE643p YXKWJnyT/pt+u6YrBNOf9aawDcRkVFx+lOQm8CvhyCml7Sej9bx2ehssNF0Vncz4sYEZ ClqahLb5BpL+J4V/0o5V+ayG9PekV/iYTR/z5EDmv5pC/qXQsw/wbgO6rV0x12bGp5fe 1o6kauixQx4oFBo3/933lZpKxQyPurQ8aB/z155mTpyWb2o6f34z3zYlbS1NzBo9KENK YnGw== X-Gm-Message-State: AOJu0YzO1cBQkPCjIynvkOTJ3LZjH2oe6PYF+4Vtol4tNI8UmmDyP4tU Dt1kR6j1Lu1bIXYqNU43BwxvNHHtdax1HbVcB8Xca56QB6VApfpP X-Google-Smtp-Source: AGHT+IHR4UyhTbvQYAZZD8lsTOdVTKEmu5XEvtM7Yb5R63bsEXPPyY7qTibF3I9msY6UjuOQjGmVcQ== X-Received: by 2002:a05:6871:60c:b0:22e:d572:271b with SMTP id w12-20020a056871060c00b0022ed572271bmr1833072oan.58.1714706143318; Thu, 02 May 2024 20:15:43 -0700 (PDT) Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id w17-20020a639351000000b0061cf79eab38sm357081pgm.37.2024.05.02.20.15.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 May 2024 20:15:42 -0700 (PDT) Message-ID: <136a2db9-e459-160b-e3d8-aaef6f877a99@gmail.com> Date: Thu, 2 May 2024 20:15:42 -0700 MIME-Version: 1.0 Subject: Re: bug#70610: 30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-hook): Run the hook for once To: Eli Zaretskii , Lin Sun References: <86a5l8mvfd.fsf@gnu.org> Content-Language: en-US From: Jim Porter In-Reply-To: <86a5l8mvfd.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70610-done Cc: 70610-done@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: -1.0 (-) On 5/2/2024 2:09 AM, Eli Zaretskii wrote: >> From: Lin Sun >> Date: Sat, 27 Apr 2024 16:32:24 +0000 >> >> The document of `eshell-first-time-mode-hook' says it would be run the >> first time eshell started. >>> A hook that gets run the first time ‘eshell-mode’ is entered. >>> That is to say, the first time during an Emacs session. >> >> But it actually runs every time for an eshell buffer(start an eshell, >> exit it, start an eshell again). [snip] > Jim, any comments on this change proposal? Thanks for the patch, Lin Sun. This looks good, so I've merged it to the master branch as a2ccda71c15. Closing this bug now. ------------=_1714706222-10461-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Apr 2024 16:33:04 +0000 Received: from localhost ([127.0.0.1]:49572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0kz2-0000Ky-DB for submit@debbugs.gnu.org; Sat, 27 Apr 2024 12:33:04 -0400 Received: from lists.gnu.org ([2001:470:142::17]:40626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0kz0-0000Kb-Uu for submit@debbugs.gnu.org; Sat, 27 Apr 2024 12:33:03 -0400 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 1s0kyc-0002U3-Da for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 12:32:38 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0kya-0002lt-Us for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 12:32:38 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-571be483ccaso3758910a12.2 for ; Sat, 27 Apr 2024 09:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714235555; x=1714840355; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=DqhWzOoTbs48V7xMemELlno05SlI8ehQV0mzBBu1g80=; b=HN9EbEFMdjKMEAUEEDR6pnJNXYp7dLVYPxGs7Dksh9wVo+78i6tlmHtOMgLYIZPfCB 6hAw4Jt9cgWHmf11pJhDp8WAXPaQB148/3gXxFUk/qG7q3TvuHF9Lt894774KmX4s+O+ DsWOyBbk2O2cQEhxsWDhZDc1Li4ADab8heVxI2o1iIkT75Q3F+/wSuGAMlHroOLL+c3o N72xwVnwvktSAziaRBTzRjmxkFYVuQVuNPlVPwujIMLRoAhEajY9pUkeS4yjy7aoWBMl B00O3Hq2opVTnTJiuarzRVEL/p5042sOtbkEAwgLpEACMhUwB0+pFiD8A3C+qRRIsu/F Rkfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714235555; x=1714840355; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=DqhWzOoTbs48V7xMemELlno05SlI8ehQV0mzBBu1g80=; b=CYVhqHK3YBM/JNr0D3vIhnfFoIlijf2Nydrf4++ZfUVvifjYVUx/diyB/x8JKIV0sz 1eOA8A2zN9FBbPev64lRFifaxewofromNlBGB0+yU02UW+hMROWKsy1rQUXfXY2rWFXg AUtI2wDX8xl/4jp96MpWUAepM6vNJHUtoCs1lTHcqb+XJxd470DlKza3w75AT6b/pq2q Y80GzyJ/MAX/kw+mZuHi8wXUMWV3rvg+b8snC+M56umh7js+EqnzPmlbNMAdZGgXkpVz 2A9CAWU1dg5FtjNFHsAEOtBKeCvC+TtIvv1kEjb9DCI9K9Md80/8xIfEjTM7vDL/MGJ+ wLyQ== X-Gm-Message-State: AOJu0YwZ7GPYwQdewalVW1QcZLlwYCXPc6mka4jULlXQgoWPWflkdrg9 H4ExuK44DwjWcwtJIiNV3VlSqeCTcGQLxwSUZvGFVJiiKLj5IB4VyfrlT+xmkFODxSTFtEwm/km pwZAW0sCYkRYn+OSRIlmsuNPw000A+iYZ X-Google-Smtp-Source: AGHT+IEnE+wNb6lFopWxxJhg0eOr22+QXnSMsgQX329ykKhUT7nCq2XkIcvAloqTcFnUSa8eLrEtG9/w4nExJ6VgUGI= X-Received: by 2002:a50:9b5b:0:b0:56b:ed78:f58 with SMTP id a27-20020a509b5b000000b0056bed780f58mr3644426edj.33.1714235555082; Sat, 27 Apr 2024 09:32:35 -0700 (PDT) MIME-Version: 1.0 From: Lin Sun Date: Sat, 27 Apr 2024 16:32:24 +0000 Message-ID: Subject: 30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-hook): Run the hook for once To: bug-gnu-emacs@gnu.org Content-Type: multipart/mixed; boundary="000000000000531ae0061716914c" Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=sunlin7.mail@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.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: -0.0 (/) --000000000000531ae0061716914c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, The document of `eshell-first-time-mode-hook' says it would be run the first time eshell started. > A hook that gets run the first time =E2=80=98eshell-mode=E2=80=99 is ente= red. > That is to say, the first time during an Emacs session. But it actually runs every time for an eshell buffer(start an eshell, exit it, start an eshell again). Here is the one line code to show that: (add-hook 'eshell-first-time-mode-hook '(lambda () (message "test"))) The patch will make the `eshell-first-time-mode-hook' only run once as its document described. Please help review the patch. Thanks Best Regards Lin --000000000000531ae0061716914c Content-Type: text/x-patch; charset="US-ASCII"; name="0001-lisp-eshell-esh-mode.el-eshell-first-time-mode-hook-.patch" Content-Disposition: attachment; filename="0001-lisp-eshell-esh-mode.el-eshell-first-time-mode-hook-.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lvibkwb50 RnJvbSAwOTRiZTg0MWJmMjI2MWZiNWVmYzBjYWNkMGE0MGQzNDY5NTkwNmQ3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMaW4gU3VuIDxzdW5saW43QGhvdG1haWwuY29tPgpEYXRlOiBT YXQsIDI3IEFwciAyMDI0IDA2OjU1OjQ5ICswMDAwClN1YmplY3Q6IFtQQVRDSF0gKiBsaXNwL2Vz aGVsbC9lc2gtbW9kZS5lbCAoZXNoZWxsLWZpcnN0LXRpbWUtbW9kZS1ob29rKTogUnVuCiB0aGUg aG9vayBmb3Igb25jZQoKLS0tCiBsaXNwL2VzaGVsbC9lc2gtbW9kZS5lbCB8IDYgKysrKy0tCiAx IGZpbGUgY2hhbmdlZCwgNCBpbnNlcnRpb25zKCspLCAyIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdp dCBhL2xpc3AvZXNoZWxsL2VzaC1tb2RlLmVsIGIvbGlzcC9lc2hlbGwvZXNoLW1vZGUuZWwKaW5k ZXggYjE1Zjk5YTAzNS4uNWRlMjAwY2U0YiAxMDA2NDQKLS0tIGEvbGlzcC9lc2hlbGwvZXNoLW1v ZGUuZWwKKysrIGIvbGlzcC9lc2hlbGwvZXNoLW1vZGUuZWwKQEAgLTQxOCw4ICs0MTgsMTAgQEAg ZXNoZWxsLW1vZGUKIAogICAoYWRkLWhvb2sgJ2tpbGwtYnVmZmVyLWhvb2sgIydlc2hlbGwta2ls bC1idWZmZXItZnVuY3Rpb24gdCB0KQogCi0gIChpZiBlc2hlbGwtZmlyc3QtdGltZS1wCi0gICAg ICAocnVuLWhvb2tzICdlc2hlbGwtZmlyc3QtdGltZS1tb2RlLWhvb2spKQorICAod2hlbiBlc2hl bGwtZmlyc3QtdGltZS1wCisgICAgKHNldHEgZXNoZWxsLWZpcnN0LXRpbWUtcCBuaWwpCisgICAg KHJ1bi1ob29rcyAnZXNoZWxsLWZpcnN0LXRpbWUtbW9kZS1ob29rKSkKKwogICAocnVuLWhvb2tz ICdlc2hlbGwtcG9zdC1jb21tYW5kLWhvb2spKQogCiAocHV0ICdlc2hlbGwtbW9kZSAnbW9kZS1j bGFzcyAnc3BlY2lhbCkKLS0gCjIuMjAuNQoK --000000000000531ae0061716914c-- ------------=_1714706222-10461-1-- From unknown Sun Jun 15 10:55:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#70610: 30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-hook): Run the hook for once Resent-From: Lin Sun Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 May 2024 03:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70610 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Jim Porter Cc: Eli Zaretskii , 70610-done@debbugs.gnu.org Received: via spool by 70610-done@debbugs.gnu.org id=D70610.171470859412667 (code D ref 70610); Fri, 03 May 2024 03:57:02 +0000 Received: (at 70610-done) by debbugs.gnu.org; 3 May 2024 03:56:34 +0000 Received: from localhost ([127.0.0.1]:46093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2k2E-0003IF-3l for submit@debbugs.gnu.org; Thu, 02 May 2024 23:56:34 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:57345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2k2A-0003I3-9B for 70610-done@debbugs.gnu.org; Thu, 02 May 2024 23:56:32 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-51f99f9e0faso115064e87.2 for <70610-done@debbugs.gnu.org>; Thu, 02 May 2024 20:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714708562; x=1715313362; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=sThTZOwL8yG77IpgorWlqkyfMnpAamZhKvyMuFZE2Ng=; b=LaKH8ab5DYxDlNReOdoJK42itcqGnhT0R7woXBE73tPIII0IJt2TTlXjNyUcloyC1a 4FDhKLq2jzg7Q0zvChWApFqure7R0Z/heLNfPVAjkQFEeL6EdXRZLIkZrRYS4t5RCjsi eumW+CTiOdPuLoMSeChkjApPF9zB/11XK/EKEcHXCGIgSl1yjmi9BirfKJnuYvqv57r8 UR9/nphV2wON/j2aPt7RTSbYWS8xyozcKv0zvduHmakMbgASkCkAor4sFUdR7XdKr53w zbKfi0DrNnW7/PstFpj2p0tu4BZ2uktAE4Ip4yeUis3Dt08ldbgYXCuHdUHwJuD+e8IB 3aSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714708562; x=1715313362; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sThTZOwL8yG77IpgorWlqkyfMnpAamZhKvyMuFZE2Ng=; b=Vchd7JqDtG88dNw9i1aR0JaguErF4XXWr4bVmP1M6YhH3LwKGu1OGzw2Xn7Tjwx/OF d/yyfkWtPmjKzaZtgmsFXJtKgzDN+c8JS5sumFGokbXlHsNgH/lpohcZsx05n5BAtvTn hHbF9CFBGI4efNm1WZ4PPiz3XA7jHLykv8c3E73uIEq4bWDT7XlqLcfJIfLlwN5oPZCX +wSuq8BetqheDNuAQESE01hYDXHdcLocXV6XL7KxJdHRRKPeWTnEE09zDi7gObuBrt8v cq50oJU5owleuYLrWO+M1QdvR0rl/PPMwc6QSSk4nt5KM9w7Z1Oce++vXdIQZ+WfB68G DLOg== X-Forwarded-Encrypted: i=1; AJvYcCVpNQDixQsZZJyoj9p2fw5HJz9HwNs6/DaP2WuP1N4YJhfRKmdkGLIkfF7Zqalgy//NOPL1fUD8U6VrfOq1mSxdl9cZsbbagyWUwQ== X-Gm-Message-State: AOJu0YxQIOB37TJRQRJQXLZ8XVV9lnAU9HL5s471JLA4GqTfgtyU2mQg W+i1STsPT1PIRYejLBFxNGaIHbSMoATq7lpT52VVVF1VGDyqCnALqyUgHPPrwDqJ7MK+KVVq2Ei USdOTsiK8t2VaywW8llB8+6VEVl8= X-Google-Smtp-Source: AGHT+IEPCV24XhHZNZW7txUGf+OzQLD761QGidRKRhOsYyI9oO2gJyD9ZaS8TnJX/pplD4zKrxjAzza6Jlo9x0s6B1U= X-Received: by 2002:ac2:5e78:0:b0:518:a9bf:73ec with SMTP id a24-20020ac25e78000000b00518a9bf73ecmr931593lfr.35.1714708561725; Thu, 02 May 2024 20:56:01 -0700 (PDT) MIME-Version: 1.0 References: <86a5l8mvfd.fsf@gnu.org> <136a2db9-e459-160b-e3d8-aaef6f877a99@gmail.com> In-Reply-To: <136a2db9-e459-160b-e3d8-aaef6f877a99@gmail.com> From: Lin Sun Date: Fri, 3 May 2024 03:55:50 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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.0 (-) On Fri, May 3, 2024 at 3:15=E2=80=AFAM Jim Porter w= rote: > > On 5/2/2024 2:09 AM, Eli Zaretskii wrote: > >> From: Lin Sun > >> Date: Sat, 27 Apr 2024 16:32:24 +0000 > >> > >> The document of `eshell-first-time-mode-hook' says it would be run the > >> first time eshell started. > >>> A hook that gets run the first time =E2=80=98eshell-mode=E2=80=99 is = entered. > >>> That is to say, the first time during an Emacs session. > >> > >> But it actually runs every time for an eshell buffer(start an eshell, > >> exit it, start an eshell again). > [snip] > > Jim, any comments on this change proposal? > > Thanks for the patch, Lin Sun. This looks good, so I've merged it to the > master branch as a2ccda71c15. Closing this bug now. Great! Thank you so much!