From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: request: make-frame-visible hook Date: Sat, 21 Feb 2009 21:59:37 +0100 Message-ID: <87tz6nwlom.fsf@kfs-lx.rd.rdm> References: <877i3ky1wn.fsf@kfs-lx.rd.rdm> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1235250043 28747 80.91.229.12 (21 Feb 2009 21:00:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Feb 2009 21:00:43 +0000 (UTC) Cc: emacs-devel@gnu.org, miles@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 21 22:01:57 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Layyy-0000Ab-96 for ged-emacs-devel@m.gmane.org; Sat, 21 Feb 2009 22:01:56 +0100 Original-Received: from localhost ([127.0.0.1]:47266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Layxd-00016x-Oq for ged-emacs-devel@m.gmane.org; Sat, 21 Feb 2009 16:00:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LayxZ-00016i-09 for emacs-devel@gnu.org; Sat, 21 Feb 2009 16:00:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LayxX-00016W-Fq for emacs-devel@gnu.org; Sat, 21 Feb 2009 16:00:28 -0500 Original-Received: from [199.232.76.173] (port=37102 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LayxX-00016T-CF for emacs-devel@gnu.org; Sat, 21 Feb 2009 16:00:27 -0500 Original-Received: from mail1-hoer.fullrate.dk ([90.185.1.42]:49284 helo=smtp.fullrate.dk) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LayxS-0004mV-C0; Sat, 21 Feb 2009 16:00:22 -0500 Original-Received: from kfs-lx.rd.rdm.cua.dk (unknown [90.184.173.152]) by smtp.fullrate.dk (Postfix) with SMTP id 536489D0A5; Sat, 21 Feb 2009 21:59:38 +0100 (CET) In-Reply-To: (Richard M. Stallman's message of "Sat, 21 Feb 2009 12:41:11 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109281 Archived-At: Richard M Stallman writes: > before-modify-buffer-hook (run before changing buffer) > after-modify-buffer-hook (run after changing buffer) > > Modification hooks already do exist. > Are they somehow inadequate? Can't remember offhand - maybe. > > before-cursor-move-hook > after-cursor-move-hook > > Text properties exist to do this. > Are they somehow inadequate? It is not appropriate for "global modes" to add text properties everywhere - that's even worse than using post-command-hook IMO. > > before-window-buffer-change-hook > after-window-buffer-change-hook > focus-window-hook > unfocus-window-hook > enter-buffer-hook > exit-buffer-hook > > What packages would want these, and what are they trying to do? I cannot say for sure. I have had various ideas over the years, but did not pursue them of lack of a simple way to hook this into existing framework. One example I recall is to properly restore window buffers after displaying the *Help* buffer - the current "suggested restore previous buffer command" falls flat on its face if you have two windows showing different portions of the same buffer - and one of the windows is taken by the *Help* buffer. Focus/unfocus window would be used to change the background color of active/inactive window. enter-buffer / exit-buffer I know I needed at some point, but I don't recall right now. -- Kim F. Storm http://www.cua.dk