[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shell-command-sentinel hook?
From: |
Christopher Howard |
Subject: |
Re: shell-command-sentinel hook? |
Date: |
Mon, 4 Mar 2024 11:35:53 -0900 |
On Mon, Mar 04, 2024 at 10:08:12PM +0200, Eli Zaretskii wrote:
> Why cannot you simply override shell-command-sentinel with your own
> function?
Hi, I think I might end up doing that on my install. But, as an emacs-devel
proposal, I thought it would be more useful in-general to have it available in
an actual hook. (Hooks are great!) Since I cannot simply wrap
shell-command-sentinel (it does not return the message and signal) my overide
would need to reproduce the initial part of the function...
``` elisp
(when (memq (process-status process) '(exit signal))
(shell-command-set-point-after-cmd (process-buffer process))
...etc...
```
That might break in the next emacs release if you guys change any of those
functions (memq, shell-command-set-point-after-cmd, etc.) or if you guys
replace the sentinel with something else.
--
Christopher Howard