From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francis Moreau Newsgroups: gmane.emacs.help Subject: Re: hook for buffer creation Date: Sat, 20 Mar 2010 11:45:41 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3e29dfc2-5604-47d4-84e1-db2e113f84a5@e7g2000yqf.googlegroups.com> References: <4ba1562a$0$274$14726298@news.sunsite.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1272996072 30502 80.91.229.12 (4 May 2010 18:01:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 May 2010 18:01:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 04 20:01:11 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1O9MQg-0007B7-9r for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 20:01:10 +0200 Original-Received: from localhost ([127.0.0.1]:58437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9MQf-0005zF-Fw for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 14:01:09 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!e7g2000yqf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 17 Original-NNTP-Posting-Host: 82.235.205.153 Original-X-Trace: posting.google.com 1269110742 32040 127.0.0.1 (20 Mar 2010 18:45:42 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 20 Mar 2010 18:45:42 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e7g2000yqf.googlegroups.com; posting-host=82.235.205.153; posting-account=ekTE0goAAADiVCThPmo4ph0C5bTUhQOx User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.18) Gecko/2010020220 Firefox/3.0.18,gzip(gfe),gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:177515 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:73013 Archived-At: Hello, On 17 mar, 23:24, "Colin S. Miller" wrote: > > You could use =A0 buffer-list-changed-hook. =A0It's called whenever > a frame has its buffers modified. You'd need to call (window-list) on > that frame, and then get the buffer for each window. Then check if that > buffer has yet to be processed by your hook > > If you want only the text-editing buffers, regardless of the major mode, > then putting a defadvice on fundamental-mode (it doesn't have a hook), > should work. IIRC, all text-edting modes are derived from fundamental-mod= e, > and its hooks/init function are called. That's a good hint, thanks.