emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Yagnesh Raghava Yakkala <yagnesh@live.com>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <87vcwvkq8e.fsf@live.com> (raw)
In-Reply-To: BANLkTinXTb6Jy9h86P2rZjX4tBj6=yAr-Q@mail.gmail.com

Rainer M Krug <r.m.krug@gmail.com> writes:

> On Sat, May 28, 2011 at 12:00 PM, Memnon Anon
> <gegendosenfleisch@googlemail.com> wrote:
>
>     Rainer M Krug <r.m.krug@gmail.com> 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 <bzg@altern.org>
>     | 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.

<snip>
-- 
Your business will assume vast proportions.

  reply	other threads:[~2011-05-28 12:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 10:17 org-capture in the same file from which it was called under certain heading Rainer M Krug
2011-05-28 10:00 ` Memnon Anon
2011-05-28 10:03   ` Rainer M Krug
2011-05-28 11:40     ` Yagnesh Raghava Yakkala [this message]
2011-05-28 13:15       ` Memnon Anon
2011-05-28 14:50       ` Bernt Hansen
2011-05-28 12:15     ` Memnon Anon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vcwvkq8e.fsf@live.com \
    --to=yagnesh@live.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).