From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Capture question Date: Sun, 6 Mar 2011 12:12:09 -0600 Message-ID: References: <87fwr0e695.fsf@gnu.org> <87bp1op3fs.fsf@altern.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6d977e34b2373049dd451d8 Return-path: Received: from [140.186.70.92] (port=35126 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwIUE-0003cH-LA for emacs-orgmode@gnu.org; Sun, 06 Mar 2011 13:15:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwIRQ-00061l-Jk for emacs-orgmode@gnu.org; Sun, 06 Mar 2011 13:12:32 -0500 Received: from mail-bw0-f41.google.com ([209.85.214.41]:58775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwIRQ-00061G-2s for emacs-orgmode@gnu.org; Sun, 06 Mar 2011 13:12:28 -0500 Received: by bwz17 with SMTP id 17so3800248bwz.0 for ; Sun, 06 Mar 2011 10:12:27 -0800 (PST) In-Reply-To: <87bp1op3fs.fsf@altern.org> 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: Bastien Cc: emacs-orgmode --0016e6d977e34b2373049dd451d8 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Mar 6, 2011 at 11:24 AM, Bastien wrote: > Hi John, > > John Hendy writes: > > > I can't be that odd :) > > Well, html emails don't help :/ > Really? I just send via gmail. Have I been polluting the list somehow? Have my emails been showing up weird to everyone or something? Yikes -- I had no idea. Or do you just mean compared to sending via some emacs email client? > > > 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") > I'll check that out. > > 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 > > Fantastic. That does it. When do things get pushed to the manual? Or is that an as-it's-spotted-it-gets-changed kind of thing? It's still the old way here: http://orgmode.org/manual/Capture-templates.html#Capture-templates Thanks for the help, John > Note the "\C-cx" (with no space) and the additional nil. > > HTH, > > -- > Bastien > --0016e6d977e34b2373049dd451d8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Sun, Mar 6, 2011 at 11:24 AM, Bastien <bzg@altern.org> wrote:
Hi John,

John Hendy <jw.hendy@gmail.com= > writes:

> I can't be that odd :)

Well, html emails don't help :/

Really? I just send via gmail. Have I been polluting the list somehow? H= ave my emails been showing up weird to everyone or something? Yikes -- I ha= d no idea.

Or do you just mean compared to sending via some emacs = email client?
=A0

> 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)
> | =A0 Most general way, write your own function to find both file and<= br> > location
> `-----
>
> Since my files always use the format YYYY-##MMM.org (2011-03Mar.org),<= br> > 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

=A0(file+heading buffer-file-name "Heading")

I'll check that out.
=A0

in the template. =A0buffer-file-name is a function return the file name of<= br> 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:
> ,-----
> |=A0(define-key global-map "\C-c c"
> | =A0 (lambda () (interactive) (org-capture "t")))
> `-----
>
> I won't have to manually select "t" (TODO) for my captur= e template
> via the interactive window. Since I only use one capture template, it<= br> > 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"
=A0(lambda () (interactive) (org-capture nil "x")))
#+end_src


Fantastic. That does it. When do thing= s get pushed to the manual? Or is that an as-it's-spotted-it-gets-chang= ed kind of thing? It's still the old way here:=A0http://orgmode.org= /manual/Capture-templates.html#Capture-templates


Thanks for the help,
John<= div>=A0
Note the "\C-cx" (with no space) and the additional nil.

HTH,

--
=A0Bastien

--0016e6d977e34b2373049dd451d8--