From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: heads up: mode hooks not executed for agenda files Date: Mon, 14 Jan 2013 09:00:37 +1030 Message-ID: <87hamkbtrm.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuW3y-0002qY-MU for emacs-orgmode@gnu.org; Sun, 13 Jan 2013 17:30:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuW3w-0002Ub-Lo for emacs-orgmode@gnu.org; Sun, 13 Jan 2013 17:29:58 -0500 Received: from ch1ehsobe001.messaging.microsoft.com ([216.32.181.181]:41776 helo=ch1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuW3w-0002R7-H4 for emacs-orgmode@gnu.org; Sun, 13 Jan 2013 17:29:56 -0500 Received: from mail64-ch1 (localhost [127.0.0.1]) by mail64-ch1-R.bigfish.com (Postfix) with ESMTP id 6ED384201F2 for ; Sun, 13 Jan 2013 22:29:54 +0000 (UTC) Received: from CH1EHSMHS041.bigfish.com (snatpool2.int.messaging.microsoft.com [10.43.68.239]) by mail64-ch1.bigfish.com (Postfix) with ESMTP id 237412006B for ; Sun, 13 Jan 2013 22:29:52 +0000 (UTC) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello, a problem I have had for a long time is that agenda files are opened without =org-mode-hook= and =text-mode-hook= being processed. This is a problem because I work within the agenda view all the time, writing notes by accessing entries from the agenda view. If I open an org file directly, both hooks are executed just fine. However, if I hit =RET= on an agenda view line, I get put into the org file, at the correct point, but without those hooks having been executed. This means that the behaviour is different depending on how I ended up in the org file. This is confusing! The solution is to add the same processing to =org-agenda-after-show-hook= as is included in =text-mode=hook= and =org-mode=hook=. This works. However, it seems clumsy to me. I just thought I'd highlight this as it took me a while to understand why Emacs was doing things differently in org files depending on how I got to them. Bastien: enjoy your two week break and don't you dare read this email before then! ;-) Thanks, eric -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3a-808-gf94d81