From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tommy Kelly Subject: Re: Custom agenda -- running functions, not just setting vars Date: Wed, 9 Nov 2011 13:19:09 +0000 Message-ID: References: <87y5vpebfz.fsf@norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:53472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RO84L-0003dN-5W for emacs-orgmode@gnu.org; Wed, 09 Nov 2011 08:20:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RO84G-0004wd-Tp for emacs-orgmode@gnu.org; Wed, 09 Nov 2011 08:19:57 -0500 Received: from cather.verilab.com ([64.20.234.125]:38106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RO84G-0004wS-LY for emacs-orgmode@gnu.org; Wed, 09 Nov 2011 08:19:52 -0500 Received: from mail-yw0-f43.google.com (mail-yw0-f43.google.com [209.85.213.43]) by cather.verilab.com (Postfix) with ESMTPS id 2F9AA1CC9ED for ; Wed, 9 Nov 2011 13:19:51 +0000 (UTC) Received: by ywp17 with SMTP id 17so2096358ywp.2 for ; Wed, 09 Nov 2011 05:19:50 -0800 (PST) In-Reply-To: <87y5vpebfz.fsf@norang.ca> 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: Bernt Hansen Cc: emacs-orgmode@gnu.org Excellent, that works. Thanks. Tommy On Wed, Nov 9, 2011 at 12:18 PM, Bernt Hansen wrote: > Tommy Kelly writes: > >> I'm trying to set up a custom agenda view such that when I enter my >> agenda I get, automatically: >> >> - daily view mode (for today) >> - log file mode on >> - grid on >> - Follow mode on >> >> I can see from the docs how to modify the various variables that >> control some of how agendas look. But the above are controlled by >> functions and I'm not sure how to have those invoked when I open an >> agenda. >> >> I've been messing with org-mode-agenda-hook and >> org-agenda-after-show-hook, but I clearly don't know what I'm doing. >> >> Any ideas? >> >> thanks, >> Tommy > > Something like this: > > (setq org-agenda-custom-commands > =C2=A0 =C2=A0 =C2=A0(quote (( "x" "Test Agenda" agenda "" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((org-agenda-start= -with-follow-mode t) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (org-agenda-span = 'day) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (org-agenda-start= -with-log-mode t)))))) > > but it doesn't handle the grid - I have that on by default by setting > > (setq org-agenda-time-grid (quote ((daily today remove-match) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #("----------------" 0 16 (or= g-heading t)) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (830 1000 1200 1300 1500 1700= )))) > > which you can probably add to the above agenda definition but I didn't > bother. =C2=A0If there are no items to display on the agenda there is a b= ug > where the grid is not shown but otherwise I think this works. > > Regards, > Bernt > --=20 Tommy Kelly +1 (512) 289-8262 http://www.verilab.com