emacs-devel
[Top][All Lists]
Advanced

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

shell-command-sentinel hook?


From: Christopher Howard
Subject: shell-command-sentinel hook?
Date: Mon, 4 Mar 2024 09:00:11 -0900

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

讘专讗砖讬转 讘专讗 讗诇讛讬诐 讗转 讛砖诪讬诐 讜讗转 讛讗专抓



reply via email to

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