emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Load Custom Agenda at emacs launch
@ 2012-08-16 21:59 Ken Mankoff
  2012-08-16 22:45 ` Nick Dokos
  2012-08-16 22:50 ` Eric Abrahamsen
  0 siblings, 2 replies; 6+ messages in thread
From: Ken Mankoff @ 2012-08-16 21:59 UTC (permalink / raw)
  To: emacs-orgmode

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?

Thanks,

  -k.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Load Custom Agenda at emacs launch
  2012-08-16 21:59 Load Custom Agenda at emacs launch Ken Mankoff
@ 2012-08-16 22:45 ` Nick Dokos
  2012-08-16 22:50 ` Eric Abrahamsen
  1 sibling, 0 replies; 6+ messages in thread
From: Nick Dokos @ 2012-08-16 22:45 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: emacs-orgmode

Ken Mankoff <mankoff@gmail.com> 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?
> 

Untested:

emacs --eval '(org-agenda nil "c" nil)'

or add

(org-agenda nil "c" nil)

at the bottom of your .emacs file.

Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Load Custom Agenda at emacs launch
  2012-08-16 21:59 Load Custom Agenda at emacs launch Ken Mankoff
  2012-08-16 22:45 ` Nick Dokos
@ 2012-08-16 22:50 ` Eric Abrahamsen
  2012-08-17  0:53   ` Ken Mankoff
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Abrahamsen @ 2012-08-16 22:50 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Load Custom Agenda at emacs launch
  2012-08-16 22:50 ` Eric Abrahamsen
@ 2012-08-17  0:53   ` Ken Mankoff
  2012-08-17  3:25     ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: Ken Mankoff @ 2012-08-17  0:53 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

Hi Eric,

On Thu, Aug 16, 2012 at 3:50 PM, Eric Abrahamsen
<eric@ericabrahamsen.net> wrote:
> 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.
>

That works fairly well. I'm doing the CLI --eval version because I
often launch emacs w/o wanting to enter org mode. But I get a screen
with 90% org and 10% *scratch* buffer... Again, some searching and
trying to call the "kill-buffer" function, and I haven't figured it
out. Any hints on how to get full-terminal agenda mode? Sorry if these
are newbie questions.

   -k.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Load Custom Agenda at emacs launch
  2012-08-17  0:53   ` Ken Mankoff
@ 2012-08-17  3:25     ` Nick Dokos
  2012-08-17  5:47       ` Ken Mankoff
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2012-08-17  3:25 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: Eric Abrahamsen, emacs-orgmode

Ken Mankoff <mankoff@gmail.com> wrote:

> Hi Eric,
> 
> On Thu, Aug 16, 2012 at 3:50 PM, Eric Abrahamsen
> <eric@ericabrahamsen.net> wrote:
> > 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.
> >
> 
> That works fairly well. I'm doing the CLI --eval version because I
> often launch emacs w/o wanting to enter org mode. But I get a screen
> with 90% org and 10% *scratch* buffer... Again, some searching and
> trying to call the "kill-buffer" function, and I haven't figured it
> out. Any hints on how to get full-terminal agenda mode? Sorry if these
> are newbie questions.
> 

Try

emacs -q -l /path/to/minimal/org.el\
       --eval '(progn (setq org-agenda-window-setup (quote current-window)) (org-agenda nil "c" nil))'

Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Load Custom Agenda at emacs launch
  2012-08-17  3:25     ` Nick Dokos
@ 2012-08-17  5:47       ` Ken Mankoff
  0 siblings, 0 replies; 6+ messages in thread
From: Ken Mankoff @ 2012-08-17  5:47 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Eric Abrahamsen, emacs-orgmode

On Thu, Aug 16, 2012 at 8:25 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
>
> Try
>
> emacs -q -l /path/to/minimal/org.el\
>        --eval '(progn (setq org-agenda-window-setup (quote current-window)) (org-agenda nil "c" nil))'
>
> Nick

Works perfectly! Thank you.

  -k.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-17  5:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-16 21:59 Load Custom Agenda at emacs launch Ken Mankoff
2012-08-16 22:45 ` Nick Dokos
2012-08-16 22:50 ` Eric Abrahamsen
2012-08-17  0:53   ` Ken Mankoff
2012-08-17  3:25     ` Nick Dokos
2012-08-17  5:47       ` Ken Mankoff

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).