From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Problem with 7.02 - org-capture-templates not set from init file Date: Tue, 2 Nov 2010 16:30:01 +0100 Message-ID: <73399AAD-C15F-4444-A76C-44EF9394E223@gmail.com> References: <86eib5b0jj.fsf@gmail.com> <14F45242-D9C2-428F-AE44-2CF8ABC858D0@gmail.com> <86y69bajer.fsf@gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=42546 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDIoJ-0007Mn-NL for emacs-orgmode@gnu.org; Tue, 02 Nov 2010 11:30:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDIoH-0005PF-SV for emacs-orgmode@gnu.org; Tue, 02 Nov 2010 11:30:07 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:42833) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDIoH-0005P4-Kc for emacs-orgmode@gnu.org; Tue, 02 Nov 2010 11:30:05 -0400 Received: by eydd26 with SMTP id d26so3477907eyd.0 for ; Tue, 02 Nov 2010 08:30:04 -0700 (PDT) In-Reply-To: <86y69bajer.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jeffrey DeLeo Cc: emacs-orgmode@gnu.org On Nov 2, 2010, at 3:29 PM, Jeffrey DeLeo wrote: > One thing I noticed that changed in org-install.el from 7.01h to > 7.02 - > in 7.02 is being explicitly defined in org-install.el as nil, that > wasn't happening before. That is right. However, when org-capture gets loaded, the value will change to the customize value - I hope. Greetings - Carsten > > 7.01h: > ;;;### (autoloads (org-capture-import-remember-templates org-capture- > insert-template-here > ;;;;;; org-capture) "org-capture" "lisp/org-capture.el" (19549 1164)) > ;;; Generated autoloads from lisp/org-capture.el > > (autoload 'org-capture "org-capture" "\ > Capture something. > \\ > This will let you select a template from `org-capture-templates', > and then > file the newly captured information. The text is immediately inserted > at the target location, and an indirect buffer is shown where you can > edit it. Pressing \\[org-capture-finalize] brings you back to the > previous state > of Emacs, so that you can continue your work. > > When called interactively with a \\[universal-argument] prefix > argument GOTO, don't capture > anything, just go to the file/headline where the selected template > stores its notes. With a double prefix argument \\[universal- > argument] \\[universal-argument], go to the last note > stored. > > When called with a `C-0' (zero) prefix, insert a template at point. > > Lisp programs can set KEYS to a string associated with a template in > `org-capture-templates'. In this case, interactive selection will be > bypassed. > > \(fn &optional GOTO KEYS)" t nil) > > 7.02 > ;;;### (autoloads (org-capture-import-remember-templates org-capture- > insert-template-here > ;;;;;; org-capture org-capture-templates) "org-capture" "lisp/org- > capture.el" > ;;;;;; (19658 27920)) > ;;; Generated autoloads from lisp/org-capture.el > > (defvar org-capture-templates nil "\ > Templates for the creation of new entries. > > Each entry is a list with the following items: > > keys The keys that will select the template, as a string, > characters > only, for example \"a\" for a template to be selected > with a > single key, or \"bt\" for selection with two keys. > When using > several keys, keys using the same prefix key must be > together > in the list and preceded by a 2-element entry > explaining the > prefix key, for example > > (\"b\" \"Templates for marking stuff to buy\") > > The \"C\" key is used by default for quick access to the > customization of the template variable. But if you > want to use > that key for a template, you can. > > description A short string describing the template, will be shown > during > selection. > > type The type of entry. Valid types are: > entry an Org-mode node, with a headline. Will be > filed as the child of the target entry or > as > a top-level entry. > item a plain list item, will be placed in the > first plain list at the target > location. > checkitem a checkbox item. This differs from the > plain list item only is so far as it uses a > different default template. > table-line a new line in the first table at target > location. > plain text to be inserted as it is. > > target Specification of where the captured item should be > placed. > In Org-mode files, targets usually define a node. > Entries will > become children of this node, other types will be added > to the > table or list in the body of this node. > > Valid values are: > > (file \"path/to/file\") > Text will be placed at the beginning or end of that > file > > (id \"id of existing org entry\") > File as child of this entry, or in the body of the > entry > > (file+headline \"path/to/file\" \"node headline\") > Fast configuration if the target heading is unique > in the file > > (file+olp \"path/to/file\" \"Level 1 heading\" \"Level > 2\" ...) > For non-unique headings, the full path is safer > > (file+regexp \"path/to/file\" \"regexp to find location > \") > File to the entry matching regexp > > (file+datetree \"path/to/file\") > Will create a heading in a date tree > > (file+function \"path/to/file\" function-finding- > location) > A function to find the right location in the file > > (clock) > File to the entry that is currently being clocked > > (function function-finding-location) > Most general way, write your own function to find both > file and location > > template The template for creating the capture item. If you > leave this > empty, an appropriate default template will be used. > See below > for more details. Instead of a string, this may also > be one of > > (file \"/path/to/template-file\") > (function function-returning-the-template) > > in order to get a template from a file, or dynamically > from a function. > > The rest of the entry is a property list of additional options. > Recognized > properties are: > > :prepend Normally newly captured information will be > appended at > the target location (last child, last table line, > last list item...). Setting this property will > change that. > > :immediate-finish When set, do not offer to edit the information, > just > file it away immediately. This makes sense if > the > template only needs information that can be added > automatically. > > :empty-lines Set this to the number of lines the should be > inserted > before and after the new item. Default 0, only > common > other value is 1. > > :clock-in Start the clock in this item. > > :clock-resume Start the interrupted clock when finishing the > capture. > > :unnarrowed Do not narrow the target buffer, simply show the > full buffer. Default is to narrow it so that you > only see the new stuff. > > :table-line-pos Specification of the location in the table > where the > new line should be inserted. It looks like > \"II-3\" > which means that the new line should become the > third > line before the second horizontal separator line. > > :kill-buffer If the target file was not yet visited by a > buffer when > capture was invoked, kill the buffer again > after capture > is finalized. > > The template defines the text to be inserted. Often this is an org- > mode > entry (so the first line should start with a star) that will be > filed as a > child of the target headline. It can also be freely formatted text. > Furthermore, the following %-escapes will be replaced with content: > > %^{prompt} prompt the user for a string and replace this sequence > with it. > A default value and a completion table ca be specified > like this: > %^{prompt|default|completion2|completion3|...} > %t time stamp, date only > %T time stamp with date and time > %u, %U like the above, but inactive time stamps > %^t like %t, but prompt for date. Similarly %^T, %^u, %^U. > You may define a prompt like %^{Please specify birthday > %n user name (taken from `user-full-name') > %a annotation, normally the link created with `org-store- > link' > %i initial content, copied from the active region. If %i > is > indented, the entire inserted text will be indented as > well. > %c current kill ring head > %x content of the X clipboard > %^C interactive selection of which kill or clip to use > %^L like %^C, but insert as link > %k title of currently clocked task > %K link to currently clocked task > %^g prompt for tags, with completion on tags in target file > %^G prompt for tags, with completion on all tags in all > agenda files > %^{prop}p prompt the user for a value for property `prop' > %:keyword specific information for certain link types, see below > %[pathname] insert the contents of the file given by `pathname' > %(sexp) evaluate elisp `(sexp)' and replace with the result > > %? After completing the template, position cursor here. > > Apart from these general escapes, you can access information > specific to the > link type that is created. For example, calling `org-capture' in > emails > or gnus will record the author and the subject of the message, which > you > can access with \"%:from\" and \"%:subject\", respectively. Here is a > complete list of what is recorded for each link type. > > Link type | Available information > ------------------------ > +------------------------------------------------------ > bbdb | %:type %:name %:company > vm, wl, mh, mew, rmail | %:type %:subject %:message-id > | %:from %:fromname %:fromaddress > | %:to %:toname %:toaddress > | %:fromto (either \"to NAME\" or \"from > NAME\") > | %:date > | %:date-timestamp (as active timestamp) > | %:date-timestamp-inactive (as inactive > timestamp) > gnus | %:group, for messages also all email fields > w3, w3m | %:type %:url > info | %:type %:file %:node > calendar | %:type %:date") > > (custom-autoload 'org-capture-templates "org-capture" t) > > (autoload 'org-capture "org-capture" "\ > Capture something. > \\ > This will let you select a template from `org-capture-templates', > and then > file the newly captured information. The text is immediately inserted > at the target location, and an indirect buffer is shown where you can > edit it. Pressing \\[org-capture-finalize] brings you back to the > previous state > of Emacs, so that you can continue your work. > > When called interactively with a \\[universal-argument] prefix > argument GOTO, don't capture > anything, just go to the file/headline where the selected template > stores its notes. With a double prefix argument \\[universal- > argument] \\[universal-argument], go to the last note > stored. > > When called with a `C-0' (zero) prefix, insert a template at point. > > Lisp programs can set KEYS to a string associated with a template in > `org-capture-templates'. In this case, interactive selection will be > bypassed. > > \(fn &optional GOTO KEYS)" t nil) > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten