From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Finding LAST copy of a given headline in a file Date: Fri, 26 Jul 2013 00:51:48 +0200 Message-ID: <20130725225148.GB9608@kuru.dyndns-at-home.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2UO3-0001J6-Jy for emacs-orgmode@gnu.org; Thu, 25 Jul 2013 18:51:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2UO2-0003rU-Mh for emacs-orgmode@gnu.org; Thu, 25 Jul 2013 18:51:55 -0400 Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]:49033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2UO2-0003rH-H3 for emacs-orgmode@gnu.org; Thu, 25 Jul 2013 18:51:54 -0400 Received: by mail-we0-f175.google.com with SMTP id q58so1195929wes.6 for ; Thu, 25 Jul 2013 15:51:53 -0700 (PDT) Received: from kuru.dyndns-at-home.com (sd44012d5.adsl.online.nl. [212.64.18.213]) by mx.google.com with ESMTPSA id a6sm886516wib.10.2013.07.25.15.51.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 25 Jul 2013 15:51:51 -0700 (PDT) Content-Disposition: inline In-Reply-To: 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 Hello Subhan, On Thu, Jul 25, 2013 at 03:29:10PM -0700, Subhan Tindall wrote: > Have template that inserts itself under the LAST entry in the target file > for a given headline What problem do you have with the above? Can you give us a minimal example? > composes the right strings to use file+olp to find the specific headline > under the current date's date-tree heading. > For example, I have a date tree with **** Ticket X under each of several > days, including today's date. > I want to insert an entry ***** What I did today with some additional > information under **** Ticket X for today. > > * 2013 > ** 2013-07-25 > *** 2013-07-24 Wednesday > **** Ticket X > ***** LOG ticket X stuff for Wednesday > *** 2013-07-25 Thursday > **** Ticket X > ***** LOG ticket X stuff > **** Ticket Y > ****** Log ticket y stuff Date trees can be tricky. As far as I understand, you want to add a subheading to entries for a day. I do not think file+datetree can do that. I would recommend you try file+function instead. It should be easy to implement. You could use org-map-entries to find the headline in your headline finding function. Hope this helps, -- Suvayu Open source is the future. It sets us free.