emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org capture with predefined entries from a list?
@ 2010-09-11  7:37 Miguel Ruiz
  2010-09-13 16:58 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Miguel Ruiz @ 2010-09-11  7:37 UTC (permalink / raw)
  To: emacs-orgmode

Hi

Might I implement an org capture template with predefined entries from a list instead of typing the final entry?

If not, please, whats the minimal code to get a shortkey to launch a selection of an item of a list and insert in the buffer?

Thank you. My questions has always been well treated in this list. I am learning a lot with all the people here.

Miguel.




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

* Re: Org capture with predefined entries from a list?
  2010-09-11  7:37 Org capture with predefined entries from a list? Miguel Ruiz
@ 2010-09-13 16:58 ` Nicolas Goaziou
  2010-09-13 19:57   ` Miguel Ruiz
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2010-09-13 16:58 UTC (permalink / raw)
  To: Miguel Ruiz; +Cc: emacs-orgmode

Hello,

>>>>> Miguel Ruiz writes:

> Might I implement an org capture template with predefined entries
> from a list instead of typing the final entry?

> If not, please, whats the minimal code to get a shortkey to launch a
> selection of an item of a list and insert in the buffer?

I am not sure to understand what you are trying to accomplish. Could
you provide an example about it?

Regards,

-- Nicolas

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

* Re: Org capture with predefined entries from a list?
  2010-09-13 16:58 ` Nicolas Goaziou
@ 2010-09-13 19:57   ` Miguel Ruiz
  2010-09-21 23:00     ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Miguel Ruiz @ 2010-09-13 19:57 UTC (permalink / raw)
  To: emacs-orgmode

Thank you for your interest.

First: org.el 7/9/2010, org-capture.el 2/9/2010

Contents of .emacs:

(...)
(setq org-capture-templates
      '(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks")
             "* TODO %?\n  %i\n  %a")
        ("j" "Journal" entry (file+datetree "~/org/journal.org")
             "* %?\nEntered on %U\n  %i\n  %a")))
(...)

So, let's start:

1. In any buffer: M-x org-capture
2. Appears a menu saying "Select a capture template". Of course, two options [t] and [j], and [C] Customize org-capture-templates and [q] Abort.
3. I press [t] and get a "capture buffer" with "* TODO" inserted, ready to accept more info
4. C-c C-c finish and save the entry in ~/org/gtd.org

Ok. That's what I would like:

1. In any buffer: M-x org-capture
2. Appears a menu saying "Select a capture template". Of course, two options [t] and [j], and [C] Customize org-capture-templates and [q] Abort.
3. I press [t] and get a "capture buffer" with "* TODO" inserted, ready to accept my entry
4. Appears another menu saying "Select task type or whatever": several options: [1] Task1 [2] Task2 [3] Task3 ...
5. I press [1] and  "capture buffer" updates with "* TODO Task1" inserted, ready to accept more info
6. Ideally appears another menu saying "Select comment or whatever": several options: [1] Comment1 [2] Comment2 [3] Comment3 ...
7. I press [1] and  "capture buffer" updates with "* TODO Task1 Comment1" inserted, ready to accept more info
8. Ideally steps 6 and 7 would be repeated (well, no more than 4 or 5 times)
4. C-c C-c finish and save the entry in ~/org/gtd.org


In the original post I said that if not possible, I would be happy with a shortkey launching a buffer showing the options of step 4, then I would select one of them and it would inserted after "* TODO"

I hope now it is more clear.

Miguel





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

* Re: Org capture with predefined entries from a list?
  2010-09-13 19:57   ` Miguel Ruiz
@ 2010-09-21 23:00     ` Bastien
  2010-09-22  5:26       ` Miguel Ruiz
  0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2010-09-21 23:00 UTC (permalink / raw)
  To: Miguel Ruiz; +Cc: emacs-orgmode

Hi Miguel,

Miguel Ruiz <rbenit68@yahoo.es> writes:

> 1. In any buffer: M-x org-capture
> 2. Appears a menu saying "Select a capture template". Of course, two options [t] and [j], and [C] Customize org-capture-templates and [q] Abort.
> 3. I press [t] and get a "capture buffer" with "* TODO" inserted, ready to accept my entry
> 4. Appears another menu saying "Select task type or whatever": several options: [1] Task1 [2] Task2 [3] Task3 ...
> 5. I press [1] and  "capture buffer" updates with "* TODO Task1" inserted, ready to accept more info
> 6. Ideally appears another menu saying "Select comment or whatever": several options: [1] Comment1 [2] Comment2 [3] Comment3 ...
> 7. I press [1] and  "capture buffer" updates with "* TODO Task1 Comment1" inserted, ready to accept more info
> 8. Ideally steps 6 and 7 would be repeated (well, no more than 4 or 5 times)
> 4. C-c C-c finish and save the entry in ~/org/gtd.org

Do you really want capturing a task to be such a heavy task?!

You should explore using multiple keys for the capture template
definition -- see the manual:

  http://orgmode.org/manual/Template-elements.html#Template-elements

HTH,

-- 
 Bastien

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

* Re: Org capture with predefined entries from a list?
  2010-09-21 23:00     ` Bastien
@ 2010-09-22  5:26       ` Miguel Ruiz
  2010-09-22  7:13         ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Miguel Ruiz @ 2010-09-22  5:26 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: bastien.guerry



--- El mié, 22/9/10, Bastien <bastien.guerry@wikimedia.fr> escribió:

> De: Bastien <bastien.guerry@wikimedia.fr>
> Asunto: Re: [Orgmode] Org capture with predefined entries from a list?
> Para: "Miguel Ruiz" <rbenit68@yahoo.es>
> CC: emacs-orgmode@gnu.org
> Fecha: miércoles, 22 de septiembre, 2010 01:00
> Hi Miguel,
> 
> Miguel Ruiz <rbenit68@yahoo.es>
> writes:
> 
> > 1. In any buffer: M-x org-capture
> > 2. Appears a menu saying "Select a capture template".
> Of course, two options [t] and [j], and [C] Customize
> org-capture-templates and [q] Abort.
> > 3. I press [t] and get a "capture buffer" with "*
> TODO" inserted, ready to accept my entry
> > 4. Appears another menu saying "Select task type or
> whatever": several options: [1] Task1 [2] Task2 [3] Task3
> ...
> > 5. I press [1] and  "capture buffer" updates with
> "* TODO Task1" inserted, ready to accept more info
> > 6. Ideally appears another menu saying "Select comment
> or whatever": several options: [1] Comment1 [2] Comment2 [3]
> Comment3 ...
> > 7. I press [1] and  "capture buffer" updates with
> "* TODO Task1 Comment1" inserted, ready to accept more info
> > 8. Ideally steps 6 and 7 would be repeated (well, no
> more than 4 or 5 times)
> > 4. C-c C-c finish and save the entry in ~/org/gtd.org
> 
> Do you really want capturing a task to be such a heavy
> task?!

Actually, yes, I want, because steps 4, 6 and 8 contain long lists hard to remember, and I want to guarantee exactly the inserted strings are one of the included in the lists.

In the original post, I said that I could manage with 2-3 keybindings that show, each, a list to choose and insert the entry, but I am not sure how to do it.


> 
> You should explore using multiple keys for the capture
> template
> definition -- see the manual:

Do you mean I should generate all the combinations and assign a template to each one? Can you provide any kind of minimal example? 

> 
>   http://orgmode.org/manual/Template-elements.html#Template-elements
> 
> HTH,
> 
> -- 
>  Bastien
> 
> _______________________________________________
> 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

* Re: Org capture with predefined entries from a list?
  2010-09-22  5:26       ` Miguel Ruiz
@ 2010-09-22  7:13         ` Bastien
  0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2010-09-22  7:13 UTC (permalink / raw)
  To: Miguel Ruiz; +Cc: emacs-orgmode

Hi Miguel,

Miguel Ruiz <rbenit68@yahoo.es> writes:

>> You should explore using multiple keys for the capture template
>> definition -- see the manual:
>
> Do you mean I should generate all the combinations and assign a
> template to each one? 

Yes.

> Can you provide any kind of minimal example? 

(setq org-capture-templates
  '(("l" "LifeHacking")                  
    ("lw" "LifeHacking write something") 
    ("lw+" "LH write something clever" entry
           (file+headline "~/org/bzg.org" "LifeHacking")
           "* INPROGRESS My new clever writing\n\n%?" :prepend t)
    ("lw-" "LH write something stupid" entry
           (file+headline "~/org/bzg.org" "LifeHacking")
           "* INPROGRESS My new stupid writing\n\n%?" :prepend t)))

M-x org-capture RET will let you select the "l" menu entry for
"LifeHacking", then the "w" menu entry which is more specific, etc.  
You can easily emulate the example you gave in your previous email.

HTH,

-- 
 Bastien

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

end of thread, other threads:[~2010-09-22  7:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-11  7:37 Org capture with predefined entries from a list? Miguel Ruiz
2010-09-13 16:58 ` Nicolas Goaziou
2010-09-13 19:57   ` Miguel Ruiz
2010-09-21 23:00     ` Bastien
2010-09-22  5:26       ` Miguel Ruiz
2010-09-22  7:13         ` Bastien

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