From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: Load Custom Agenda at emacs launch Date: Fri, 17 Aug 2012 06:50:24 +0800 Message-ID: <87ehn6pi33.fsf@ericabrahamsen.net> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T28tc-0005Gx-0e for emacs-orgmode@gnu.org; Thu, 16 Aug 2012 18:50:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T28tb-0002Uw-6l for emacs-orgmode@gnu.org; Thu, 16 Aug 2012 18:50:31 -0400 Received: from plane.gmane.org ([80.91.229.3]:60313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T28tb-0002Uq-01 for emacs-orgmode@gnu.org; Thu, 16 Aug 2012 18:50:31 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T28tZ-0002eO-QK for emacs-orgmode@gnu.org; Fri, 17 Aug 2012 00:50:29 +0200 Received: from 221.216.164.102 ([221.216.164.102]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Aug 2012 00:50:29 +0200 Received: from eric by 221.216.164.102 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Aug 2012 00:50:29 +0200 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 On Fri, Aug 17 2012, Ken Mankoff wrote: > Hi, > > I find the first thing I do after launching emacs is to load my custom > agenda, bound to C-c a c. > > Is there a way I can launch this from the command-line? I know I can > run 'emacs -eval "(foo)"', but I haven't been able to determine the > function that loads my custom agenda. Does such a function exist, or > is there a way to specific the keystrokes from the command line? Hi Ken, If you look at the docstring for `org-agenda', you'll see you can call it with the prefix arg as the first argument, and the selector key as the second. Assuming you don't need a prefix argument, this should work for you: (org-agenda nil "c") Put that at the bottom of your init file (or run it as an after-init hook), and it will be the first thing you see when you start emacs. -- GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.11) of 2012-08-14 on pellet 7.8.11