From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subhan Tindall Subject: Re: need file+function help Date: Tue, 9 Apr 2013 15:37:10 -0700 Message-ID: References: <87mwtc32k9.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0112c0f4adf96304d9f53144 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPhAC-0004eG-5a for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 18:37:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPhA9-0007R2-24 for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 18:37:16 -0400 Received: from mail-la0-x230.google.com ([2a00:1450:4010:c03::230]:35390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPhA8-0007Ql-JZ for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 18:37:12 -0400 Received: by mail-la0-f48.google.com with SMTP id fq13so6950037lab.35 for ; Tue, 09 Apr 2013 15:37:10 -0700 (PDT) In-Reply-To: <87mwtc32k9.fsf@bzg.ath.cx> 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: Bastien Cc: Org-Mode --089e0112c0f4adf96304d9f53144 Content-Type: text/plain; charset=ISO-8859-1 The ability I am looking forward here IS to find a location - it's just that I need a little more detailed control. For example, file+headline(or file+subheadline, or whatever) would find a specific headline in a file, & inserts the entry under it, creating it if it doesn't exist (IE * Notes) file+datetree acts the same, but creates bits of a datetree to get to the specific date. What I want is (somewhat) of a combination of the two: 1) find/create the datetree to get today's date 2) under this subtree, find/create headline 3) insert the entry under this headline. Ideally I'd like to grab a value using capture to specify the headline, but from what I gather that's not going to happen. Nonetheless, I can live with specifying 1 template for each category headline I need: For a simple example: datetree+headline capture template for headline * Notes inserts entry into * 2013 ** April *** 2013-04-09 Tuesday **** PPT111 Dev Ticket for new functionality ***** Log <2013-04-09> Worked on spec for this ticket CLOCK: [2013-04-09 Tue 08:40] This simple extension would then give the ability to log in/out of the PPT111 ticket, with notes on what was worked on, and a simple CLOCKTAB line at the right level will bundle up all the time for a ticket in single entries. This functionality would also be useful for me as a student, with sub-headlines for classes where I could add notes, todos, etc. On Fri, Apr 5, 2013 at 4:09 PM, Bastien wrote: > Hi Subhan, > > Subhan Tindall writes: > > > questions: > > 1) are the values gathered by capture available to the function > > specified for file+function, & if so what are their names? > > No. > > > 2) what is the general template for a function for use with > > file+function, cleanup, return values, etc that would be expected? > > The function is expected to find a location where to put the new > entry, not to return any specific value, and if it returns a value, > the value is ignored. It can also act on the subtree at the location > it has found, but this is slightly abusing the feature I'd say. > > > 3) would it be better to extend datetree to datetree+headline for > > entries of this type? it seems like it a pretty usefully > > functionality to have (I can think of 2 or 3 instances i'd regularly > > use this just off the top of my head > > "datetree+headline" is improper, because a location in a datetree is > a headline... so maybe your best chance is to use (function ...) or > (file+function ...) and try to see if the function can interactively > prompt for the values you want and edit the location as you want. > But again, this goes beyond the purpose of function, which is to > find to location. > > -- > Bastien > -- Subhan Michael Tindall | Software Developer | smt@rentrakmail.com RENTRAK | www.rentrak.com | NASDAQ: RENT --089e0112c0f4adf96304d9f53144 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The ability I am looking forward here IS to find a locatio= n - it's just that I need a little more detailed control.
For examp= le, file+headline(or file+subheadline, or whatever) would find a specific h= eadline in a file, & inserts the entry under it, creating it if it does= n't exist (IE * Notes)
file+datetree acts the same, but creates bits of a datetree to g= et to the specific date.
What I want is (somewhat) of a com= bination of the two:
1) find/create the datetree to get tod= ay's date
2) under this subtree, find/create headline=
3) insert the entry under this headline.
Ideally I'd like to grab a value u= sing capture to specify the headline, but from what I gather that's not= going to happen. =A0Nonetheless, I can live with specifying 1 template for= each category headline I need:
For a simple example:
datetree+headline capture template for headline * Notes
inserts entry into
* 2013
** April
*** 2013-04-09 Tuesday
**** PPT111 Dev Ticket for new functionality
***** Log <2013-04-09> Worked on spec for this ticket
=A0 =A0 =A0 =A0CLOCK: [2013-04-09 Tue 08:40]
=A0
Th= is simple extension would then give the ability to log in/out of the PPT111= ticket, with notes on what was worked on, and a simple CLOCKTAB line at th= e right level will bundle up all the time for a ticket in single entries.

This functionality would also be useful for me as a student, with sub-head= lines for classes where I could add notes, todos, etc.


On Fri,= Apr 5, 2013 at 4:09 PM, Bastien <bzg@altern.org> wrote:
Hi Subhan,

Subhan Tindall <subhan= .tindall@rentrakmail.com> writes:

> questions:
> 1) are the values gathered by capture available to the function
> specified for file+function, & if so what are their names?

No.

> 2) what is the general template for a function for use with
> file+function, cleanup, return values, etc that would be expected?

The function is expected to find a location where to put the new
entry, not to return any specific value, and if it returns a value,
the value is ignored. =A0It can also act on the subtree at the location
it has found, but this is slightly abusing the feature I'd say.

> 3) would it be better to extend datetree to datetree+headline for
> entries of this type? it seems like it a pretty usefully
> functionality to have (I can think of 2 or 3 instances i'd regular= ly
> use this just off the top of my head

"datetree+headline" is improper, because a location in a da= tetree is
a headline... so maybe your best chance is to use (function ...) or
(file+function ...) and try to see if the function can interactively
prompt for the values you want and edit the location as you want.
But again, this goes beyond the purpose of function, which is to
find to location.

--
=A0Bastien



-- Subhan Michael Tindall | Software Developer=
| smt@rentrakm= ail.com
RENTRAK | www.rentrak= .com | NASDAQ: RENT
--089e0112c0f4adf96304d9f53144--