From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Capture question Date: Sun, 06 Mar 2011 18:24:39 +0100 Message-ID: <87bp1op3fs.fsf@altern.org> References: <87fwr0e695.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=51482 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwHhS-0005nU-Hm for emacs-orgmode@gnu.org; Sun, 06 Mar 2011 12:25:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwHhQ-0000YA-JG for emacs-orgmode@gnu.org; Sun, 06 Mar 2011 12:24:58 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:39951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwHhQ-0000Xc-EM for emacs-orgmode@gnu.org; Sun, 06 Mar 2011 12:24:56 -0500 Received: by wwj40 with SMTP id 40so3704887wwj.30 for ; Sun, 06 Mar 2011 09:24:55 -0800 (PST) In-Reply-To: (John Hendy's message of "Sun, 6 Mar 2011 10:16:26 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: emacs-orgmode Hi John, John Hendy writes: > I can't be that odd :) Well, html emails don't help :/ > 1) I think this is solved. Ok, thanks. > 2) The manual says this as to one of the options for the capture > target: > ,----- > | (function function-finding-location) > |   Most general way, write your own function to find both file and > location > `----- > > Since my files always use the format YYYY-##MMM.org (2011-03Mar.org), > I thought I could sure find a function that finds the current file > rather than changing my capture target manually once a month. See my recent reply to Sullivan: you can use (file+heading buffer-file-name "Heading") in the template. buffer-file-name is a function return the file name of the currently visited file (obviously) -- so that should help. > 3) I think this one was pretty clear... the manual says that if I do > this: > ,----- > | (define-key global-map "\C-c c" > |   (lambda () (interactive) (org-capture "t"))) > `----- > > I won't have to manually select "t" (TODO) for my capture template > via the interactive window. Since I only use one capture template, it > would be fantastic to have it automatically use it instead of asking > me what I want to use and then I press another keystroke to select > one template out of one available template. There was two "typos" -- the example is now: #+begin_src emacs-lisp (define-key global-map "\C-cx" (lambda () (interactive) (org-capture nil "x"))) #+end_src Note the "\C-cx" (with no space) and the additional nil. HTH, -- Bastien