emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Capture question
@ 2011-02-25  0:02 John Hendy
  2011-03-06 13:19 ` Bastien
  0 siblings, 1 reply; 14+ messages in thread
From: John Hendy @ 2011-02-25  0:02 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 2422 bytes --]

Hi,


I'm trying to setup capture for the first time and am getting some odd
behavior. I've been following the manual and my .emacs has this:

,-----
| ;; capture
| (setq org-default-notes-file (concat org-directory "~/org/2011-02Feb.org"
"Tracking"))
| (global-set-key "\C-cc" 'org-capture)
| (setq org-capture-templates
|  '(("t" "todo" entry (file+headline "~/org/2011-02Feb.org" "Tracking")
|             "* TODO %?\n")))
| (define-key global-map "\C-c c"
|   (lambda () (interactive) (org-capture "t")))
`-----

My questions/issues:
1) The biggest is that when I capture and then use C-c C-c to file it, I'm
getting odd headline behavior. My file structure is like so:
,-----
| ~/org/2011-02Feb.org
`-----
| #+ setupfile: ~/path/to/setupfile.org
| * Tracking
| ** TODO stuff
| ** TODO more stuff
| ** TODO even more stuff
| * [date]
| ** Notes
| * [date]
| ** Notes
`-----

In other words, I have a file per month and one headline per day with my
work notes. When I use capture, I get this when I visit the file next:
,-----
| * Tracking
| ** TODO stuff
| ** TODO more stuff
| ** TODO even more stuff
| ** TODO the captured note...* [date]
| ...
`-----

So it's like the captured note gets inserted before a different headline for
some reason. I can't expand the captured TODO, but if I highlight the date
and expand it, then it rights itself and the * [date] that's appended to the
captured TODO goes back to being a first level headline and the capture TODO
is on a line by itself. Why might this be happening?


2) The manual suggests some methods of automatically setting the capture
target when using templates. My files are always "year-##Month.org" (like
2011-02Feb.org). Could I set this somehow to automatically cycle based on
the date? I don't know what "handles" I have at my disposal with eslisp to
do something like that.


3) The manual suggestion of using:
,-----
| (define-key global-map "\C-c c"
|   (lambda () (interactive) (org-capture "t")))
`-----
does not seem to be working. I still have to pick [t] when the capture
template window pops up. I won't really use capture for anything else
besides refilling todos and starting a clock since I only am ever using one
file rather (since it's time based note-taking vs. having a file per
project/customer/etc.). As this is the case, yes, I would love if C-c c
automatically just brought up the TODO template I have defined above.


Many thanks,
John

[-- Attachment #1.2: Type: text/html, Size: 3427 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Capture question
  2011-02-25  0:02 Capture question John Hendy
@ 2011-03-06 13:19 ` Bastien
  2011-03-06 16:16   ` John Hendy
  0 siblings, 1 reply; 14+ messages in thread
From: Bastien @ 2011-03-06 13:19 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

Hi John,

sorry for the late reply. 

I had difficulties parsing your email because it brings many issues
(better to have one email per issue) and it's not clear how the odd
behavior you observe depends on the (odd) structure/templates you are
using.

Can you restate your problems in a way that help me grasp them?  

I know it's hard, but everything that makes things easier for me makes
them easier for everyone - as I'll then have more time to actually fix
things.

Thanks in advance!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Capture question
  2011-03-06 13:19 ` Bastien
@ 2011-03-06 16:16   ` John Hendy
  2011-03-06 17:24     ` Bastien
  0 siblings, 1 reply; 14+ messages in thread
From: John Hendy @ 2011-03-06 16:16 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2243 bytes --]

On Sun, Mar 6, 2011 at 7:19 AM, Bastien <bzg@altern.org> wrote:

> Hi John,
>
> sorry for the late reply.
>
>
No problem.


> I had difficulties parsing your email because it brings many issues
> (better to have one email per issue) and it's not clear how the odd
> behavior you observe depends on the (odd) structure/templates you are
> using.
>

I can't be that odd :)


>
> Can you restate your problems in a way that help me grasp them?
>
>
Sure.

1) I think this is solved. I was trying to file under a pre-existing
headling (* top-level) but my template was like so:
,-----
| (setq org-capture-templates
|  '(("t" "todo" entry (file+headline "~/org/2011-02Feb.org" "Tracking")
|             "* TODO %?\n")))
`-----

I experimented with two stars on the TODO and it worked. Sorry, I probably
should have posted back that it was solved, but after no replies I kind of
thought this email was dead so I let it die :)


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.


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.


I know it's hard, but everything that makes things easier for me makes
> them easier for everyone - as I'll then have more time to actually fix
> things.
>
>
No problem -- I'll break things up better next time. I realize longer,
jumbled emails will probably not be as enticing to dive into since everyone
is volunteering from other things anyway!


Thanks for the assistance,
John



> Thanks in advance!
>
> --
>  Bastien
>

[-- Attachment #2: Type: text/html, Size: 4165 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Capture question
  2011-03-06 16:16   ` John Hendy
@ 2011-03-06 17:24     ` Bastien
  2011-03-06 18:12       ` John Hendy
  0 siblings, 1 reply; 14+ messages in thread
From: Bastien @ 2011-03-06 17:24 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

Hi John,

John Hendy <jw.hendy@gmail.com> 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Capture question
  2011-03-06 17:24     ` Bastien
@ 2011-03-06 18:12       ` John Hendy
  2011-03-06 19:47         ` suvayu ali
  2011-03-07  8:24         ` Bastien
  0 siblings, 2 replies; 14+ messages in thread
From: John Hendy @ 2011-03-06 18:12 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2237 bytes --]

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? 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
>

[-- Attachment #2: Type: text/html, Size: 3659 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: Capture question
  2011-03-06 18:12       ` John Hendy
@ 2011-03-06 19:47         ` suvayu ali
  2011-03-06 20:06           ` John Hendy
  2011-03-07  8:24         ` Bastien
  1 sibling, 1 reply; 14+ messages in thread
From: suvayu ali @ 2011-03-06 19:47 UTC (permalink / raw)
  To: John Hendy; +Cc: Bastien, emacs-orgmode

Hi John,

On Sun, Mar 6, 2011 at 10:12 AM, John Hendy <jw.hendy@gmail.com> wrote:
> 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? Have
> my emails been showing up weird to everyone or something? Yikes -- I had no
> idea.

I also use GMail sometimes (as in this case). The problem might be you
are posting using the rich text options turned on (that is the
default). The GMail interface deceptively hides the fact that rich
text is actually html email. You need to select the "Plain Text"
button on the very right of the formatting toolbar in the compose
window.

Hope this helps.

--
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: Capture question
  2011-03-06 19:47         ` suvayu ali
@ 2011-03-06 20:06           ` John Hendy
  2011-03-06 20:33             ` Suvayu Ali
  0 siblings, 1 reply; 14+ messages in thread
From: John Hendy @ 2011-03-06 20:06 UTC (permalink / raw)
  To: suvayu ali; +Cc: Bastien, emacs-orgmode

On Sun, Mar 6, 2011 at 1:47 PM, suvayu ali <fatkasuvayu+linux@gmail.com> wrote:
>
> Hi John,
>
> On Sun, Mar 6, 2011 at 10:12 AM, John Hendy <jw.hendy@gmail.com> wrote:
> > 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? Have
> > my emails been showing up weird to everyone or something? Yikes -- I had no
> > idea.
>
> I also use GMail sometimes (as in this case). The problem might be you
> are posting using the rich text options turned on (that is the
> default). The GMail interface deceptively hides the fact that rich
> text is actually html email. You need to select the "Plain Text"
> button on the very right of the formatting toolbar in the compose
> window.
>

Thanks for the tip. After Bastien's note, I started searching around
and found some references to this. When using the mailing list I will
be sure to click the "Plain Text" diddy above the compose window. I
had no idea. Sorry!

BTW, what does it show up as? Does this mean when I italicize and
bold, my emails are coming across at <b>word</b> and stuff like that??


John

>
> Hope this helps.
>
> --
> Suvayu
>
> Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: Capture question
  2011-03-06 20:06           ` John Hendy
@ 2011-03-06 20:33             ` Suvayu Ali
  2011-03-19 14:41               ` Matt Lundin
  0 siblings, 1 reply; 14+ messages in thread
From: Suvayu Ali @ 2011-03-06 20:33 UTC (permalink / raw)
  To: John Hendy; +Cc: Bastien, emacs-orgmode

Hi John,

On Sun, 6 Mar 2011 14:06:18 -0600
John Hendy <jw.hendy@gmail.com> wrote:

> BTW, what does it show up as? Does this mean when I italicize and
> bold, my emails are coming across at <b>word</b> and stuff like that??

I think its worse than that. Each paragraph break or each quote prefix
have html tags of some kind. If you are interested you can check
yourself by selecting "show original" from the drop down menu on the top
right while you are reading one of your older posts.

As far as I understand GMail sends a multipart message, plain text
and html mixed. I can't comment further as I don't know much more about
email technologies and standards.

Hope this helps. :)

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Capture question
  2011-03-06 18:12       ` John Hendy
  2011-03-06 19:47         ` suvayu ali
@ 2011-03-07  8:24         ` Bastien
  1 sibling, 0 replies; 14+ messages in thread
From: Bastien @ 2011-03-07  8:24 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

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

> 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

Very soon actually :)

-- 
 Bastien

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Capture question
  2011-03-06 20:33             ` Suvayu Ali
@ 2011-03-19 14:41               ` Matt Lundin
  2011-03-19 14:46                 ` Suvayu Ali
  0 siblings, 1 reply; 14+ messages in thread
From: Matt Lundin @ 2011-03-19 14:41 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: Bastien, emacs-orgmode

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

> As far as I understand GMail sends a multipart message, plain text
> and html mixed. I can't comment further as I don't know much more about
> email technologies and standards.

And FWIW, Gnus users can make sure they don't see the html parts of
multipart/alternative messages sent by Gmail by setting the variable
mm-discouraged-alternatives or by converting the html to text via
mm-text-html-renderer.

This doesn't fix the underlying problem of Gmail users sending multipart
messages, but it at least makes the emails readable.

Best,
Matt

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Capture question
  2011-03-19 14:41               ` Matt Lundin
@ 2011-03-19 14:46                 ` Suvayu Ali
  0 siblings, 0 replies; 14+ messages in thread
From: Suvayu Ali @ 2011-03-19 14:46 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Bastien, emacs-orgmode

On Sat, 19 Mar 2011 10:41:34 -0400
Matt Lundin <mdl@imapmail.org> wrote:

> Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> 
> > As far as I understand GMail sends a multipart message, plain text
> > and html mixed. I can't comment further as I don't know much more
> > about email technologies and standards.  
> 
> And FWIW, Gnus users can make sure they don't see the html parts of
> multipart/alternative messages sent by Gmail by setting the variable
> mm-discouraged-alternatives or by converting the html to text via
> mm-text-html-renderer.
> 
> This doesn't fix the underlying problem of Gmail users sending
> multipart messages, but it at least makes the emails readable.

Something similar with claws and thunderbird. With claws by default it
strips all html and shows only plain text and for Tbird, you can
configure it to do that. :)

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Capture Question
@ 2011-06-02  8:30 Robert Inder
  0 siblings, 0 replies; 14+ messages in thread
From: Robert Inder @ 2011-06-02  8:30 UTC (permalink / raw)
  To: emacs-orgmode

I'm trying to start using Capture, and I'd like to set up a template to
capture a TODO to go "right here" --- i.e. at the point where the cursor is
when I invoke capture.

I can do that OK.

EXCEPT that it always sets the headline level of the new element
to that of a child of the currently clocking task.  I'd LIKE to set it
to the level
for the current location -- so that it fits in "where I am now".

Is there a way to do that?

Related question: is there a function that will tell me about the
entry that I'm currently in?

Robert

Robert Inder,                                    0131 229 1052 / 07808 492 213
Interactive Information Ltd,   3, Lauriston Gardens, Edinburgh EH3 9HH
Registered in Scotland, Company no. SC 150689
                                           Interactions speak louder than words

^ permalink raw reply	[flat|nested] 14+ messages in thread

* capture question
@ 2011-08-11 16:52 Mark Scala
  2011-08-11 23:32 ` Bernt Hansen
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Scala @ 2011-08-11 16:52 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

Hi,

I've been using capture for, among other things, capturing interruptions to
clocked tasks.  For this, I use something like the following template:

("i" "interruption" entry (file "refile.org") "A TEMPLATE HERE" :clock-in t
:clock-resume t)

One thing that has been bothering me is that there are really two types of
interruption that deserve different treatment.  Sometimes the interrupting
task is completed by the time I file it with C-c C-c.  Other times it is
not.  But both types are filed with the todo keyword STARTED.  For those
(and only those) interruptions that are finished by the time I file them,
I'd like them to have the keyword DONE automatically.  Has anyone
encountered this case and found a solution?

Best,
Mark

[-- Attachment #2: Type: text/html, Size: 858 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: capture question
  2011-08-11 16:52 capture question Mark Scala
@ 2011-08-11 23:32 ` Bernt Hansen
  0 siblings, 0 replies; 14+ messages in thread
From: Bernt Hansen @ 2011-08-11 23:32 UTC (permalink / raw)
  To: Mark Scala; +Cc: emacs-orgmode

Mark Scala <markscala@gmail.com> writes:

> Hi, 
>
> I've been using capture for, among other things, capturing
> interruptions to clocked tasks.  For this, I use something like the
> following template:
>
> ("i" "interruption" entry (file "refile.org") "A TEMPLATE HERE"
> :clock-in t :clock-resume t)
>
> One thing that has been bothering me is that there are really two
> types of interruption that deserve different treatment.  Sometimes
> the interrupting task is completed by the time I file it with C-c
> C-c.  Other times it is not.  But both types are filed with the todo
> keyword STARTED.  For those (and only those) interruptions that are
> finished by the time I file them, I'd like them to have the keyword
> DONE automatically.  Has anyone encountered this case and found a
> solution?

Hi Mark,

Just add one step to mark the task DONE before you file it away.

C-c C-t d (mark DONE)
C-c C-c (file it and stop the clock)

How is org-mode supposed to divine that this task you are capturing is
DONE when you file it but another one isn't?  You'll have to indicate
somehow how you differentiate between these capture tasks.

If you can do that programmatically maybe you can add a capture hook
which marks the task done when you file it.

Regards,
Bernt

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-08-11 23:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-25  0:02 Capture question John Hendy
2011-03-06 13:19 ` Bastien
2011-03-06 16:16   ` John Hendy
2011-03-06 17:24     ` Bastien
2011-03-06 18:12       ` John Hendy
2011-03-06 19:47         ` suvayu ali
2011-03-06 20:06           ` John Hendy
2011-03-06 20:33             ` Suvayu Ali
2011-03-19 14:41               ` Matt Lundin
2011-03-19 14:46                 ` Suvayu Ali
2011-03-07  8:24         ` Bastien
  -- strict thread matches above, loose matches on Subject: below --
2011-06-02  8:30 Capture Question Robert Inder
2011-08-11 16:52 capture question Mark Scala
2011-08-11 23:32 ` Bernt Hansen

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).