From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: org-mode and mode hooks. Date: Mon, 30 May 2005 11:52:15 -0500 (CDT) Message-ID: <200505301652.j4UGqFC15110@raven.dms.auburn.edu> References: <87y8a3mnz8.fsf@xs4all.nl> <87ll63weye.fsf-monnier+emacs@gnu.org> <200505252135.j4PLZvt26969@raven.dms.auburn.edu> <87hdgrufcl.fsf-monnier+emacs@gnu.org> <200505260359.j4Q3xbj28809@raven.dms.auburn.edu> <87is16rsid.fsf-monnier+emacs@gnu.org> <200505261501.j4QF17h00246@raven.dms.auburn.edu> <87psveq60w.fsf-monnier+emacs@gnu.org> <200505271717.j4RHHGD07067@raven.dms.auburn.edu> <200505290157.j4T1vus10117@raven.dms.auburn.edu> <200505300250.j4U2o5013572@raven.dms.auburn.edu> <200505301531.j4UFVLp15012@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1117471953 8842 80.91.229.2 (30 May 2005 16:52:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 May 2005 16:52:33 +0000 (UTC) Cc: Lute.Kamstra.lists@xs4all.nl, dominik@science.uva.nl, mmaug@yahoo.com, rms@gnu.org, monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 30 18:52:23 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DcnU1-0000pU-5p for ged-emacs-devel@m.gmane.org; Mon, 30 May 2005 18:51:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DcnYv-0001Ni-QC for ged-emacs-devel@m.gmane.org; Mon, 30 May 2005 12:56:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DcnYV-0001Ly-Sq for emacs-devel@gnu.org; Mon, 30 May 2005 12:56:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DcnYV-0001LZ-6p for emacs-devel@gnu.org; Mon, 30 May 2005 12:55:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DcnYU-0001LL-TG for emacs-devel@gnu.org; Mon, 30 May 2005 12:55:59 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DcnX0-0007dj-4z; Mon, 30 May 2005 12:54:26 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j4UGqmCK025048; Mon, 30 May 2005 11:52:48 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j4UGqFC15110; Mon, 30 May 2005 11:52:15 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org In-reply-to: <200505301531.j4UFVLp15012@raven.dms.auburn.edu> (message from Luc Teirlinck on Mon, 30 May 2005 10:31:21 -0500 (CDT)) 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:37895 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37895 >>From my previous message: unless I somehow can recognize whether we are running from a timer or process. (I can not immediately think of way to do that. Is there away?) To answer my own question, I guess that checking whether `this-command' is nil should work reliably enough. No, too many functions can reset it. I guess that `this-original-command' could _potentially_ be better. However, apparently, it does not get reset to nil when this-command gets reset to nil (why not?), making it useless for the purpose. If real_this_command would be exported to Lisp, it would probably be ideal, assuming there is no other reliable way to check whether code is being run from a timer or asynchronous process. Sincerely, Luc.