From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Interactive hat. Date: Thu, 26 Mar 2009 11:29:19 +0000 Message-ID: <20090326112919.GA3358@muc.de> References: <20090323223703.GA5650@muc.de> <20090324135210.GA4657@muc.de> <20090325101650.GA1487@muc.de> <20090325105316.GB1487@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1238067025 11704 80.91.229.12 (26 Mar 2009 11:30:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Mar 2009 11:30:25 +0000 (UTC) Cc: Miles Bader , Stefan Monnier , emacs-devel@gnu.org To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 26 12:31:42 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 1Lmno8-0000Fb-7r for ged-emacs-devel@m.gmane.org; Thu, 26 Mar 2009 12:31:36 +0100 Original-Received: from localhost ([127.0.0.1]:52839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lmnml-0000tN-1X for ged-emacs-devel@m.gmane.org; Thu, 26 Mar 2009 07:30:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lmnmg-0000sK-E7 for emacs-devel@gnu.org; Thu, 26 Mar 2009 07:30:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lmnmb-0000lF-El for emacs-devel@gnu.org; Thu, 26 Mar 2009 07:30:06 -0400 Original-Received: from [199.232.76.173] (port=41285 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lmnmb-0000ks-8d for emacs-devel@gnu.org; Thu, 26 Mar 2009 07:30:01 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:2887 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lmnma-0002Iz-RM for emacs-devel@gnu.org; Thu, 26 Mar 2009 07:30:01 -0400 Original-Received: (qmail 60950 invoked by uid 3782); 26 Mar 2009 11:29:57 -0000 Original-Received: from acm.muc.de (pD9E507B2.dip.t-dialin.net [217.229.7.178]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Thu, 26 Mar 2009 12:29:56 +0100 Original-Received: (qmail 3406 invoked by uid 1000); 26 Mar 2009 11:29:19 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:109848 Archived-At: Hi again, Lennart! On Wed, Mar 25, 2009 at 12:03:08PM +0100, Lennart Borgman wrote: > Hi Alan, > On Wed, Mar 25, 2009 at 11:53 AM, Alan Mackenzie wrote: > > Agreed, except I wouldn't put it in the command loop - I'd put it in a > > hook (pre-command-hook), for the same reason font-locking is in a hook > > rather than directly in the command loop.  M-x shift-select would > > install/remove this function onto/from the hook. > We discussed this before and my conclusion was that this would not > work well enough because of the order of things in the hook would be > crucial. I suggested adding a new hook to run before pre-command-hook. > (And something similar for pos-command-hook.) I've searched the archive from a year ago, looking at your posts which contain the word "hook". You've certainly asserted that the order of functions in the pre-command-hook is important, but I don't think you gave any concrete examples of where an unfortunate ordering would mess things up. I think you were thinking of things like Viper Mode, and the use of commands like `d' (for delete) combined with, say `)' (for end of sentence). In my experience, these feelings of unease are usually justified. ;-) All the same, could you possibly construct a realistic example of two functions in pre-command-hook which work properly in one order, but foul up in the other? -- Alan Mackenzie (Nuremberg, Germany).