From: <prayner@unimelb.edu.au>
To: emacs-orgmode@gnu.org
Subject: capture template for .ics invitation in vm
Date: Sat, 19 Dec 2015 08:24:53 +1100 [thread overview]
Message-ID: <22132.31141.344059.773077@localhost.localdomain> (raw)
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: prayner@unimelb.edu.au TWITTER: @raynerstrings
google scholar profile <http://scholar.google.com.au/citations?user=H3up71wAAAAJ&hl=en>
next reply other threads:[~2015-12-18 21:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 21:24 prayner [this message]
2016-01-05 9:01 ` capture template for .ics invitation in vm Eric S Fraga
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22132.31141.344059.773077@localhost.localdomain \
--to=prayner@unimelb.edu.au \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.