From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yagnesh Raghava Yakkala Subject: Re: org-capture in the same file from which it was called under certain heading Date: Sat, 28 May 2011 20:40:33 +0900 Message-ID: <87vcwvkq8e.fsf@live.com> References: <877h9b9n6s.fsf@mean.albasani.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQItA-0006Le-FL for emacs-orgmode@gnu.org; Sat, 28 May 2011 08:45:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQIt8-0003JB-Jb for emacs-orgmode@gnu.org; Sat, 28 May 2011 08:45:08 -0400 Received: from lo.gmane.org ([80.91.229.12]:45477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQIt8-0003Io-8z for emacs-orgmode@gnu.org; Sat, 28 May 2011 08:45:06 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QQIt7-00057x-M0 for emacs-orgmode@gnu.org; Sat, 28 May 2011 14:45:05 +0200 Received: from 221x115x36x228.ap221.ftth.ucom.ne.jp ([221.115.36.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 May 2011 14:45:05 +0200 Received: from yagnesh by 221x115x36x228.ap221.ftth.ucom.ne.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 May 2011 14:45:05 +0200 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 Rainer M Krug writes: > On Sat, May 28, 2011 at 12:00 PM, Memnon Anon > wrote: > > Rainer M Krug writes: > > > I would like to capture todo items, changes and other things in > the > > file I am working in (literate programming), but I am > struggling: how > > can I specify thet the file is the actual file I am working in? > > > Thats fun! > From the info manual on capture templates > to google "org capture "entry (function"" which led > to the mailing list archive (Thread start: > http://tinyurl.com/3fj25gq) > to the git log: > > ,---- > | commit 030960559e24b5b364b6237d223429b5050fc2f1 > | Author: Bastien Guerry > | Date:   Sun Mar 6 17:31:56 2011 +0100 > | > |     org-capture.el: remove (currentfile) as a file specification > in templates. > | > |     You can already use a function like (buffer-file-name) to > get the currently > |     visited file.  So (currentfile) is not necessary. > `---- > > What a round trip :). > > A quick test suggests this should do: > > --8<---------------cut here---------------start------------->8--- > ("w" >  "*TEST*: entry function currentfile" >  entry >  (file+headline (buffer-file-name) "Notes") >  "* Eintrag") > --8<---------------cut here---------------end--------------->8--- > > > This should file your capture item "* Eintrag" under the Node "* > Notes" > in the buffer you called capture from. > > Is that what you had in mind? > >   > Yes - exactly that. > Now if this could go into the documentation of org-capture, that would > be great. >   to extend the same, I have a similar requirement where I want to capture subtasks of a TODO item as I am working on it. So the (TODO)node under which I want to capture changes with the time. It would be good If there is a way to specify capture destination dynamically(most of the time the capture destination is under the current clocked item) Thanks., Yagnesh. -- Your business will assume vast proportions.