From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Capture mode seems to be easily confused in Emacs 22 Date: Thu, 24 Jun 2010 14:46:55 +0200 Message-ID: References: <87hbktusex.fsf@gollum.intra.norang.ca> <31117.1277346983@gamaville.dokosmarshall.org> <877hlpw3z1.fsf@gollum.intra.norang.ca> <8739wdw3ry.fsf@gollum.intra.norang.ca> <87iq59rvbl.fsf@gollum.intra.norang.ca> <7B4C4C9B-AC4E-46AE-BC77-AE914BB73FB1@gmail.com> <87tyosobuw.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=59929 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORlpe-0007hb-0f for emacs-orgmode@gnu.org; Thu, 24 Jun 2010 08:47:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORlpc-0005WW-Kl for emacs-orgmode@gnu.org; Thu, 24 Jun 2010 08:47:01 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:46960) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORlpc-0005WF-Gh for emacs-orgmode@gnu.org; Thu, 24 Jun 2010 08:47:00 -0400 Received: by wyb39 with SMTP id 39so613927wyb.0 for ; Thu, 24 Jun 2010 05:46:59 -0700 (PDT) In-Reply-To: <87tyosobuw.fsf@gollum.intra.norang.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernt Hansen Cc: Org Mode On Jun 24, 2010, at 2:26 PM, Bernt Hansen wrote: > Carsten Dominik writes: > >> On Jun 24, 2010, at 4:57 AM, Bernt Hansen wrote: >> >>> In my Emacs 22 on Debian >>> >>> GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of >>> 2008-11-09 >>> on raven, modified by Debian >>> >>> if I start a capture buffer with C-c c t and then immediately try to >>> file it with C-c C-c (with the point still on the heading) it >>> prompts >>> for tags instead of filing. This seems to work fine in Emacs 23. >>> >>> In Emacs 22 I end up in the CAPTURE-refile.org buffer with the >>> overlay >>> on line 1 stating to use C-c C-c to file and C-c C-k to abort but >>> these >>> keys no longer work. Widening the buffer and using C-c C-c on >>> the #+STARTUP line refreshes the config and makes it possible to >>> continue. >> > >> this is strange, and also a sign that org-capture-mode is not active >> in that buffer. My preliminary test show that it works here under >> emacs 22. >> >> Anything suspicious in *Messages* ? > > The toggling capture mode off message look suspicious. > > ,---- > | Loading /home/bernt/git/org-mode/lisp/org-capture.el (source)...done > | Template key: > | Loading tabify...done > | Clipboard pasted as level 1 subtree > | Toggling org-capture-mode off; better pass an explicit argument. > | Clock starts at [2010-06-24 Thu 08:24] - showing entire task time. > `---- Hi Bernt, I suspect that you use (org-capture-mode) in one of your hook function, in order to check if the mode is on. However, this is a function call, and it will TOGGLE the mode, so you are turning it off. Just remove the parenthesis, to test the *variable* (if org-capture-mode ......... If you want to protect yourself from running this hook before org- capture is is loaded and org-capture-mode defined, you can do (if (and (boundp 'org-capture-mode) org-capture-mode ...... I am willing to bet that this is the problem you are experiencing. :-) Cheers - Carsten