emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Can I use an already defined agenda view in another agenda command?
@ 2014-01-21 10:49 Martin Beck
  2014-03-12  9:57 ` M
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Beck @ 2014-01-21 10:49 UTC (permalink / raw)
  To: emacs-orgmode

Is there a way to first create an agenda command with basic settings and
then reuse and extend those settings in another agenda?

Example:
first create a weekly agenda "overview-10d", which can be invoked e. g. with
C-c a a, that shows all deadlines for the next 10 days

then create another agenda "overview-today" which loads the same settings
like "all items", but only shows the deadlines until today.

Goals: 
- Later changes in overview-10d will also be used in "overview-today".
- "Standard settings" can be defined once and then used in different other
agendas.

Kind regards

Martin

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

* Can I use an already defined agenda view in another agenda command?
  2014-01-21 10:49 Can I use an already defined agenda view in another agenda command? Martin Beck
@ 2014-03-12  9:57 ` M
  0 siblings, 0 replies; 5+ messages in thread
From: M @ 2014-03-12  9:57 UTC (permalink / raw)
  To: emacs orgmode-mailinglist

Hi,

Is there a way to first create an agenda command with basic settings and
then reuse and extend those settings in another agenda?

Example:
first create a weekly agenda "overview-10d", which can be invoked e. g. with
C-c a a, that shows all deadlines for the next 10 days

then create another agenda "overview-today" which loads the same settings
like "all items", but only shows the deadlines until today.

Goals: 
- Later changes in overview-10d will also be used in "overview-today".
- "Standard settings" can be defined once and then used in different other
agendas.

Kind regards

Martin

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

* Re: Can I use an already defined agenda view in another agenda command?
       [not found] <87r467xxdq.fsf@bzg.ath.cx>
@ 2014-03-15 16:12 ` M
  2014-03-17  1:27   ` Bastien
  2014-03-17 19:37   ` Matt Lundin
  0 siblings, 2 replies; 5+ messages in thread
From: M @ 2014-03-15 16:12 UTC (permalink / raw)
  To: emacs orgmode-mailinglist; +Cc: Bastien

Salut Bastien,

thanks a lot - that helps a little, however this will only work temporarily
and already for the next "r" refresh, the combined agendas are not there any
more, just one, if I am not mistaken.

My question was more targeting in the direction if it could be possible to
define one basic setup once and then create some different "flavors" of it
without duplicating the configuration code to have a consistent setup...

Example: 
I'm having a block agenda which I use during my daily work and which shows
me the deadlines of today, the appointments of today and the tasks scheduled
today (and those overdue).

That's fine for the day, but for my daily planning I do once in the morning
it would be nice to use that same setup, but also see deadlines which are e.
g. 10 days in the future and the scheduled tasks which will come up the next
day(s).

So my idea was: i can define the basic setup once, and then "cite" it and
extend it for other agenda setups.

Kind regards

Martin 




> Von: Bastien <bzg@gnu.org>
> Datum: Wed, 12 Mar 2014 16:14:09 +0100
> An: M <Elwood151@web.de>
> Betreff: Re: Can I use an already defined agenda view in another agenda
> command?
> 
> M <Elwood151@web.de> writes:
> 
>> Is there a way to first create an agenda command with basic settings and
>> then reuse and extend those settings in another agenda?
> 
> You can concatenate agenda views in the same *Org Agenda* buffer.
> 
> First load your first view, then hit `A' in the agenda buffer to
> load another view.
> 
> HTH,
> 
> -- 
>  Bastien

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

* Re: Can I use an already defined agenda view in another agenda command?
  2014-03-15 16:12 ` M
@ 2014-03-17  1:27   ` Bastien
  2014-03-17 19:37   ` Matt Lundin
  1 sibling, 0 replies; 5+ messages in thread
From: Bastien @ 2014-03-17  1:27 UTC (permalink / raw)
  To: M; +Cc: emacs orgmode-mailinglist

Hi,

M <Elwood151@web.de> writes:

> So my idea was: i can define the basic setup once, and then "cite" it and
> extend it for other agenda setups.

this is not currently possible, but from experience, it is not really
needed: it's faster to configure several *simple* agenda views and to
call each of them when needed.

Best,

-- 
 Bastien

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

* Re: Can I use an already defined agenda view in another agenda command?
  2014-03-15 16:12 ` M
  2014-03-17  1:27   ` Bastien
@ 2014-03-17 19:37   ` Matt Lundin
  1 sibling, 0 replies; 5+ messages in thread
From: Matt Lundin @ 2014-03-17 19:37 UTC (permalink / raw)
  To: M; +Cc: Bastien, emacs orgmode-mailinglist

M <Elwood151@web.de> writes:

> Salut Bastien,
>
> thanks a lot - that helps a little, however this will only work temporarily
> and already for the next "r" refresh, the combined agendas are not there any
> more, just one, if I am not mistaken.
>
> My question was more targeting in the direction if it could be possible to
> define one basic setup once and then create some different "flavors" of it
> without duplicating the configuration code to have a consistent setup...
>
> Example: 
> I'm having a block agenda which I use during my daily work and which shows
> me the deadlines of today, the appointments of today and the tasks scheduled
> today (and those overdue).
>
> That's fine for the day, but for my daily planning I do once in the morning
> it would be nice to use that same setup, but also see deadlines which are e.
> g. 10 days in the future and the scheduled tasks which will come up the next
> day(s).
>
> So my idea was: i can define the basic setup once, and then "cite" it and
> extend it for other agenda setups.

Here's an example of how something like this could be done:

--8<---------------cut here---------------start------------->8---
(defmacro my-agenda (days)
  `(list 'agenda ""
	 (list (list 'org-deadline-warning-days ,days))))

(setq my-next-actions
      '("n" "All next actions" todo "TODO|NOW|NEXT"
	((org-agenda-todo-ignore-scheduled 'future)
	 (org-agenda-todo-ignore-deadlines 'far)
	 (org-agenda-dim-blocked-tasks t))))

(setq my-projects
      '("q" "Projects" todo "PROJECT"
	((org-agenda-todo-ignore-deadlines t)
	 (org-agenda-prefix-format " %i %-12:c%l"))))

(setq org-agenda-custom-commands
      `(,my-next-actions
	,my-projects
	("k" "Combined"
	 (,(cddr my-next-actions)
	  ,(cddr my-projects)))
	("d" "Short deadlines"
	 (,(my-agenda 1)))
	("D" "Long deadlines"
	 (,(my-agenda 21)))))
--8<---------------cut here---------------end--------------->8---

Matt

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

end of thread, other threads:[~2014-03-17 19:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-21 10:49 Can I use an already defined agenda view in another agenda command? Martin Beck
2014-03-12  9:57 ` M
     [not found] <87r467xxdq.fsf@bzg.ath.cx>
2014-03-15 16:12 ` M
2014-03-17  1:27   ` Bastien
2014-03-17 19:37   ` Matt Lundin

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).