From: Christopher Howard <christopher@librehacker.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: shell-command-sentinel hook?
Date: Mon, 4 Mar 2024 11:35:53 -0900 [thread overview]
Message-ID: <ZeYwqZ2T2OnNhvuY@theoden> (raw)
In-Reply-To: <868r2xn4k3.fsf@gnu.org>
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
next prev parent reply other threads:[~2024-03-04 20:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 18:00 shell-command-sentinel hook? Christopher Howard
2024-03-04 20:08 ` Eli Zaretskii
2024-03-04 20:35 ` Christopher Howard [this message]
2024-03-06 4:30 ` Suhail Singh
2024-03-06 16:39 ` Christopher Howard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZeYwqZ2T2OnNhvuY@theoden \
--to=christopher@librehacker.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).