emacs-orgmode
[Top][All Lists]
Advanced

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

[O] capture template for .ics invitation in vm


From: prayner
Subject: [O] capture template for .ics invitation in vm
Date: Sat, 19 Dec 2015 08:24:53 +1100

In reality probably an embarrassing emacs-lisp error on my part.

I'm trying to make a capture template for turning the very frequent
invitations I get in .ics format (I think) into org agenda items.
The basis is the ical2org awk script maintained by Eric Fraga.
My template is defined as follows:
("i" "invite" entry (file+headline "~/.org/todo.org" "Tasks")
         "* TODO %(org-capture-vm-invite)\n" :immediate-finish t)

And org-capture-vm-invite is defined as

(defun org-capture-vm-invite ()
  (interactive)
  (with-temp-buffer
    (insert-buffer (org-capture-get :original-buffer 1))
    (shell-command-on-region (point-min) (point-max) "ical2org" nil t)
    (buffer-substring-no-properties (point-min) (point-max))))

A problem seems to be the line
    (insert-buffer (org-capture-get :original-buffer 1))
since :original-buffer doesn't seem to be defined in
org-capture-plist. I've verified that by printing it.
It's likely I'm going about this completely the wrong way so does
anyone have the right way to get information from the buffer where
capture was called during an embedded sexp?
Please reply directly as well as to the list since I'm a loong way
behind on reading.
Thanks in advance
Peter


-- 
Peter Rayner
Leader, Clean Air and Urban Landscapes NESP hub <http://www.nespurban.edu.au>
room 343 
School of Earth Sciences, University of Melbourne, 3010, Vic, Australia
tel: work: +61 (0)3 8344 9708; fax: +61 (0)3 8344 7761 
mobile +61 402 752 379, skype: petermorag 
mail-to: address@hidden TWITTER: @raynerstrings
google scholar profile 
<http://scholar.google.com.au/citations?user=H3up71wAAAAJ&hl=en>



reply via email to

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