emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-capture target files
@ 2012-09-15 21:25 Kalev Takkis
  2012-09-15 21:56 ` Charles Philip Chan
  2012-09-23 10:11 ` Bastien
  0 siblings, 2 replies; 6+ messages in thread
From: Kalev Takkis @ 2012-09-15 21:25 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi all,

Is it possible to take a note in org-capture and to specify one or several
files to put the message into only after the note is written? The workflow
I have in mind is first pressing C-c c to take a note; selecting the type
of note I'd like to take; typing the message, pasting a link etc.,
finishing the note, with C-c C-c and then ending up in a list of available
*.org files (which could already be on display in a window next to capture
window) from which I can select the file(s) where to send the note to.
After some ferocious googling for  the past two months it seems that this
kind of system does not exist (right?).

But would it be possible to write something like that? After consulting
with the org-capture.el file I have some doubts, all capture templates
expect the destination file to be known beforehand, and the filename is
resolved early in the  capture process. There is a template where a
function is supposed to find the target and which is described as the most
flexible way, but since the capture already happens in the target file in
an indirect buffer, I don't think it's flexibility is enough.

What do you think, is there a way to do this?

Regards,
Kalev

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

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

* Re: org-capture target files
  2012-09-15 21:25 org-capture target files Kalev Takkis
@ 2012-09-15 21:56 ` Charles Philip Chan
  2012-09-16 14:30   ` darcamo
  2012-09-23 10:11 ` Bastien
  1 sibling, 1 reply; 6+ messages in thread
From: Charles Philip Chan @ 2012-09-15 21:56 UTC (permalink / raw)
  To: Org-mode

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

Kalev Takkis <kalev.takkis@gmail.com> writes:

Hi Kalev:

> Is it possible to take a note in org-capture and to specify one or
> several files to put the message into only after the note is written?
> The workflow I have in mind is first pressing C-c c to take a note;
> selecting the type of note I'd like to take; typing the message,
> pasting a link etc., finishing the note, with C-c C-c and then ending
> up in a list of available *.org files (which could already be on
> display in a window next to capture window) from which I can select
> the file(s) where to send the note to.

No, however, you can instead of finalizing with "C-c C-c", use refile
"C-c C-w" and set "org-refile-use-outline-path" to "file".

Cheers,
Charles

-- 
"Absolutely nothing should be concluded from these figures except that
no conclusion can be drawn from them."
(By Joseph L. Brothers, Linux/PowerPC Project)

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: org-capture target files
  2012-09-15 21:56 ` Charles Philip Chan
@ 2012-09-16 14:30   ` darcamo
  0 siblings, 0 replies; 6+ messages in thread
From: darcamo @ 2012-09-16 14:30 UTC (permalink / raw)
  To: Charles Philip Chan; +Cc: Org-mode

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

I also use refile for this. I have a refile.org file where new stuff goes.

If I want to refile the note/task now, instead of later, I use "C-u C-u C-c
c" and Org goes to the last captured note/task from where I can easily
refile it.

--
Darlan
Em 15/09/2012 18:55, "Charles Philip Chan" <cpchan@bell.net> escreveu:

> Kalev Takkis <kalev.takkis@gmail.com> writes:
>
> Hi Kalev:
>
> > Is it possible to take a note in org-capture and to specify one or
> > several files to put the message into only after the note is written?
> > The workflow I have in mind is first pressing C-c c to take a note;
> > selecting the type of note I'd like to take; typing the message,
> > pasting a link etc., finishing the note, with C-c C-c and then ending
> > up in a list of available *.org files (which could already be on
> > display in a window next to capture window) from which I can select
> > the file(s) where to send the note to.
>
> No, however, you can instead of finalizing with "C-c C-c", use refile
> "C-c C-w" and set "org-refile-use-outline-path" to "file".
>
> Cheers,
> Charles
>
> --
> "Absolutely nothing should be concluded from these figures except that
> no conclusion can be drawn from them."
> (By Joseph L. Brothers, Linux/PowerPC Project)
>

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

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

* Re: org-capture target files
  2012-09-15 21:25 org-capture target files Kalev Takkis
  2012-09-15 21:56 ` Charles Philip Chan
@ 2012-09-23 10:11 ` Bastien
  2012-09-23 16:59   ` Kalev Takkis
  1 sibling, 1 reply; 6+ messages in thread
From: Bastien @ 2012-09-23 10:11 UTC (permalink / raw)
  To: Kalev Takkis; +Cc: emacs-orgmode

Hi Kalev,

Kalev Takkis <kalev.takkis@gmail.com> writes:

> Is it possible to take a note in org-capture and to specify one or
> several files to put the message into only after the note is written?

You can refile a note from the capture buffer with C-c C-w.

I added a command to /copy/ the note instead of refiling it: C-c M-w.
Finding the copying location works the same way than for refile.  So
now you can copy the item from the capture buffer to several files.

> The workflow I have in mind is first pressing C-c c to take a note;
> selecting the type of note I'd like to take; typing the message,
> pasting a link etc., finishing the note, with C-c C-c and then ending
> up in a list of available *.org files (which could already be on
> display in a window next to capture window) from which I can select
> the file(s) where to send the note to. 

The available process is a bit different: capture, edit, refile or copy,
then finalize the capture process.

> After some ferocious googling
> for  the past two months it seems that this kind of system does not
> exist (right?). 

Two months of googling!  Phew.  :)

> But would it be possible to write something like that? After
> consulting with the org-capture.el file I have some doubts, all
> capture templates expect the destination file to be known beforehand,

Yes -- hence the different process describe above.

> and the filename is resolved early in the  capture process. There is
> a template where a function is supposed to find the target and which
> is described as the most flexible way, but since the capture already
> happens in the target file in an indirect buffer, I don't think it's
> flexibility is enough.
>
> What do you think, is there a way to do this?

Please try the new feature if you can (it is in the git master branch)
and let me know if it helps.

Best,

-- 
 Bastien

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

* Re: org-capture target files
  2012-09-23 10:11 ` Bastien
@ 2012-09-23 16:59   ` Kalev Takkis
  2012-09-24  5:08     ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Kalev Takkis @ 2012-09-23 16:59 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

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

On Sun, Sep 23, 2012 at 1:11 PM, Bastien <bzg@altern.org> wrote:

> Hi Kalev,
>
> Kalev Takkis <kalev.takkis@gmail.com> writes:
>
> > Is it possible to take a note in org-capture and to specify one or
> > several files to put the message into only after the note is written?
>
> You can refile a note from the capture buffer with C-c C-w.
>
> I added a command to /copy/ the note instead of refiling it: C-c M-w.
> Finding the copying location works the same way than for refile.  So
> now you can copy the item from the capture buffer to several files.
>
> > The workflow I have in mind is first pressing C-c c to take a note;
> > selecting the type of note I'd like to take; typing the message,
> > pasting a link etc., finishing the note, with C-c C-c and then ending
> > up in a list of available *.org files (which could already be on
> > display in a window next to capture window) from which I can select
> > the file(s) where to send the note to.
>
> The available process is a bit different: capture, edit, refile or copy,
> then finalize the capture process.
>
> > After some ferocious googling
> > for  the past two months it seems that this kind of system does not
> > exist (right?).
>
> Two months of googling!  Phew.  :)
>
> > But would it be possible to write something like that? After
> > consulting with the org-capture.el file I have some doubts, all
> > capture templates expect the destination file to be known beforehand,
>
> Yes -- hence the different process describe above.
>
> > and the filename is resolved early in the  capture process. There is
> > a template where a function is supposed to find the target and which
> > is described as the most flexible way, but since the capture already
> > happens in the target file in an indirect buffer, I don't think it's
> > flexibility is enough.
> >
> > What do you think, is there a way to do this?
>
> Please try the new feature if you can (it is in the git master branch)
> and let me know if it helps.
>
> Best,
>
> --
>  Bastien
>


Thanks, I tried it out and it seems to work. Hopefully it will be useful
for others too.

Another thing I've been meaning to ask: org-capture-mode-hook seems to be
triggered twice, why is that? It was also present in the previous version
of org that I  used, 7.8.02 and I can confirm now it's there in the latest
git version also. If it's not a bug but a desired feature can I disable it
from running twice? I'd like to attach some code to it and getting the
results twice is slightly annoying.

Regards,
Kalev

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

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

* Re: org-capture target files
  2012-09-23 16:59   ` Kalev Takkis
@ 2012-09-24  5:08     ` Bastien
  0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2012-09-24  5:08 UTC (permalink / raw)
  To: Kalev Takkis; +Cc: emacs-orgmode

Hi Kalev,

Kalev Takkis <kalev.takkis@gmail.com> writes:

> Another thing I've been meaning to ask: org-capture-mode-hook seems
> to be triggered twice, why is that?

This was a bug, fixed.  Thanks for reporting it,

-- 
 Bastien

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

end of thread, other threads:[~2012-09-24  5:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-15 21:25 org-capture target files Kalev Takkis
2012-09-15 21:56 ` Charles Philip Chan
2012-09-16 14:30   ` darcamo
2012-09-23 10:11 ` Bastien
2012-09-23 16:59   ` Kalev Takkis
2012-09-24  5:08     ` Bastien

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