emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] using org-global-properties in capture templates


From: Xebar Saram
Subject: Re: [O] using org-global-properties in capture templates
Date: Sun, 3 Dec 2017 14:53:43 +0200

Hi

thank you Adrian so so much, i hugely appreciate this!

this works perfectly now, thx for pointing me in the right direction

have a great week!

Z

On Sun, Dec 3, 2017 at 3:28 AM, Adrian Bradd <address@hidden> wrote:
Hello,

It looks like you have one too many parenthesis around the Rating entry. org-global properties is supposed to be a list of cons cells. The below should work:

#+BEGIN_SRC elisp

(setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese Asian Chinese Israeli Italian American EastEuro Mexican French Persian Austrian Greek Fusion")))
(add-to-list 'org-global-properties '("Rating_ALL". "- 1 2 3 4 5"))
#+END_SRC

Below is a version that worked for me with all three properties. I declare the properties all in one list instead of adding them.

#+BEGIN_SRC elisp
(setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese Asian Chinese Israeli Italian American EastEuro Mexican French Persian Austrian Greek Fusion") ("Effort_ALL" . "0 0:10 0:20 0:30 1:00 2:00 3:00 4:00 6:00 8:00") ("Rating_ALL" . "- 1 2 3 4 5")))

 (setq org-capture-templates
  '(("f" "Food"
    entry
    (file+headline  "~/tmp/tmp.org" "Inbox")
    "* COOK %^{Recipe Name}    
    :PROPERTIES:
    :ID: %(org-id-uuid)
    :Time: %^{minutes|-|10|15|30|60}
    :Effort: %^{Effort}p
    :Rating: %^{Rating}p
    :Cuisine: %^{Cuisine}p
    :END:
    "
    "Capture Template for food recipe")))
#+END_SRC

HTH,

Adrian

On 22 November 2017 at 04:52, Xebar Saram <address@hidden> wrote:
Hi all

sorry to nudge but after spending alot of time on this , googling etc cant seem to get it to work. any help, tips or pointing me in the right direction would really be appreciated!

Z

On Sat, Nov 4, 2017 at 5:31 PM, Xebar Saram <address@hidden> wrote:
sorry to bother again but still stuck with this....

i tried to add another org-global-property entry (i assume thats possible) but then i didnt get completion for the second one.
this is what i used

(setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese Asian Chinese Israeli Italian American EastEuro Mexican French Persian Austrian Greek Fusion")))
(add-to-list 'org-global-properties '(("Rating_ALL". "- 1 2 3 4 5")))

can anyone point me to the correct syntax for adding additional org-global-properties?

thx alot in advance

Z


On Sat, Oct 28, 2017 at 9:44 PM, Xebar Saram <address@hidden> wrote:
thx so much

that works well. i tried to add another org-global-property entry (i assume thats possible) but then i didnt get completion for the second one.
this is what i used

(setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese Asian Chinese Israeli Italian American EastEuro Mexican French Persian Austrian Greek Fusion")))
(add-to-list 'org-global-properties '(("Rating_ALL". "- 1 2 3 4 5")))

i assume my syntax is wrong?

thx!

Z

On Sat, Oct 28, 2017 at 12:37 PM, Nicolas Goaziou <address@hidden> wrote:
Hello,

Xebar Saram <address@hidden> writes:

> ;; Effort and global properties
> (setq org-global-properties '(("Effort_ALL". "0 0:10 0:20 0:30 1:00 2:00
> 3:00 4:00 6:00 8:00")))
>
>
>
> (add-to-list 'org-capture-templates
> '("f" "Food"
> entry
> (file+headline (lambda () (concat pmm "/org/files/agenda/food.org"))
> "Inbox")
> "* COOK %^{Recipe Name}
> :PROPERTIES:
> :ID: %(org-id-uuid)
> :Effort_ALL: %^{Effort_ALL}p
> :END:
> "
> "Capture Template for food recipe"
> ))

"XYZ_ALL" is a special property defining allowed values for "XYZ". In
you case, you will get completion for "Effort" with:

  :Effort: %^{Effort}p


Regards,

--
Nicolas Goaziou






reply via email to

[Prev in Thread] Current Thread [Next in Thread]