|
From: | Lennart Borgman (gmail) |
Subject: | Re: How to get asynchronous notifications from Emacs ? |
Date: | Mon, 26 Feb 2007 17:42:47 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 |
Matthew Flaschen wrote:
David Soulayrol wrote:Le Sun, 25 Feb 2007 09:16:33 -0500, Matthew Flaschen a écrit:David Soulayrol wrote:Hello, I'm looking for a way to obtain asynchronous notifications of emacs actions, like: buffer was closed, displayed buffer has changed, and so on.Emacs has hooks for many actions. For example, kill-buffer-hook is run when a buffer is closed. Run C-h f on kill-buffer-hook and add-hook, and C-h v on after-change-functions. See also http://www.delorie.com/gnu/docs/elisp-manual-21/elisp_540.html and http://www.gnu.org/software/emacs/manual/html_node/Hooks.html .I knew the principles in Emacs, but thanks a lot for this introduction. So I assume you are not aware of a tool which could be the companion of gnuserv for my needs ? I'll try to write this down.I'm afraid I don't know what gnuserv is. I use regular emacsclient, and am fairly new to emacs in general. What exactly do you want to do? I.E. what's your end goal?But it doesn't have a kitchen sink.Patience.
Well, if you want to communicate with the kitchen sink you can not do that (at least not in both directions) with emacsclient (or gnuclient, which is similar in spirit). Emacsclient will only send commands to Emacs, it does not take command from Emacs.
What you should do is write a program that can talk and listen on standard output resp input. That program can then be run as an inferior process (Emacs parlang, a subprocess) in a buffer.
Take a look for example at "shell" command in Emacs for example code. This way you do not have to buy an Emacs aware kitchen sink.
[Prev in Thread] | Current Thread | [Next in Thread] |