From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Case Newsgroups: gmane.emacs.help Subject: What do 'hooks' do and how do they do it? Date: Sat, 01 Aug 2009 17:17:22 +0000 Message-ID: <1249147043.2246.18.camel@CASE> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1249147130 22452 80.91.229.12 (1 Aug 2009 17:18:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Aug 2009 17:18:50 +0000 (UTC) To: Emacs Help List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 01 19:18:44 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MXIEF-0005aI-2A for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Aug 2009 19:18:43 +0200 Original-Received: from localhost ([127.0.0.1]:34445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXIEE-0001GO-Bn for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Aug 2009 13:18:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXIDp-0001Fn-6V for help-gnu-emacs@gnu.org; Sat, 01 Aug 2009 13:18:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXIDk-0001Dv-Ou for help-gnu-emacs@gnu.org; Sat, 01 Aug 2009 13:18:16 -0400 Original-Received: from [199.232.76.173] (port=55723 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXIDk-0001Ds-Ii for help-gnu-emacs@gnu.org; Sat, 01 Aug 2009 13:18:12 -0400 Original-Received: from smtp105.rog.mail.re2.yahoo.com ([206.190.36.83]:28084) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MXIDk-0000P7-9V for help-gnu-emacs@gnu.org; Sat, 01 Aug 2009 13:18:12 -0400 Original-Received: (qmail 92769 invoked from network); 1 Aug 2009 17:18:11 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Subject:From:To:Content-Type:Date:Message-Id:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=6Yaa7a6HvYCQJDmMe61Qlx+iUNz31XmU/Co1oetRrEyiaFH1cWmQV4XP6rQDpePdmc3RZ5glmemdoTRfyWlc2TJrduVhwdrxjqYV5DL6sVyycVKGs30O0ZESTs4G4vhLG+hQz4sT3BFWPgyieHSqCDKyF8YaTqOX9NNbnsA3vF4= ; Original-Received: from unknown (HELO ?192.168.1.3?) (billlinux@99.245.242.191 with plain) by smtp105.rog.mail.re2.yahoo.com with SMTP; 1 Aug 2009 17:18:11 -0000 X-YMail-OSG: JVXUBVQVM1nsMAKBknEkCVIww743ztUv4Yb4tKjBZOLyGAKhSRCK3bycMMm8su5nOQ-- X-Yahoo-Newman-Property: ymail-3 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66626 Archived-At: Hi; This is not an urgent question, it is more in the way of a request for an explanation by anyone who has the time and inclination to do a little teaching. I know at a high level what a 'hook' is and how to use it an elisp statement. And, I have seen hooks used in other programs like SELinux. But I am curious about what is going on at the kernel level with a 'hook'. If someone can give me a brief overview in relatively plain language, I would appreciate it. e.g. some of the kind of questions that spring to mind. Is it a process that is added to the task structure waiting to be called? How is it woken up? And what kind of events might wake it? etc. As I said, an overview would be helpful. If there is some detail that I want clarified, I can dig deeper once I have a general idea of what is going on. -- Regards Bill Fedora 11, Gnome 2.26.3 Evo.2.26.3, Emacs 22.3.1