emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* question about date-tree
@ 2010-07-19 12:10 Emin.shopper Martinian.shopper
  2010-07-19 21:46 ` Eric S Fraga
  0 siblings, 1 reply; 6+ messages in thread
From: Emin.shopper Martinian.shopper @ 2010-07-19 12:10 UTC (permalink / raw)
  To: emacs-orgmode

Dear Experts,

I really like the date-tree feature of org-remember and use it to plan
my daily agenda. Often I want to plan things in the future and fill
out an entry for a couple of weeks hence. It's slightly annoying to
try to remember the day of week and date so that it will match the
date-tree format.

Is there a function/utility/suggestion for prepopulating a month's
worth of date-tree daily nodes?

Thanks,
-Emin

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

* Re: question about date-tree
  2010-07-19 12:10 question about date-tree Emin.shopper Martinian.shopper
@ 2010-07-19 21:46 ` Eric S Fraga
  2010-07-20  1:09   ` org capture: use org-default-notes-file StephenL
  2010-07-20 14:27   ` question about date-tree Carsten Dominik
  0 siblings, 2 replies; 6+ messages in thread
From: Eric S Fraga @ 2010-07-19 21:46 UTC (permalink / raw)
  To: Emin.shopper Martinian.shopper; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]

On Mon, 19 Jul 2010 08:10:49 -0400, "Emin.shopper Martinian.shopper" <emin.shopper@gmail.com> wrote:
> 
> Dear Experts,
> 
> I really like the date-tree feature of org-remember and use it to plan
> my daily agenda. Often I want to plan things in the future and fill
> out an entry for a couple of weeks hence. It's slightly annoying to
> try to remember the day of week and date so that it will match the
> date-tree format.
> 
> Is there a function/utility/suggestion for prepopulating a month's
> worth of date-tree daily nodes?
> 
> Thanks,
> -Emin
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

I know this doesn't actually answer your question but what I do is
simply bring up the agenda view and then insert an entry in the right
day using "i d".  This will create a date-tree entry if you've set the
right variable, specifically org-agenda-diary-file to point to the
date-tree file.

However, I also would like org-capture to handle this situation...
for instance, I would sometimes like todo entries that I define with
org-capture to be placed in a date tree structure for either of the
scheduled or deadline dates that todo entry is initially defined with.

[-- Attachment #2: Type: text/plain, Size: 75 bytes --]

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* org capture: use org-default-notes-file
  2010-07-19 21:46 ` Eric S Fraga
@ 2010-07-20  1:09   ` StephenL
  2010-07-20  7:27     ` Carsten Dominik
  2010-07-20 14:27   ` question about date-tree Carsten Dominik
  1 sibling, 1 reply; 6+ messages in thread
From: StephenL @ 2010-07-20  1:09 UTC (permalink / raw)
  To: emacs-org

Using the latest and greatest 7.01...

Is it possible to use the variable org-default-notes-file in the org capture settings?

I have a lot of org capture templates and I would rather set the file in one location then have to set it for each template. I would think it is possible with the org-default-notes-file, but no matter how I try to use it in the template it doesn't work. I get errors such as expecting stringp.

See below. I would like to do something similar to the todo entry and not the note entry where I need to explicitly specify the file.

Thanks for any help.

Stephen


;;; Org Capture
(setq org-default-notes-file (concat org-directory "/refile.org"))
     (define-key global-map (kbd "C-c c") 'org-capture)

(setq org-capture-templates 
  '(("t" "todo" entry (file+headline org-default-notes-file "ToDo") "* TODO %?\n  %U\n ")
    ("n" "note" entry (file+headline "/Users/stephen/Dropbox/org/refile.org" "Notes") "* %?\n  %U\n ")
                                     ))

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

* Re: org capture: use org-default-notes-file
  2010-07-20  1:09   ` org capture: use org-default-notes-file StephenL
@ 2010-07-20  7:27     ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2010-07-20  7:27 UTC (permalink / raw)
  To: StephenL; +Cc: emacs-org


On Jul 20, 2010, at 3:09 AM, StephenL wrote:

> Using the latest and greatest 7.01...
>
> Is it possible to use the variable org-default-notes-file in the org  
> capture settings?
>
> I have a lot of org capture templates and I would rather set the  
> file in one location then have to set it for each template. I would  
> think it is possible with the org-default-notes-file, but no matter  
> how I try to use it in the template it doesn't work. I get errors  
> such as expecting stringp.
>
> See below. I would like to do something similar to the todo entry  
> and not the note entry where I need to explicitly specify the file.

This should now work.  If the file is either nil (not recommended
because then the customize interface does not work) or the empty string,
org-default-notes-file will be used instead.

- Carsten

>
> Thanks for any help.
>
> Stephen
>
>
> ;;; Org Capture
> (setq org-default-notes-file (concat org-directory "/refile.org"))
>     (define-key global-map (kbd "C-c c") 'org-capture)
>
> (setq org-capture-templates
>  '(("t" "todo" entry (file+headline org-default-notes-file "ToDo")  
> "* TODO %?\n  %U\n ")
>    ("n" "note" entry (file+headline "/Users/stephen/Dropbox/org/ 
> refile.org" "Notes") "* %?\n  %U\n ")
>                                     ))
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: question about date-tree
  2010-07-19 21:46 ` Eric S Fraga
  2010-07-20  1:09   ` org capture: use org-default-notes-file StephenL
@ 2010-07-20 14:27   ` Carsten Dominik
  2010-07-25 17:33     ` Emin.shopper Martinian.shopper
  1 sibling, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2010-07-20 14:27 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Emin.shopper Martinian.shopper, emacs-orgmode


On Jul 19, 2010, at 11:46 PM, Eric S Fraga wrote:

> On Mon, 19 Jul 2010 08:10:49 -0400, "Emin.shopper Martinian.shopper"  
> <emin.shopper@gmail.com> wrote:
>>
>> Dear Experts,
>>
>> I really like the date-tree feature of org-remember and use it to  
>> plan
>> my daily agenda. Often I want to plan things in the future and fill
>> out an entry for a couple of weeks hence. It's slightly annoying to
>> try to remember the day of week and date so that it will match the
>> date-tree format.

>>
>> Is there a function/utility/suggestion for prepopulating a month's
>> worth of date-tree daily nodes?
>>
>> Thanks,
>> -Emin
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> I know this doesn't actually answer your question but what I do is
> simply bring up the agenda view and then insert an entry in the right
> day using "i d".  This will create a date-tree entry if you've set the
> right variable, specifically org-agenda-diary-file to point to the
> date-tree file.


Well,

this is hard because org-capture places the entry *before* you
get a chance to set those dates.

- Carsten

>
> However, I also would like org-capture to handle this situation...
> for instance, I would sometimes like todo entries that I define with
> org-capture to be placed in a date tree structure for either of the
> scheduled or deadline dates that todo entry is initially defined with.
> -- 
> Eric S Fraga
> GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: question about date-tree
  2010-07-20 14:27   ` question about date-tree Carsten Dominik
@ 2010-07-25 17:33     ` Emin.shopper Martinian.shopper
  0 siblings, 0 replies; 6+ messages in thread
From: Emin.shopper Martinian.shopper @ 2010-07-25 17:33 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Below is an elisp function which does the required work. I now call
this function at the beginning of the month so my journal.org file is
pre-populated to make it easier for me to set future todos. You can
also call it for any future month/year combination you want. Feel free
to add it to orgmode or just let people who want it add to their own
system manually.

Thanks again for orgmode!

;;;;; Elisp code follows:

(defun create-dates-for-month-and-year (month year)
  "Create entries in date-tree format in current buffer.

 This function creates nodes for all days in given the given MONTH and YEAR
 in the current buffer (if they do not exist already).

"
  (let ((day 1)
	(max-days (if (= 2 month)
			(if (date-leap-year-p year) 29 28)
		      (nth month
			   (list nil 31 28 31 30 31 30 31 31 30 31 30 31))))
	)
    (while (<= day max-days)
      (org-datetree-find-date-create (list month day year))
      (setq day (+ 1 day))
      )
    )
  )


On Tue, Jul 20, 2010 at 10:27 AM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
>
> On Jul 19, 2010, at 11:46 PM, Eric S Fraga wrote:
>
>> On Mon, 19 Jul 2010 08:10:49 -0400, "Emin.shopper Martinian.shopper"
>> <emin.shopper@gmail.com> wrote:
>>>
>>> Dear Experts,
>>>
>>> I really like the date-tree feature of org-remember and use it to plan
>>> my daily agenda. Often I want to plan things in the future and fill
>>> out an entry for a couple of weeks hence. It's slightly annoying to
>>> try to remember the day of week and date so that it will match the
>>> date-tree format.
>
>>>
>>> Is there a function/utility/suggestion for prepopulating a month's
>>> worth of date-tree daily nodes?
>>>
>>> Thanks,
>>> -Emin
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> I know this doesn't actually answer your question but what I do is
>> simply bring up the agenda view and then insert an entry in the right
>> day using "i d".  This will create a date-tree entry if you've set the
>> right variable, specifically org-agenda-diary-file to point to the
>> date-tree file.
>
>
> Well,
>
> this is hard because org-capture places the entry *before* you
> get a chance to set those dates.
>
> - Carsten
>
>>
>> However, I also would like org-capture to handle this situation...
>> for instance, I would sometimes like todo entries that I define with
>> org-capture to be placed in a date tree structure for either of the
>> scheduled or deadline dates that todo entry is initially defined with.
>> --
>> Eric S Fraga
>> GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten
>
>
>
>

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

end of thread, other threads:[~2010-07-25 17:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-19 12:10 question about date-tree Emin.shopper Martinian.shopper
2010-07-19 21:46 ` Eric S Fraga
2010-07-20  1:09   ` org capture: use org-default-notes-file StephenL
2010-07-20  7:27     ` Carsten Dominik
2010-07-20 14:27   ` question about date-tree Carsten Dominik
2010-07-25 17:33     ` Emin.shopper Martinian.shopper

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