Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add-hook for eshell-exit-hook causes eshell to not write history out. #66

Open
natemoseman opened this issue Jan 2, 2020 · 1 comment

Comments

@natemoseman
Copy link

natemoseman commented Jan 2, 2020

There was a bug filed for spacemacs. I think that shell-pop-el is the source of the problem.
syl20bnr/spacemacs#8538

In shell-pop.el in the function shell-pop--set-exit-action it checks if the shell is eshell or not. If it is a eshell then it runs the add-hook function:

(add-hook 'eshell-exit-hook 'shell-pop--kill-and-delete-window nil t)

I think this causes eshell to exit before history gets written out. Changing the 'nil' to 't' appends the hook so the history gets saved.

(add-hook 'eshell-exit-hook 'shell-pop--kill-and-delete-window t t)

I am not a elisp programmer so I don't know if this is a 100% correct solution, but it works for me.

@asok
Copy link

asok commented May 17, 2022

I can confirm that changing nil to t helps in this matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants