emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: Shawn Willden <swillden@google.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Easily adding notes to a TODO item
Date: Wed, 27 Apr 2011 08:42:56 -0400	[thread overview]
Message-ID: <87zknblvan.fsf@fastmail.fm> (raw)
In-Reply-To: <BANLkTinhCQn8MV0qRqiLftK+BUb94US57g@mail.gmail.com> (Shawn Willden's message of "Tue, 26 Apr 2011 16:23:53 -0600")

Shawn Willden <swillden@google.com> writes:

> On Tue, Apr 26, 2011 at 10:40 AM, Matt Lundin <mdl@imapmail.org> wrote:
>> Shawn Willden <swillden@google.com> writes:
>>> I'd also like to be able to easily take notes using something like
>>> "remember", but with the notes by default automatically appended to
>>> the text under the task I'm currently clocked into, with an attached
>>> timestamp.
>
>> You can also use a capture template for this, e.g.:
>
> I had to update org-mode to get a working org-capture, and it looks
> like I can't get plain text automatically placed in the correct spot
> (though list entries work fine, which is acceptable), and I've created
> a custom function to take the current file path and linkify it nicely,
> with some variation depending on the contents of the path.
>
> ... but that last bit isn't working.
>
> I have a function "linkify-path" which takes a path as a parameter and
> properly converts the path into an org-mode link in the way I want.
> But the function doesn't work correctly when I call it from my
> template.
>
> My template looks like:
>
>   ("c" "Clock sibling" item (clock) "%T %(linkify-path \"%F\")")
>
> It almost works.  The first think linkify-path does is call
> string-match to look for a particular substring that I want to handle
> specially.  When I call linkify-path normally, this works.  When it's
> invoked by the expansion of the template, the match appears always to
> fail, so I never get the special handling.
>

I'm not too familiar with invoking sexp expansion within capture
templates and am not sure whether you can expand an item within a sexp.
I imagine other community members might have some ideas. (I'm Cc'ing the
ML on this reply.)

Would the following work, or do you require something more complex?

("c" "Clock sibling" item (clock) "%T %a")

Best,
Matt

  parent reply	other threads:[~2011-04-27 12:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 16:14 Easily adding notes to a TODO item Shawn Willden
2011-04-26 16:40 ` Matt Lundin
     [not found]   ` <BANLkTinhCQn8MV0qRqiLftK+BUb94US57g@mail.gmail.com>
2011-04-27 12:42     ` Matt Lundin [this message]
2011-04-27 13:49       ` Shawn Willden
2011-04-27 17:19         ` Matt Lundin
2011-04-26 16:41 ` Matt Lundin

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=87zknblvan.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=swillden@google.com \
    /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).