emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70610: closed (30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-fi


From: GNU bug Tracking System
Subject: bug#70610: closed (30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-hook): Run the hook for once)
Date: Fri, 03 May 2024 03:17:02 +0000

Your message dated Thu, 2 May 2024 20:15:42 -0700
with message-id <136a2db9-e459-160b-e3d8-aaef6f877a99@gmail.com>
and subject line Re: bug#70610: 30.0.50; [PATCH] * lisp/eshell/esh-mode.el 
(eshell-first-time-mode-hook): Run the hook for once
has caused the debbugs.gnu.org bug report #70610,
regarding 30.0.50; [PATCH] * lisp/eshell/esh-mode.el 
(eshell-first-time-mode-hook): Run the hook for once
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
70610: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70610
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-hook): Run the hook for once Date: Sat, 27 Apr 2024 16:32:24 +0000
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 ‘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

Attachment: 0001-lisp-eshell-esh-mode.el-eshell-first-time-mode-hook-.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#70610: 30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-hook): Run the hook for once Date: Thu, 2 May 2024 20:15:42 -0700
On 5/2/2024 2:09 AM, Eli Zaretskii wrote:
From: Lin Sun <sunlin7.mail@gmail.com>
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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]