From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subject: capture template for .ics invitation in vm Date: Sat, 19 Dec 2015 08:24:53 +1100 Message-ID: <22132.31141.344059.773077@localhost.localdomain> Reply-To: prayner@unimelb.edu.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aA2WM-00039d-5t for emacs-orgmode@gnu.org; Fri, 18 Dec 2015 16:25:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aA2WI-0000Pi-WC for emacs-orgmode@gnu.org; Fri, 18 Dec 2015 16:25:02 -0500 Received: from mail-gw1.its.unimelb.edu.au ([128.250.5.150]:46251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aA2WI-0000P7-KY for emacs-orgmode@gnu.org; Fri, 18 Dec 2015 16:24:58 -0500 Received: from localhost.localdomain (abyss.earthsci.unimelb.edu.au [128.250.120.200]) by mail-gw1.its.unimelb.edu.au (Postfix) with ESMTPS id A745B282002 for ; Sat, 19 Dec 2015 08:24:54 +1100 (AEDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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 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