From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tassilo Horn Subject: Re: Problems with org-mode-hook when files are opened by org-agenda-list Date: Thu, 12 Mar 2009 17:02:30 +0100 Message-ID: <87hc1yohk9.fsf@thinkpad.tsdh.de> References: <87ocw7p4pq.fsf@thinkpad.tsdh.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LhnMg-00015l-RX for emacs-orgmode@gnu.org; Thu, 12 Mar 2009 12:02:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LhnMf-00014m-SC for emacs-orgmode@gnu.org; Thu, 12 Mar 2009 12:02:34 -0400 Received: from [199.232.76.173] (port=37161 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhnMf-00014J-2H for emacs-orgmode@gnu.org; Thu, 12 Mar 2009 12:02:33 -0400 Received: from deliver.uni-koblenz.de ([141.26.64.15]:8270) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LhnMe-0006bb-Fp for emacs-orgmode@gnu.org; Thu, 12 Mar 2009 12:02:32 -0400 In-Reply-To: (Carsten Dominik's message of "Thu, 12 Mar 2009 09:31:53 +0100") 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: Carsten Dominik Cc: emacs-orgmode@gnu.org Carsten Dominik writes: >> --8<---------------cut here---------------start------------->8--- >> (defun th-org-update-agenda-file (&optional force) >> (interactive) >> (save-excursion >> (save-window-excursion >> (let ((file "/tmp/org-agenda.txt")) >> (org-agenda-list) >> (org-write-agenda file))))) >> >> (th-org-update-agenda-file t) >> >> (add-hook 'org-mode-hook 'th-org-mode-init) >> --8<---------------cut here---------------end--------------->8--- > > I think you need to swap the last two lines. Gosh! That's really too stupit. Sometimes I'm really more than routine-blinded... Thanks a lot Carsten! Tassilo