emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: New implementation of the Org remember process ready for comments and testing
Date: Wed, 23 Jun 2010 01:07:00 +0200	[thread overview]
Message-ID: <87aaqm8y5n.fsf@gmx.de> (raw)
In-Reply-To: <C46F10DC-DE51-43D4-AFFE-F71E440D1E1F@gmail.com> (Carsten Dominik's message of "Tue, 22 Jun 2010 14:36:15 +0200")

Carsten Dominik <carsten.dominik@gmail.com> writes:
> None of what I describe is set in stone yet - let me know if you have
> comments, change requests or other ideas.
>
> My feeling right now is that this should become the default capture
> system, and that we will keep the current org-remember in the
> distribution for quite some time, for compatibility.


* "C" as template key

  C-h v org-catpure-templates

  states:

         Do not use "C" as a key, it is reserved for customizing the
         template variable.

  I guess this is for the testing phase only?



* Reuse input

  I would like to prompt for a value and use the input in several
  places. E.g. part of the last entry in my training diary looks like
  this:


=> --->8----------------------------->8----------------------------->8---
***** DONE [2010-06-21 Mo] (run)  22761  5:52
      :PROPERTIES:
      :date:     [2010-06-21 Mo]
      :meters:   22761
      :time:     02:13:32
      :pace:     5:52
      :start:    16:00
      :type:     lgDL
      :kcal:     1525
      :rpuls:    42
      :END:

******* Weather
        ...

******* Track
        ... where ...

******* Training
        ... splits, training contents ...

******* Comment
        ... feeling, health etc...
<= ---8<-----------------------------8<-----------------------------8<---


   As you can see, I use the "distance" and the "pace" in two
   places. One in the title for better overview, one as property for
   column view. But I'd like to enter it only once.






* Separate template files

  I'd like to use Org-mode to edit templates.

  I'm trying this:

  (setq org-capture-templates
    (
     `(
        ("l" "Lauf" entry (file+headline "notes/Laufen/Training.org" "Training")
         ,(org-file-contents "~/emacs/org/capture-templates/training.org")
         :empty-lines 1))))

  But I get an error when calling `org-capture':

Debugger entered--Lisp error: (wrong-type-argument listp "* DONE %u  (%^{Type:})  %^{Distance:}  x:xx
  :PROPERTIES:
  :date:     %u
  :meters:
  :time:
  :pace:     x:xx
  :start:
  :type:
  :kcal:     xxx
  :rpuls:
  :END: %^{meters}p %^{start}p %^{time}p %^{type}p %x^{rpuls}p
*** Wetter
    %?

*** Strecke

*** Trainingsinhalt

*** Kommentar
")
  length(("l" "Lauf" entry (file+headline "notes/Laufen/Training.org" "Training") . "* DONE %u  (%^{Type:})  %^{Distance:}  x:xx\n  :PROPERTIES:\n  :date:     %u\n  :meters:\n  :time:\n  :pace:     x:xx\n  :start:\n  :type:\n  :kcal:     xxx\n  :rpuls:\n  :END: %^{meters}p %^{start}p %^{time}p %^{type}p %x^{rpuls}p\n*** Wetter\n    %?\n\n*** Strecke\n\n*** Trainingsinhalt\n\n*** Kommentar\n"))
  (= 2 (length (car tbl)))
  (and (= 2 (length ...)) (= (length ...) 1))
  (cond ((and ... ...) (setq dkey ... ddesc ...) (pop tbl) (push dkey des-keys) (push dkey allowed-keys) (insert prefix "[" dkey "]" "..." "  " ddesc "..." "\n") (setq re ...) (while ... ...)) ((= 2 ...)) (t (insert prefix "[" ... "]" "     " ... "\n") (push ... allowed-keys) (pop tbl)))
  (while tbl (cond (... ... ... ... ... ... ... ...) (...) (t ... ... ...)))
  (while t (erase-buffer) (insert title "\n\n") (setq tbl table des-keys nil allowed-keys nil) (setq prefix (if current ... "")) (while tbl (cond ... ... ...)) (when specials (insert "-------------------------------------------------------------------------------\n") (let ... ...)) (push "\a" allowed-keys) (goto-char (point-min)) (if (not ...) (org-fit-window-to-buffer)) (message prompt) (setq pressed (char-to-string ...)) (while (not ...) (message "Invalid key `%s'" pressed) (sit-for 1) (message prompt) (setq pressed ...)) (if (equal pressed "\a") (error "Abort")) (if (assoc pressed specials) (throw ... ...)) (unless (member pressed des-keys) (throw ... ...)) (setq current (concat current pressed)) (setq table (mapcar ... table)) (setq table (remove nil table)))
  (catch (quote exit) (while t (erase-buffer) (insert title "\n\n") (setq tbl table des-keys nil allowed-keys nil) (setq prefix ...) (while tbl ...) (when specials ... ...) (push "\a" allowed-keys) (goto-char ...) (if ... ...) (message prompt) (setq pressed ...) (while ... ... ... ... ...) (if ... ...) (if ... ...) (unless ... ...) (setq current ...) (setq table ...) (setq table ...)))
  (save-window-excursion (org-switch-to-buffer-other-window "*Org Select*") (setq orig-table table) (catch (quote exit) (while t ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))
  (let (tbl orig-table dkey ddesc des-keys allowed-keys current prefix rtn) (save-window-excursion (org-switch-to-buffer-other-window "*Org Select*") (setq orig-table table) (catch ... ...)) (kill-buffer "*Org Select*") rtn)
  org-mks((("t" "Todo" entry (file+headline "organizer.org" "Eingang")
  "* TODO %^{Title} %^g\n  Eingang: %U\n  %a\n  %i" :empty-lines 1) ("T"
  "Termin" entry (file+headline "organizer.org" "Eingang") "* TODO %^T
  %^{Title} %^g\n  Eingang: %U\n  %a\n  %i" :empty-lines 1) ("l" "Lauf"
  entry (file+headline "notes/Laufen/Training.org" "Training") . "* DONE
  %u  (%^{Type:})  %^{Distance:}  x:xx\n  :PROPERTIES:\n  :date:
  %u\n  :meters:\n  :time:\n  :pace:     x:xx\n  :start:\n  :type:\n
  :kcal:     xxx\n  :rpuls:\n  :END: %^{meters}p %^{start}p %^{time}p
  %^{type}p %x^{rpuls}p\n*** Wetter\n    %?\n\n*** Strecke\n\n***
  Trainingsinhalt\n\n*** Kommentar\n")

  ...



Sebastian

  parent reply	other threads:[~2010-06-22 23:07 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
2010-06-22 14:08 ` Sébastien Vauban
2010-06-22 14:20 ` [Patch] " Sebastian Rose
2010-06-22 14:25   ` Carsten Dominik
2010-06-22 14:29     ` Sebastian Rose
2010-06-22 14:42       ` Carsten Dominik
2010-06-22 14:26   ` Carsten Dominik
2010-06-22 14:27   ` Carsten Dominik
2010-06-23  9:38   ` Ulf Stegemann
2010-06-23 10:29     ` Sebastian Rose
2010-06-23 11:28       ` Carsten Dominik
2010-06-23 12:21       ` Ulf Stegemann
2010-06-23 12:49         ` Sebastian Rose
2010-06-23 14:22           ` Carsten Dominik
2010-06-23 14:42             ` Sebastian Rose
2010-06-24 12:41               ` Ulf Stegemann
2010-06-23 14:06   ` Carsten Dominik
2010-06-22 18:58 ` Tassilo Horn
2010-06-23  3:59   ` Carsten Dominik
2010-06-23  6:31     ` Tassilo Horn
2010-06-23  6:44       ` Carsten Dominik
2010-06-22 19:26 ` Eric S Fraga
2010-06-23  7:53   ` Ian Barton
2010-06-22 20:50 ` Bernt Hansen
2010-06-22 23:15   ` Sebastian Rose
2010-06-23  4:35   ` Carsten Dominik
2010-06-22 23:07 ` Sebastian Rose [this message]
2010-06-22 23:32   ` [Patch] " Sebastian Rose
2010-06-23  4:18   ` Carsten Dominik
2010-06-23 12:24   ` reuse input (was: New implementation of the Org remember process ready for comments and testing) Memnon Anon
2010-06-22 23:56 ` New implementation of the Org remember process ready for comments and testing Sebastian Rose
2010-06-23  4:23   ` Carsten Dominik
2010-06-23  8:05     ` Sebastian Rose
2010-06-23  8:18       ` Carsten Dominik
2010-06-23  4:01 ` Puneeth
2010-06-23  4:31   ` Carsten Dominik
2010-06-23  9:04     ` Puneeth
2010-06-23  8:39   ` Carsten Dominik
2010-06-23  4:52 ` Manish
2010-06-23  5:40   ` Carsten Dominik
2010-06-23  8:02 ` Ian Barton
2010-06-23 11:30   ` Carsten Dominik
2010-06-23 10:40 ` [Typo] " Sebastian Rose
2010-06-23 11:27   ` Carsten Dominik
2010-06-23 13:53 ` Jason McBrayer
2010-06-23 14:05 ` Darlan Cavalcante Moreira
2010-06-23 15:19   ` Carsten Dominik
2010-06-23 17:00     ` Darlan Cavalcante Moreira
2010-06-24  5:20       ` Carsten Dominik
2010-06-24  1:32 ` Bernt Hansen
2010-06-24  2:25   ` BUG: org-capture saves an incorrect clock marker in org-clock-history Bernt Hansen
2010-06-24  5:39     ` Carsten Dominik
2010-06-24 13:37       ` Bernt Hansen
2010-06-24  2:36   ` Re: New implementation of the Org remember process ready for comments and testing Nick Dokos
2010-06-24  2:37     ` Bernt Hansen
2010-06-24  2:41       ` Bernt Hansen
2010-06-24  2:57         ` Capture mode seems to be easily confused in Emacs 22 Bernt Hansen
2010-06-24  5:44           ` Carsten Dominik
2010-06-24 12:26             ` Bernt Hansen
2010-06-24 12:46               ` Carsten Dominik
2010-06-24 13:14                 ` Bernt Hansen
2010-06-24 13:21                   ` Carsten Dominik
2010-06-24 13:32                 ` Bernt Hansen
2010-07-05 11:22 ` capture template: %& and %! Memnon Anon
2010-07-05 12:50   ` Carsten Dominik
2010-07-05 13:18     ` Memnon Anon
2010-07-05 13:26       ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87aaqm8y5n.fsf@gmx.de \
    --to=sebastian_rose@gmx.de \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).