all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* shell-command-sentinel hook?
@ 2024-03-04 18:00 Christopher Howard
  2024-03-04 20:08 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Howard @ 2024-03-04 18:00 UTC (permalink / raw)
  To: Emacs Devel

Hi, I was just wondering if it would be difficult/problematic to patch simple.el to provide some kind of hook so that, when async shell commands complete, users can run arbitrary elisp? I imagine this would get inserted at the end of shell-command-sentinel...?

I've been getting in the habit lately of moving my activities out of Gnome console and instead running shell commands with async-shell-command. But something I miss is that Gnome console will send a notification at the end of the command which is very visible on the desktop. This can be reproduced in Emacs by adding " && notify-send \"some message\"" onto the end of the command. This works, and could be wrapped in various ways, but it would be nice if the exit code was passed on as well to the callback. I imagine other people would come up with various other creative uses of the hook, especially if we also passed in the command string to the callback.

Am running GNU Emacs 29.1.

-- 
📛 Christopher Howard
🚀 gemini://gem.librehacker.com
🌐 http://gem.librehacker.com

בראשית ברא אלהים את השמים ואת הארץ



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-06 16:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-03-06  4:30     ` Suhail Singh
2024-03-06 16:39       ` Christopher Howard

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.