emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* capture template: help w table-line target.
@ 2011-04-24 20:31 Stinky Wizzleteet
  0 siblings, 0 replies; only message in thread
From: Stinky Wizzleteet @ 2011-04-24 20:31 UTC (permalink / raw)
  To: emacs-orgmode


Hi all,

Christopher Allan Webber was so gracious to share his personal org setup
for dieting, now I'm adapting his org-remember-template:


(setq org-capture-templates
      '(("w" "weigh-in" entry
	 (file+headline "~/.org/Diet.org" "diet")
	 "
* CAL-IN Diet for day %t 
%^{Weight}p
| Food / Exercise | Calories | Quantity | Total |
|-----------------+----------+----------+-------|
| %^{Food}   |%^{Calories} |%^{Quantity} |     |
|-----------------+----------+----------+-------|
| Total           |          |          |       |
#+TBLFM: $4=$2*$3::$LR4=vsum(@2$4..@-I$4)
")))

This works allright, this capture template is used once every day to
start the table (christopher: how does one do a CAL-OUT ?)
It creates a headline for every day with the table.
During the day the org file needs to stay opened so one can fill the
table with food/exercise items.
Now, I understand org-capture has more functionality than org-remember,
like a capture template that adds a line to a table, totally apt for
this situation:

("f" "food or exercise" table-line
(file+headline "~/.org/Diet.org" "diet")
"| %^{Food}   |%^{Calories} |%^{Quantity} |     |"
:table-line-pos "II-1" )

But I' having trouble getting the target right.
This works like a charm on an org file that just has a table, but I need
to figure out a way how to grab the last table (or better even, *todays*
table, if not there, will create one, but I guess this is for future)
Can anyone point me in the right direction on how to add a table line to
the last table in an org file. Or the table in the last child of
headline "diet" ?

help a noob out,plz.

tips are greatly appreciated,

thx wzzl

-- 
Stinky Wizzleteet thinks: 
You will have a long and unpleasant discussion with your supervisor.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-24 20:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-24 20:31 capture template: help w table-line target Stinky Wizzleteet

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