From mboxrd@z Thu Jan 1 00:00:00 1970 From: dlc Subject: How to set a property defaults in a capture template. Date: Tue, 13 Dec 2011 15:56:53 -0600 Message-ID: <912E1A11-FBCA-4D6C-9DC1-401FD0DE0780@coateconnection.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/alternative; boundary=Apple-Mail-6--238653894 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaaTp-00048X-49 for emacs-orgmode@gnu.org; Tue, 13 Dec 2011 17:05:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaaTn-00035W-5w for emacs-orgmode@gnu.org; Tue, 13 Dec 2011 17:05:45 -0500 Received: from coateconnection.com ([69.56.251.74]:59584 helo=mail.coateconnection.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaaLJ-0000W4-M5 for emacs-orgmode@gnu.org; Tue, 13 Dec 2011 16:56:57 -0500 Received: from [192.168.1.24] (110gis178.gulftel.com [216.231.178.110]) by mail.coateconnection.com (Postfix) with ESMTP id 4690F53BA3 for ; Tue, 13 Dec 2011 16:56:55 -0500 (EST) 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: Org Mode --Apple-Mail-6--238653894 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit I am trying to set up a capture template to record personal contact information for sales lead management. I want to have some properties preset to defaults in the capture template I have created an org file with each person as a top level entry. Below is a shortened example. * Last Name, First Name :SCHEDULED: <2012-01-01 .+2w> :PROPERTIES: :Spouse: Spouse Name :Status: New :Group: Prospect :STYLE: habit :END: ** Organization *** Name :PROPERTIES: :Organization-Name: True Homes, Inc. :END **** Title :PROPERTIES: :Title: Owner :end: ** Phone Numbers *** cell :PROPERTIES: :Number: 222-222-2222 :end: *** home *** fax ** Email Addresses *** Primary :PROPERTIES: :Email: John@gmail.com :end: ** Addresses *** home *** work *** condo :PROPERTIES: :Street1: 2833 Beach Blvd. :City: Orange Beach :State: AL :Zip-Code: 36561 :end: ** Activities **** <2011-12-13 Tue> Called in with a referral to sell his property. I want to use org-capture to create this entry with it's subtree and all the properties. The capture template expansion mechanism supports using %^{Property}p . I want some properties to be created with a default without prompting the user. (e.g. :STYLE: habits). I would also like to support completion on some of the properties while creating a new contact. {e.g. the file people.org already exist and is the target for capture to file to and (#+PROPERTY: Status_ALL New Incubating Active Purchased Dead) is at the top of the file.} I have attempted to use the expansion %(SEXP) along with the property api as in the following but it does not work because Emacs-Lisp doesn't support nested strings (right?) I am just learning emacs-lisp, so I'm am sure my lack of knowledge is at work here. (setq org-capture-templates '( ("t" "Test adding property" entry (file "~/people.org") "* Test Entry %(org-entry-put (point) "STYLE" "habit")" ) ( another template ) )) David Coate "Coate Connection" www.coateconnection.com Re/Max Paradise www.AlabamaParadise.com Licensed in AL and FL 23525 Perdido Beach Blvd. Orange Beach, Al 36561 251-213-8811 cell 251-948-8888 fax 1-800-339-2836 direct toll free --Apple-Mail-6--238653894 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable I am trying to set up a capture = template to record personal contact information for sales lead = management. I want to have some properties preset to defaults in the = capture template

I have created an org file with each = person as a top level entry.  Below is a shortened = example.

* Last Name, First = Name
= :SCHEDULED:  <2012-01-01 .+2w>
= :PROPERTIES:
:Spouse:  Spouse = Name
= :Status:  New
:Group: =  Prospect
:STYLE: =  habit
:END:
** = Organization
*** Name
:PROPERTIES:
= :Organization-Name:  True Homes, Inc.
= :END
**** Title
:PROPERTIES:
:Title: = Owner
= :end:
** Phone Numbers
*** = cell
= :PROPERTIES:
:Number: = 222-222-2222
:end:
*** = home
*** fax
** Email Addresses
*** = Primary
:PROPERTIES:
:Email: =  John@gmail.com
= :end:
** Addresses
*** home
*** = work
*** condo
:PROPERTIES:
:Street1: =  2833 Beach Blvd.
:City:  Orange = Beach
= :State:  AL
:Zip-Code: =  36561
:end:
** = Activities
**** <2011-12-13 Tue> Called in with a = referral to sell his property.

I want to use = org-capture to create this entry with it's subtree and all the = properties.  The capture template expansion mechanism supports = using %^{Property}p .  I want some properties to be created with a = default without prompting the user. (e.g. :STYLE: habits).
I = would also like to support completion on some of the properties while = creating a new contact. {e.g.  the file people.org already exist =  and is the target for capture to file to and (#+PROPERTY:   = Status_ALL New Incubating Active Purchased Dead) is at the top of the = file.}

I have attempted to use the expansion = %(SEXP) along with the property api as in the following but it does not = work because Emacs-Lisp doesn't support nested strings (right?) I am = just learning emacs-lisp, so I'm am sure my lack of knowledge is at work = here.

(setq = org-capture-templates
'(
=   ("t" "Test adding property" entry (file = "~/people.org")
    "* Test = Entry %(org-entry-put (point) "STYLE" "habit")"
  =          )
=    ( another template
=    )
        =   ))  


David Coate
"Coate = Connection"
Re/Max = Paradise
www.AlabamaParadise.com
Licensed in = AL and FL
23525 Perdido = Beach Blvd.
Orange Beach, = Al 36561
251-213-8811 cell
1-800-339-2836 direct toll = free