Re: [Orgmode] Re: Questions about org-capture templates and usage
[Resending to the list, after fixing a mail problem. I badly wanted to correct my mistake, but my mail to the list kept disappearing. Apologies to Alan for the multiple copies.] Nick Dokos wrote: > Alan E. Davis wrote: > > > I have org-capture assigned to C-c, so C-u C-u C-c c goes straight > > to the last stored item. Perfect. > > I presume the first `C-c' above is a typo and that the bindind is `C-c > c', as the second instance indicates. Rebinding C-c to a command would > be a disaster, True so far, but the following is nonsense: please disregard... > but even C-c c is generally not a good idea: C-c should not be usurped by programs, *exactly* because it is reserved for users. Going-for-some-caffeine-ly yours, Nick > see the Key Binding Conventions in the Emacs Lisp manual - if you have > the manual locally, evaluate the following > > (info "(elisp)Key Binding Conventions") > > otherwise it's available online at > > > http://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html#Key-Binding-Conventions > > Nick > ___ 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
[Orgmode] Re: Questions about org-capture templates and usage
Carsten Dominik writes: > Hi Nick, > > On Dec 6, 2010, at 3:48 PM, Nick Dokos wrote: > >> Alan E. Davis wrote: >> >>> >>> I have org-capture assigned to C-c, so C-u C-u C-c c goes straight to the >>> last stored item. Perfect. >> >> I presume the first `C-c' above is a typo and that the bindind is `C-c >> c', as the second instance indicates. Rebinding C-c to a command would >> be a disaster, but even C-c c is generally not a good idea: > > The way I see it: C-c belongs to the user, so it is a good key > for a global binding to org-capture if the user chooses > it - just like the documentation recommends. Org mode does not > enforce this key, it just recommends it. Indeed. More precisely, C-c belongs to the user, so `C-c c' is a perfectly fine user binding (and so is thus the suggestion in the docs). Štěpán ___ 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
[Orgmode] Re: Questions about org-capture templates and usage
I said: , | I have org-capture assigned to C-c, so C-u C-u C-c c goes straight to | the last stored item. Perfect. ` Org-capture is indeed bound to C-c c on my system. This has indeed been a useful thread. Thank you one and all, Alan ___ 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
Re: [Orgmode] Re: Questions about org-capture templates and usage
On Dec 6, 2010, at 6:57 PM, Nick Dokos wrote: Carsten Dominik wrote: Hi Nick, On Dec 6, 2010, at 3:48 PM, Nick Dokos wrote: Alan E. Davis wrote: I have org-capture assigned to C-c, so C-u C-u C-c c goes straight to the last stored item. Perfect. I presume the first `C-c' above is a typo and that the bindind is `C-c c', as the second instance indicates. Rebinding C-c to a command would be a disaster, but even C-c c is generally not a good idea: The way I see it: C-c belongs to the user, so it is a good key for a global binding to org-capture if the user chooses it - just like the documentation recommends. Org mode does not enforce this key, it just recommends it. Yup, I spouted nonsense. And I wrote `C-c' where I meant `C-c c' ... :/ - Carsten ___ 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
Re: [Orgmode] Re: Questions about org-capture templates and usage
Hi Nick, On Dec 6, 2010, at 3:48 PM, Nick Dokos wrote: Alan E. Davis wrote: I have org-capture assigned to C-c, so C-u C-u C-c c goes straight to the last stored item. Perfect. I presume the first `C-c' above is a typo and that the bindind is `C-c c', as the second instance indicates. Rebinding C-c to a command would be a disaster, but even C-c c is generally not a good idea: The way I see it: C-c belongs to the user, so it is a good key for a global binding to org-capture if the user chooses it - just like the documentation recommends. Org mode does not enforce this key, it just recommends it. see the Key Binding Conventions in the Emacs Lisp manual - if you have the manual locally, evaluate the following (info "(elisp)Key Binding Conventions") otherwise it's available online at http://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html#Key-Binding-Conventions Nick ___ 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 ___ 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
Re: [Orgmode] Re: Questions about org-capture templates and usage
Great thread -- 1) Good docs re:capture 2) Explanation of C-u and how org-capture uses it 3) Emacs keybinding guidelines 4) Notices of requests for more documentation on Worg Also, I understood most of the things in this thread -- something must be wrong with me. --Nate ___ 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
Re: [Orgmode] Re: Questions about org-capture templates and usage
Alan E. Davis wrote: > > I have org-capture assigned to C-c, so C-u C-u C-c c goes straight to the > last stored item. Perfect. I presume the first `C-c' above is a typo and that the bindind is `C-c c', as the second instance indicates. Rebinding C-c to a command would be a disaster, but even C-c c is generally not a good idea: see the Key Binding Conventions in the Emacs Lisp manual - if you have the manual locally, evaluate the following (info "(elisp)Key Binding Conventions") otherwise it's available online at http://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html#Key-Binding-Conventions Nick ___ 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
Re: [Orgmode] Re: Questions about org-capture templates and usage
On Dec 6, 2010, at 9:20 AM, Carsten Dominik wrote: On Dec 6, 2010, at 6:02 AM, Alan E. Davis wrote: I am at much greater ease due to these two messages. They solve several of my befuddlements about capture. On Mon, Dec 6, 2010 at 1:59 PM, Bernt Hansen wrote: I visit newly captured items all the time. If you capture something (I have C-M-r bound to org-capture) and store it with C-c C-c you can visit it immediately with a double prefix C-u C-u C-M-r as stated in the org-capture docstring: This is exactly what I was looking for in the manual. Wow, I cannot believe I forgot to put these into the manual! Crazy. They are in not (git version). Sigh, one of my many standard typos: They are in NOW. - Carsten In fact, I think my comment about the manual was partly a response to being unable to find this item in the manual, when I know I had seen reference to it somewhere. Maybe in my request for items to be included in the manual, the docstrings in org-capture.el would be scanned. I missed this on my cursory search of that file. I will search for it myself, and work on (believe it or not) org-help.org, that I use as a helpmate. I have org-capture assigned to C-c, so C-u C-u C-c c goes straight to the last stored item. Perfect. | | (org-capture &optional GOTO KEYS) | I THINK I understand that GOTO here refers to the prefix C-u ? And C-u C-u circumvents this? | When called interactively with a C-u prefix argument GOTO, don't capture | anything, just go to the file/headline where the selected template | stores its notes. With a double prefix argument C-u C-u, go to the last note ^^ | stored. ^^ This is it! What I was looking for. I think, thought it may seem crazy, I would like to still have a way to specify in the template that one would remain with the newly captured item in its environment, after finalizing. Just the same, thinking about that it's an indirect buffer, it makes more sense how it works now... You can just widen during capture if you wish: C-x n w will show you the entire buffer. You still need to finalize at some point with C-c C-c though. Awe, heck, these two methods solve my problem well enough... | | When called with a `C-0' (zero) prefix, insert a template at point. | This is a great feature... | Lisp programs can set KEYS to a string associated with a template in | `org-capture-templates'. In this case, interactive selection will be | bypassed. ` This is something I'd like to see an example of. (defun my-capture-k () (interactive) (org-capture nil "k")) will directly get you into capture template k. - Carsten - Carsten ___ 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
[Orgmode] Re: Questions about org-capture templates and usage
"Alan E. Davis" writes: > | > | (org-capture &optional GOTO KEYS) > | > > I THINK I understand that GOTO here refers to the prefix C-u ? And C-u C-u > circumvents this? GOTO is the value of the prefix. C-u has a value of 4 For C-u C-M-r GOTO is set to 4 (due to the single prefix) For C-u C-u C-M-r GOTO is set to 16 (due to the double prefix) The code for org-capture looks for specific prefix values and changes the behaviour of the function accordingly. ,[ code from org-capture ] |((equal goto '(4)) (org-capture-goto-target)) |((equal goto '(16)) (org-capture-goto-last-stored)) ` -Bernt ___ 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
Re: [Orgmode] Re: Questions about org-capture templates and usage
On Dec 6, 2010, at 6:02 AM, Alan E. Davis wrote: I am at much greater ease due to these two messages. They solve several of my befuddlements about capture. On Mon, Dec 6, 2010 at 1:59 PM, Bernt Hansen wrote: I visit newly captured items all the time. If you capture something (I have C-M-r bound to org-capture) and store it with C-c C-c you can visit it immediately with a double prefix C-u C-u C-M-r as stated in the org-capture docstring: This is exactly what I was looking for in the manual. In fact, I think my comment about the manual was partly a response to being unable to find this item in the manual, when I know I had seen reference to it somewhere. Maybe in my request for items to be included in the manual, the docstrings in org-capture.el would be scanned. I missed this on my cursory search of that file. I will search for it myself, and work on (believe it or not) org-help.org, that I use as a helpmate. I have org-capture assigned to C-c, so C-u C-u C-c c goes straight to the last stored item. Perfect. | | (org-capture &optional GOTO KEYS) | I THINK I understand that GOTO here refers to the prefix C-u ? And C-u C-u circumvents this? | When called interactively with a C-u prefix argument GOTO, don't capture | anything, just go to the file/headline where the selected template | stores its notes. With a double prefix argument C-u C-u, go to the last note ^^ | stored. ^^ This is it! What I was looking for. I think, thought it may seem crazy, I would like to still have a way to specify in the template that one would remain with the newly captured item in its environment, after finalizing. Just the same, thinking about that it's an indirect buffer, it makes more sense how it works now... You can now finalize with C-u C-c C-c to go to the captured item if you want. - Carsten Awe, heck, these two methods solve my problem well enough... | | When called with a `C-0' (zero) prefix, insert a template at point. | This is a great feature... | Lisp programs can set KEYS to a string associated with a template in | `org-capture-templates'. In this case, interactive selection will be | bypassed. ` This is something I'd like to see an example of. Thank you again, and again, Alan Davis "Pollution is nothing but the resources we are not harvesting. We allow them to disperse because we've been ignorant of their value." --- R . Buckminster Fuller ___ 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 - Carsten ___ 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
Re: [Orgmode] Re: Questions about org-capture templates and usage
On Dec 6, 2010, at 6:02 AM, Alan E. Davis wrote: I am at much greater ease due to these two messages. They solve several of my befuddlements about capture. On Mon, Dec 6, 2010 at 1:59 PM, Bernt Hansen wrote: I visit newly captured items all the time. If you capture something (I have C-M-r bound to org-capture) and store it with C-c C-c you can visit it immediately with a double prefix C-u C-u C-M-r as stated in the org-capture docstring: This is exactly what I was looking for in the manual. Wow, I cannot believe I forgot to put these into the manual! Crazy. They are in not (git version). In fact, I think my comment about the manual was partly a response to being unable to find this item in the manual, when I know I had seen reference to it somewhere. Maybe in my request for items to be included in the manual, the docstrings in org-capture.el would be scanned. I missed this on my cursory search of that file. I will search for it myself, and work on (believe it or not) org-help.org, that I use as a helpmate. I have org-capture assigned to C-c, so C-u C-u C-c c goes straight to the last stored item. Perfect. | | (org-capture &optional GOTO KEYS) | I THINK I understand that GOTO here refers to the prefix C-u ? And C-u C-u circumvents this? | When called interactively with a C-u prefix argument GOTO, don't capture | anything, just go to the file/headline where the selected template | stores its notes. With a double prefix argument C-u C-u, go to the last note ^^ | stored. ^^ This is it! What I was looking for. I think, thought it may seem crazy, I would like to still have a way to specify in the template that one would remain with the newly captured item in its environment, after finalizing. Just the same, thinking about that it's an indirect buffer, it makes more sense how it works now... You can just widen during capture if you wish: C-x n w will show you the entire buffer. You still need to finalize at some point with C-c C-c though. Awe, heck, these two methods solve my problem well enough... | | When called with a `C-0' (zero) prefix, insert a template at point. | This is a great feature... | Lisp programs can set KEYS to a string associated with a template in | `org-capture-templates'. In this case, interactive selection will be | bypassed. ` This is something I'd like to see an example of. (defun my-capture-k () (interactive) (org-capture nil "k")) will directly get you into capture template k. - Carsten ___ 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
[Orgmode] Re: Questions about org-capture templates and usage
I am at much greater ease due to these two messages. They solve several of my befuddlements about capture. On Mon, Dec 6, 2010 at 1:59 PM, Bernt Hansen wrote: > I visit newly captured items all the time. If you capture something (I > have C-M-r bound to org-capture) and store it with C-c C-c you can visit > it immediately with a double prefix C-u C-u C-M-r as stated in the > org-capture docstring: > This is exactly what I was looking for in the manual. In fact, I think my comment about the manual was partly a response to being unable to find this item in the manual, when I know I had seen reference to it somewhere. Maybe in my request for items to be included in the manual, the docstrings in org-capture.el would be scanned. I missed this on my cursory search of that file. I will search for it myself, and work on (believe it or not) org-help.org, that I use as a helpmate. I have org-capture assigned to C-c, so C-u C-u C-c c goes straight to the last stored item. Perfect. > | > | (org-capture &optional GOTO KEYS) > | > I THINK I understand that GOTO here refers to the prefix C-u ? And C-u C-u circumvents this? > | When called interactively with a C-u prefix argument GOTO, don't capture > | anything, just go to the file/headline where the selected template > | stores its notes. With a double prefix argument C-u C-u, go to the last > note > > ^^ > | stored. > ^^ > This is it! What I was looking for. I think, thought it may seem crazy, I would like to still have a way to specify in the template that one would remain with the newly captured item in its environment, after finalizing. Just the same, thinking about that it's an indirect buffer, it makes more sense how it works now... Awe, heck, these two methods solve my problem well enough... | > | When called with a `C-0' (zero) prefix, insert a template at point. > | > This is a great feature... > | Lisp programs can set KEYS to a string associated with a template in > | `org-capture-templates'. In this case, interactive selection will be > | bypassed. > ` > This is something I'd like to see an example of. Thank you again, and again, Alan Davis "Pollution is nothing but the resources we are not harvesting. We allow > them to disperse because we've been ignorant of their value." > >--- R. Buckminster Fuller > ___ 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
[Orgmode] Re: Questions about org-capture templates and usage
Matt Lundin writes: > Alan writes: > >>3. I have had to modify my usage to accomodate to changes in >> org-capture, relative to org-remember. Some differences devolve >> from explicit design features >> >> 1. It is no longer necessary to auto-save uncommitted items. As >> a consequence there seems (as I understand it) to no longer >> be a way to use a prefix key to allow one to visit the item >> in it's context AFTER committing it with C-c C-c. >> >> I have spend a good deal of time worrying over this, but >> haven't solved the problem. Probably 90% of the times I save >> (C-c C-c) the Captured item, I stumble over how to find it >> again to enhance or review the item. > >> *Is there a way to do this, or can we request a way to do this?* > > The function org-capture-goto-last-stored will take you the item. > > You can bind this to a key. > > Or if you would like always to jump to a capture item after filing it, > you can add a hook: > > (add-hook 'org-capture-after-finalize-hook > 'org-capture-goto-last-stored) I visit newly captured items all the time. If you capture something (I have C-M-r bound to org-capture) and store it with C-c C-c you can visit it immediately with a double prefix C-u C-u C-M-r as stated in the org-capture docstring: , | C-M-r runs the command org-capture, which is an interactive autoloaded | Lisp function in `org-capture.el'. | | It is bound to C-c r, C-M-r. | | (org-capture &optional GOTO KEYS) | | Capture something. | | Uses keymap "org-capture-mode-map", which is not currently defined. | | This will let you select a template from `org-capture-templates', and then | file the newly captured information. The text is immediately inserted | at the target location, and an indirect buffer is shown where you can | edit it. Pressing M-x org-capture-finalize brings you back to the previous state | of Emacs, so that you can continue your work. | | When called interactively with a C-u prefix argument GOTO, don't capture | anything, just go to the file/headline where the selected template | stores its notes. With a double prefix argument C-u C-u, go to the last note ^^ | stored. ^^ | | When called with a `C-0' (zero) prefix, insert a template at point. | | Lisp programs can set KEYS to a string associated with a template in | `org-capture-templates'. In this case, interactive selection will be | bypassed. ` HTH, Bernt ___ 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
[Orgmode] Re: Questions about org-capture templates and usage
Alan gmail.com> writes: >1. Eventually a tutorial will surely be available. I haven't found > one. Useful tutorials for me would be > > 1. How to make general templates, and pitfalls. > 2. Advanced usages of org-capture: using functions, etc. > 3. Common errors and causes I am writing such a tutorial to explain date-trees and capture mode. Capture mode is a great leap forward from remember. I will publish this tutorial by the 12th of December. My other org-mode, GTD and project planning tutorials are at this page: http://members.optusnet.com.au/~charles57/GTD/ Charles ___ 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
[Orgmode] Re: Questions about org-capture templates and usage
Alan writes: >1. Eventually a tutorial will surely be available. I haven't found > one. Useful tutorials for me would be > > 1. How to make general templates, and pitfalls. > 2. Advanced usages of org-capture: using functions, etc. > 3. Common errors and causes I put this in the "Features awaiting tutorials" list on Worg: http://orgmode.org/worg/org-tutorials/index.php#sec-7 > >2. Documentation is minimal, while the complexity of the system is > great. Could you please explain what else you'd like to see in the documentation? - http://orgmode.org/manual/Capture.html - (info "(org) Capture") - M-x describe-variable org-capture-templates >3. I have had to modify my usage to accomodate to changes in > org-capture, relative to org-remember. Some differences devolve > from explicit design features > > 1. It is no longer necessary to auto-save uncommitted items. As > a consequence there seems (as I understand it) to no longer > be a way to use a prefix key to allow one to visit the item > in it's context AFTER committing it with C-c C-c. > >I have spend a good deal of time worrying over this, but >haven't solved the problem. Probably 90% of the times I save >(C-c C-c) the Captured item, I stumble over how to find it >again to enhance or review the item. >*Is there a way to do this, or can we request a way to do this?* The function org-capture-goto-last-stored will take you the item. You can bind this to a key. Or if you would like always to jump to a capture item after filing it, you can add a hook: (add-hook 'org-capture-after-finalize-hook 'org-capture-goto-last-stored) >4. I would like to be able to capture to a non-orgmode file. > My remember template saved some notes, a list of items from an > agenda search, or any text was marked as a region, as a memo > wrapped up as a latex memo, with a latex memo header and > an \end{document. > > It is my understanding that this won't work anymore because > capture will not save to a non-orgmode file. > >*Is this correct, and/or what, if anything can I do to make >this work?* ` AFAICT, it works fine. You can use the "plain" entry type. For instance, here's a template that puts the selected region in a quote environment in the file ~/searches.tex. --8<---cut here---start->8--- (add-to-list 'org-capture-templates '("x" "Random note" plain (file "~/searches.tex") "\\begin{quote}\n%i\n\\end{quote}")) --8<---cut here---end--->8--- Best, Matt ___ 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