* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
@ 2010-06-22 14:08 ` Sébastien Vauban
2010-06-22 14:20 ` [Patch] " Sebastian Rose
` (13 subsequent siblings)
14 siblings, 0 replies; 67+ messages in thread
From: Sébastien Vauban @ 2010-06-22 14:08 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Carsten,
Carsten Dominik wrote:
> Carsten Dominik wrote:
>> On Jun 21, 2010, at 12:24 PM, Sébastien Vauban wrote:
>>>
>>> Whenever collecting tasks (for example, but not limited to that), I would
>>> like one blank line to be inserted before any heading.
>>
>> this feature is coming soon, with a bunch of others.
Waouh. That was fast!
> New implementation of the Org remember process
> ==============================================
Installed. Imported my templates. Tested.
--8<---------------cut here---------------start------------->8---
(setq org-capture-templates
'(("t" "Task" entry
(file+headline "~/Personal/refile.org" "Tasks")
"* TODO %?\n %U\n %i"
:empty-lines 1)
("a" "Appt" entry
(file+headline "~/Personal/refile.org" "Appointments")
"* %^{Appointment}%?\n %^T\n %i\n"
:empty-lines 1)
;; [...]
))
--8<---------------cut here---------------end--------------->8---
> 7 Request for comments
> ~~~~~~~~~~~~~~~~~~~~~~~
>
> None of what I describe is set in stone yet - let me know if you have
> comments, change requests or other ideas.
>
> My feeling right now is that this should become the default capture
> system, and that we will keep the current org-remember in the
> distribution for quite some time, for compatibility.
My comments:
- org-capture should be the new name, to avoid any future confusion between
old and new system. You know how much old information Google can find.
Making an easy way to distinguish between new and obsolete is better, IMHO.
- new properties like `empty-lines' works as advertised. Thank you very much.
- the fact that the names of templates doesn't appear anymore in the echo area
is MUCH better. Being a user of `idle-require', I sometimes have messages
(like "Blah blah... loaded") appearing the echo area while the system is
expecting some input from me. Before, the template names often disappeared
after a couple of seconds. Now, I don't fear that anymore.
No other comments for the moment, except that it functions as I expect it
(nothing lost) and the import was a breeze...
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
2010-06-22 14:08 ` Sébastien Vauban
@ 2010-06-22 14:20 ` Sebastian Rose
2010-06-22 14:25 ` Carsten Dominik
` (4 more replies)
2010-06-22 18:58 ` Tassilo Horn
` (12 subsequent siblings)
14 siblings, 5 replies; 67+ messages in thread
From: Sebastian Rose @ 2010-06-22 14:20 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1851 bytes --]
Carsten Dominik <carsten.dominik@gmail.com> writes:
> 3 Why a new name?
> ~~~~~~~~~~~~~~~~~~
>
> I have - at least for now - chosen a new name for the new setup:
> ` org-capture'. There are two reasons for this:
In the manual it is "Capture - Refile - Archive". I remember searching
for "Remember" and never found it :)
> 5 Setup
> ~~~~~~~~
>
> To use the new setup, do the following:
>
> 1. Run
>
> M-x org-capture-import-remember-templates RET
Worked perfectly here :)
I tested all my important templates and they work.
Abandoning org-remember seems painless.
> '(("t" "templates adding table lines")
> ("ta" "add to table a" table-line (file+headline "~/notes.org" "Table A))
> ("tb" "add to table b" table-line (file+headline "~/notes.org" "Table B))
> ("tc" "add to table c" table-line (file+headline "~/notes.org" "Table C)))
>
> When starting capture, you can then first press "t" and then see
> the individual options.
This is great. Number of templates is constantly growing and the new
features will increase the speed of this process.
> 7 Request for comments
> ~~~~~~~~~~~~~~~~~~~~~~~
>
> None of what I describe is set in stone yet - let me know if you have
> comments, change requests or other ideas.
>
> My feeling right now is that this should become the default capture
> system, and that we will keep the current org-remember in the
> distribution for quite some time, for compatibility.
Good track I guess.
Here's the tested and working patch for org-protocol.el.
To use `org-remember' and/or `org-capture' alike, copy your org-remember
link and change
javascript:location.href='org-protocol://remember://'+...
to
javascript:location.href='org-protocol://capture://'+...
The template char used is the same for both --- which is OK for me, but
could be changed.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-protocol-org-capture.patch --]
[-- Type: text/x-diff, Size: 6259 bytes --]
diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index 0642227..88676f4 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -87,12 +87,17 @@
;; pushes the browsers URL to the `kill-ring' for yanking. This handler is
;; triggered through the sub-protocol \"store-link\".
;;
-;; * Call `org-protocol-remember' by using the sub-protocol \"remember\". If
-;; Org-mode is loaded, emacs will pop-up a remember buffer and fill the
+;; * Call `org-protocol-capture' by using the sub-protocol \"capture\". If
+;; Org-mode is loaded, emacs will pop-up a capture buffer and fill the
;; template with the data provided. I.e. the browser's URL is inserted as an
;; Org-link of which the page title will be the description part. If text
;; was select in the browser, that text will be the body of the entry.
;;
+;; * Call `org-protocol-remember' by using the sub-protocol \"remember\".
+;; This is provided for backward compatibility.
+;; You may read `org-capture' as `org-remember' throughout this file if
+;; you still use `org-remember'.
+;;
;; You may use the same bookmark URL for all those standard handlers and just
;; adjust the sub-protocol used:
;;
@@ -101,7 +106,7 @@
;; encodeURIComponent(document.title)+'/'+
;; encodeURIComponent(window.getSelection())
;;
-;; The handler for the sub-protocol \"remember\" detects an optional template
+;; The handler for the sub-protocol \"capture\" detects an optional template
;; char that, if present, triggers the use of a special template.
;; Example:
;;
@@ -143,6 +148,7 @@ for `org-protocol-the-protocol' and sub-procols defined in
(defconst org-protocol-protocol-alist-default
'(("org-remember" :protocol "remember" :function org-protocol-remember :kill-client t)
+ ("org-capture" :protocol "capture" :function org-protocol-capture :kill-client t)
("org-store-link" :protocol "store-link" :function org-protocol-store-link)
("org-open-source" :protocol "open-source" :function org-protocol-open-source))
"Default protocols to use.
@@ -260,7 +266,6 @@ Here is an example:
:group 'org-protocol
:type 'string)
-
;;; Helper functions:
(defun org-protocol-sanitize-uri (uri)
@@ -443,51 +448,73 @@ The sub-protocol used to reach this function is set in
(defun org-protocol-remember (info)
"Process an org-protocol://remember:// style url.
+The location for a browser's bookmark has to look like this:
+
+ javascript:location.href='org-protocol://remember://'+ \\
+ encodeURIComponent(location.href)+'/' \\
+ encodeURIComponent(document.title)+'/'+ \\
+ encodeURIComponent(window.getSelection())
+
+See the docs for `org-protocol-capture' for more information."
+
+ (if (and (boundp 'org-stored-links)
+ (or (fboundp 'org-capture))
+ (org-protocol-do-capture info 'org-remember))
+ (message "Org-mode not loaded."))
+ nil)
+
+(defun org-protocol-capture (info)
+ "Process an org-protocol://capture:// style url.
+
The sub-protocol used to reach this function is set in
`org-protocol-protocol-alist'.
This function detects an URL, title and optional text, separated by '/'
The location for a browser's bookmark has to look like this:
- javascript:location.href='org-protocol://remember://'+ \\
+ javascript:location.href='org-protocol://capture://'+ \\
encodeURIComponent(location.href)+'/' \\
encodeURIComponent(document.title)+'/'+ \\
encodeURIComponent(window.getSelection())
By default, it uses the character `org-protocol-default-template-key',
-which should be associated with a template in `org-remember-templates'.
+which should be associated with a template in `org-capture-templates'.
But you may prepend the encoded URL with a character and a slash like so:
- javascript:location.href='org-protocol://org-store-link://b/'+ ...
+ javascript:location.href='org-protocol://capture://b/'+ ...
Now template ?b will be used."
-
(if (and (boundp 'org-stored-links)
- (fboundp 'org-remember))
- (let* ((parts (org-protocol-split-data info t))
- (template (or (and (= 1 (length (car parts))) (pop parts))
- org-protocol-default-template-key))
- (url (org-protocol-sanitize-uri (car parts)))
- (type (if (string-match "^\\([a-z]+\\):" url)
- (match-string 1 url)))
- (title (or (cadr parts) ""))
- (region (or (caddr parts) ""))
- (orglink (org-make-link-string
- url (if (string-match "[^[:space:]]" title) title url)))
- remember-annotation-functions)
- (setq org-stored-links
- (cons (list url title) org-stored-links))
- (kill-new orglink)
- (org-store-link-props :type type
- :link url
- :description title
- :initial region)
- (raise-frame)
- (org-remember nil (string-to-char template)))
-
- (message "Org-mode not loaded."))
+ (or (fboundp 'org-capture))
+ (org-protocol-do-capture info 'org-capture))
+ (message "Org-mode not loaded."))
nil)
+(defun org-protocol-do-capture (info capture-func)
+ "Support `org-capture' and `org-remember' alike.
+CAPTURE-FUNC is either the symbol `org-remember' or `org-capture'."
+ (let* ((parts (org-protocol-split-data info t))
+ (template (or (and (= 1 (length (car parts))) (pop parts))
+ org-protocol-default-template-key))
+ (url (org-protocol-sanitize-uri (car parts)))
+ (type (if (string-match "^\\([a-z]+\\):" url)
+ (match-string 1 url)))
+ (title(or (cadr parts) ""))
+ (region (or (caddr parts) ""))
+ (orglink (org-make-link-string
+ url (if (string-match "[^[:space:]]" title) title url)))
+ remember-annotation-functions)
+ (setq org-stored-links
+ (cons (list url title) org-stored-links))
+ (kill-new orglink)
+ (org-store-link-props :type type
+ :link url
+ :description title
+ :initial region)
+ (raise-frame)
+ (funcall capture-func nil template)))
+
+
(defun org-protocol-open-source (fname)
"Process an org-protocol://open-source:// style url.
[-- Attachment #3: Type: text/plain, Size: 28 bytes --]
Best wishes
Sebastian
[-- Attachment #4: 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 related [flat|nested] 67+ messages in thread
* Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-22 14:20 ` [Patch] " Sebastian Rose
@ 2010-06-22 14:25 ` Carsten Dominik
2010-06-22 14:29 ` Sebastian Rose
2010-06-22 14:26 ` Carsten Dominik
` (3 subsequent siblings)
4 siblings, 1 reply; 67+ messages in thread
From: Carsten Dominik @ 2010-06-22 14:25 UTC (permalink / raw)
To: Sebastian Rose; +Cc: Org Mode
Wooooooooooow, that was incredibly fast!
:-)
template keys used to be characters, now in org-capture.el they are
strings. Does the patch handle this correctly?
- Carsten
On Jun 22, 2010, at 4:20 PM, Sebastian Rose wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>> 3 Why a new name?
>> ~~~~~~~~~~~~~~~~~~
>>
>> I have - at least for now - chosen a new name for the new setup:
>> ` org-capture'. There are two reasons for this:
>
> In the manual it is "Capture - Refile - Archive". I remember
> searching
> for "Remember" and never found it :)
>
>
>> 5 Setup
>> ~~~~~~~~
>>
>> To use the new setup, do the following:
>>
>> 1. Run
>>
>> M-x org-capture-import-remember-templates RET
>
> Worked perfectly here :)
>
> I tested all my important templates and they work.
> Abandoning org-remember seems painless.
>
>
>> '(("t" "templates adding table lines")
>> ("ta" "add to table a" table-line (file+headline "~/notes.org"
>> "Table A))
>> ("tb" "add to table b" table-line (file+headline "~/notes.org"
>> "Table B))
>> ("tc" "add to table c" table-line (file+headline "~/notes.org"
>> "Table C)))
>>
>> When starting capture, you can then first press "t" and then see
>> the individual options.
>
> This is great. Number of templates is constantly growing and the new
> features will increase the speed of this process.
>
>
>> 7 Request for comments
>> ~~~~~~~~~~~~~~~~~~~~~~~
>>
>> None of what I describe is set in stone yet - let me know if you have
>> comments, change requests or other ideas.
>>
>> My feeling right now is that this should become the default capture
>> system, and that we will keep the current org-remember in the
>> distribution for quite some time, for compatibility.
>
>
> Good track I guess.
>
>
>
>
> Here's the tested and working patch for org-protocol.el.
>
> To use `org-remember' and/or `org-capture' alike, copy your org-
> remember
> link and change
>
> javascript:location.href='org-protocol://remember://'+...
>
> to
>
> javascript:location.href='org-protocol://capture://'+...
>
>
> The template char used is the same for both --- which is OK for me,
> but
> could be changed.
>
>
>
>
> diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
> index 0642227..88676f4 100644
> --- a/lisp/org-protocol.el
> +++ b/lisp/org-protocol.el
> @@ -87,12 +87,17 @@
> ;; pushes the browsers URL to the `kill-ring' for yanking. This
> handler is
> ;; triggered through the sub-protocol \"store-link\".
> ;;
> -;; * Call `org-protocol-remember' by using the sub-protocol
> \"remember\". If
> -;; Org-mode is loaded, emacs will pop-up a remember buffer and
> fill the
> +;; * Call `org-protocol-capture' by using the sub-protocol
> \"capture\". If
> +;; Org-mode is loaded, emacs will pop-up a capture buffer and
> fill the
> ;; template with the data provided. I.e. the browser's URL is
> inserted as an
> ;; Org-link of which the page title will be the description
> part. If text
> ;; was select in the browser, that text will be the body of the
> entry.
> ;;
> +;; * Call `org-protocol-remember' by using the sub-protocol
> \"remember\".
> +;; This is provided for backward compatibility.
> +;; You may read `org-capture' as `org-remember' throughout this
> file if
> +;; you still use `org-remember'.
> +;;
> ;; You may use the same bookmark URL for all those standard handlers
> and just
> ;; adjust the sub-protocol used:
> ;;
> @@ -101,7 +106,7 @@
> ;; encodeURIComponent(document.title)+'/'+
> ;; encodeURIComponent(window.getSelection())
> ;;
> -;; The handler for the sub-protocol \"remember\" detects an
> optional template
> +;; The handler for the sub-protocol \"capture\" detects an optional
> template
> ;; char that, if present, triggers the use of a special template.
> ;; Example:
> ;;
> @@ -143,6 +148,7 @@ for `org-protocol-the-protocol' and sub-procols
> defined in
>
> (defconst org-protocol-protocol-alist-default
> '(("org-remember" :protocol "remember" :function org-
> protocol-remember :kill-client t)
> + ("org-capture" :protocol "capture" :function org-
> protocol-capture :kill-client t)
> ("org-store-link" :protocol "store-link" :function org-
> protocol-store-link)
> ("org-open-source" :protocol "open-source" :function org-
> protocol-open-source))
> "Default protocols to use.
> @@ -260,7 +266,6 @@ Here is an example:
> :group 'org-protocol
> :type 'string)
>
> -
> ;;; Helper functions:
>
> (defun org-protocol-sanitize-uri (uri)
> @@ -443,51 +448,73 @@ The sub-protocol used to reach this function
> is set in
> (defun org-protocol-remember (info)
> "Process an org-protocol://remember:// style url.
>
> +The location for a browser's bookmark has to look like this:
> +
> + javascript:location.href='org-protocol://remember://'+ \\
> + encodeURIComponent(location.href)+'/' \\
> + encodeURIComponent(document.title)+'/'+ \\
> + encodeURIComponent(window.getSelection())
> +
> +See the docs for `org-protocol-capture' for more information."
> +
> + (if (and (boundp 'org-stored-links)
> + (or (fboundp 'org-capture))
> + (org-protocol-do-capture info 'org-remember))
> + (message "Org-mode not loaded."))
> + nil)
> +
> +(defun org-protocol-capture (info)
> + "Process an org-protocol://capture:// style url.
> +
> The sub-protocol used to reach this function is set in
> `org-protocol-protocol-alist'.
>
> This function detects an URL, title and optional text, separated by
> '/'
> The location for a browser's bookmark has to look like this:
>
> - javascript:location.href='org-protocol://remember://'+ \\
> + javascript:location.href='org-protocol://capture://'+ \\
> encodeURIComponent(location.href)+'/' \\
> encodeURIComponent(document.title)+'/'+ \\
> encodeURIComponent(window.getSelection())
>
> By default, it uses the character `org-protocol-default-template-key',
> -which should be associated with a template in `org-remember-
> templates'.
> +which should be associated with a template in `org-capture-
> templates'.
> But you may prepend the encoded URL with a character and a slash
> like so:
>
> - javascript:location.href='org-protocol://org-store-link://b/'+ ...
> + javascript:location.href='org-protocol://capture://b/'+ ...
>
> Now template ?b will be used."
> -
> (if (and (boundp 'org-stored-links)
> - (fboundp 'org-remember))
> - (let* ((parts (org-protocol-split-data info t))
> - (template (or (and (= 1 (length (car parts))) (pop
> parts))
> - org-protocol-default-template-key))
> - (url (org-protocol-sanitize-uri (car parts)))
> - (type (if (string-match "^\\([a-z]+\\):" url)
> - (match-string 1 url)))
> - (title (or (cadr parts) ""))
> - (region (or (caddr parts) ""))
> - (orglink (org-make-link-string
> - url (if (string-match "[^[:space:]]" title) title url)))
> - remember-annotation-functions)
> - (setq org-stored-links
> - (cons (list url title) org-stored-links))
> - (kill-new orglink)
> - (org-store-link-props :type type
> - :link url
> - :description title
> - :initial region)
> - (raise-frame)
> - (org-remember nil (string-to-char template)))
> -
> - (message "Org-mode not loaded."))
> + (or (fboundp 'org-capture))
> + (org-protocol-do-capture info 'org-capture))
> + (message "Org-mode not loaded."))
> nil)
>
> +(defun org-protocol-do-capture (info capture-func)
> + "Support `org-capture' and `org-remember' alike.
> +CAPTURE-FUNC is either the symbol `org-remember' or `org-capture'."
> + (let* ((parts (org-protocol-split-data info t))
> + (template (or (and (= 1 (length (car parts))) (pop parts))
> + org-protocol-default-template-key))
> + (url (org-protocol-sanitize-uri (car parts)))
> + (type (if (string-match "^\\([a-z]+\\):" url)
> + (match-string 1 url)))
> + (title(or (cadr parts) ""))
> + (region (or (caddr parts) ""))
> + (orglink (org-make-link-string
> + url (if (string-match "[^[:space:]]" title) title url)))
> + remember-annotation-functions)
> + (setq org-stored-links
> + (cons (list url title) org-stored-links))
> + (kill-new orglink)
> + (org-store-link-props :type type
> + :link url
> + :description title
> + :initial region)
> + (raise-frame)
> + (funcall capture-func nil template)))
> +
> +
> (defun org-protocol-open-source (fname)
> "Process an org-protocol://open-source:// style url.
>
>
>
>
> Best wishes
>
> Sebastian
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-22 14:25 ` Carsten Dominik
@ 2010-06-22 14:29 ` Sebastian Rose
2010-06-22 14:42 ` Carsten Dominik
0 siblings, 1 reply; 67+ messages in thread
From: Sebastian Rose @ 2010-06-22 14:29 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Wooooooooooow, that was incredibly fast!
>
> :-)
>
> template keys used to be characters, now in org-capture.el they are strings.
> Does the patch handle this correctly?
I wondering about that, too. But some nice person changed
org-remember.el to take care for that (See
`org-select-remember-template').
Sebastian
>
> - Carsten
>
>
>
> On Jun 22, 2010, at 4:20 PM, Sebastian Rose wrote:
>
>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>>> 3 Why a new name?
>>> ~~~~~~~~~~~~~~~~~~
>>>
>>> I have - at least for now - chosen a new name for the new setup:
>>> ` org-capture'. There are two reasons for this:
>>
>> In the manual it is "Capture - Refile - Archive". I remember searching
>> for "Remember" and never found it :)
>>
>>
>>> 5 Setup
>>> ~~~~~~~~
>>>
>>> To use the new setup, do the following:
>>>
>>> 1. Run
>>>
>>> M-x org-capture-import-remember-templates RET
>>
>> Worked perfectly here :)
>>
>> I tested all my important templates and they work.
>> Abandoning org-remember seems painless.
>>
>>
>>> '(("t" "templates adding table lines")
>>> ("ta" "add to table a" table-line (file+headline "~/notes.org" "Table A))
>>> ("tb" "add to table b" table-line (file+headline "~/notes.org" "Table B))
>>> ("tc" "add to table c" table-line (file+headline "~/notes.org" "Table
>>> C)))
>>>
>>> When starting capture, you can then first press "t" and then see
>>> the individual options.
>>
>> This is great. Number of templates is constantly growing and the new
>> features will increase the speed of this process.
>>
>>
>>> 7 Request for comments
>>> ~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>> None of what I describe is set in stone yet - let me know if you have
>>> comments, change requests or other ideas.
>>>
>>> My feeling right now is that this should become the default capture
>>> system, and that we will keep the current org-remember in the
>>> distribution for quite some time, for compatibility.
>>
>>
>> Good track I guess.
>>
>>
>>
>>
>> Here's the tested and working patch for org-protocol.el.
>>
>> To use `org-remember' and/or `org-capture' alike, copy your org-
>> remember
>> link and change
>>
>> javascript:location.href='org-protocol://remember://'+...
>>
>> to
>>
>> javascript:location.href='org-protocol://capture://'+...
>>
>>
>> The template char used is the same for both --- which is OK for me, but
>> could be changed.
>>
>>
>>
>>
>> diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
>> index 0642227..88676f4 100644
>> --- a/lisp/org-protocol.el
>> +++ b/lisp/org-protocol.el
>> @@ -87,12 +87,17 @@
>> ;; pushes the browsers URL to the `kill-ring' for yanking. This handler is
>> ;; triggered through the sub-protocol \"store-link\".
>> ;;
>> -;; * Call `org-protocol-remember' by using the sub-protocol \"remember\".
>> If
>> -;; Org-mode is loaded, emacs will pop-up a remember buffer and fill the
>> +;; * Call `org-protocol-capture' by using the sub-protocol \"capture\". If
>> +;; Org-mode is loaded, emacs will pop-up a capture buffer and fill the
>> ;; template with the data provided. I.e. the browser's URL is inserted as
>> an
>> ;; Org-link of which the page title will be the description part. If text
>> ;; was select in the browser, that text will be the body of the entry.
>> ;;
>> +;; * Call `org-protocol-remember' by using the sub-protocol \"remember\".
>> +;; This is provided for backward compatibility.
>> +;; You may read `org-capture' as `org-remember' throughout this file if
>> +;; you still use `org-remember'.
>> +;;
>> ;; You may use the same bookmark URL for all those standard handlers and just
>> ;; adjust the sub-protocol used:
>> ;;
>> @@ -101,7 +106,7 @@
>> ;; encodeURIComponent(document.title)+'/'+
>> ;; encodeURIComponent(window.getSelection())
>> ;;
>> -;; The handler for the sub-protocol \"remember\" detects an optional template
>> +;; The handler for the sub-protocol \"capture\" detects an optional template
>> ;; char that, if present, triggers the use of a special template.
>> ;; Example:
>> ;;
>> @@ -143,6 +148,7 @@ for `org-protocol-the-protocol' and sub-procols defined in
>>
>> (defconst org-protocol-protocol-alist-default
>> '(("org-remember" :protocol "remember" :function org-
>> protocol-remember :kill-client t)
>> + ("org-capture" :protocol "capture" :function org-
>> protocol-capture :kill-client t)
>> ("org-store-link" :protocol "store-link" :function org-
>> protocol-store-link)
>> ("org-open-source" :protocol "open-source" :function org-
>> protocol-open-source))
>> "Default protocols to use.
>> @@ -260,7 +266,6 @@ Here is an example:
>> :group 'org-protocol
>> :type 'string)
>>
>> -
>> ;;; Helper functions:
>>
>> (defun org-protocol-sanitize-uri (uri)
>> @@ -443,51 +448,73 @@ The sub-protocol used to reach this function is set in
>> (defun org-protocol-remember (info)
>> "Process an org-protocol://remember:// style url.
>>
>> +The location for a browser's bookmark has to look like this:
>> +
>> + javascript:location.href='org-protocol://remember://'+ \\
>> + encodeURIComponent(location.href)+'/' \\
>> + encodeURIComponent(document.title)+'/'+ \\
>> + encodeURIComponent(window.getSelection())
>> +
>> +See the docs for `org-protocol-capture' for more information."
>> +
>> + (if (and (boundp 'org-stored-links)
>> + (or (fboundp 'org-capture))
>> + (org-protocol-do-capture info 'org-remember))
>> + (message "Org-mode not loaded."))
>> + nil)
>> +
>> +(defun org-protocol-capture (info)
>> + "Process an org-protocol://capture:// style url.
>> +
>> The sub-protocol used to reach this function is set in
>> `org-protocol-protocol-alist'.
>>
>> This function detects an URL, title and optional text, separated by '/'
>> The location for a browser's bookmark has to look like this:
>>
>> - javascript:location.href='org-protocol://remember://'+ \\
>> + javascript:location.href='org-protocol://capture://'+ \\
>> encodeURIComponent(location.href)+'/' \\
>> encodeURIComponent(document.title)+'/'+ \\
>> encodeURIComponent(window.getSelection())
>>
>> By default, it uses the character `org-protocol-default-template-key',
>> -which should be associated with a template in `org-remember-
>> templates'.
>> +which should be associated with a template in `org-capture-
>> templates'.
>> But you may prepend the encoded URL with a character and a slash like so:
>>
>> - javascript:location.href='org-protocol://org-store-link://b/'+ ...
>> + javascript:location.href='org-protocol://capture://b/'+ ...
>>
>> Now template ?b will be used."
>> -
>> (if (and (boundp 'org-stored-links)
>> - (fboundp 'org-remember))
>> - (let* ((parts (org-protocol-split-data info t))
>> - (template (or (and (= 1 (length (car parts))) (pop parts))
>> - org-protocol-default-template-key))
>> - (url (org-protocol-sanitize-uri (car parts)))
>> - (type (if (string-match "^\\([a-z]+\\):" url)
>> - (match-string 1 url)))
>> - (title (or (cadr parts) ""))
>> - (region (or (caddr parts) ""))
>> - (orglink (org-make-link-string
>> - url (if (string-match "[^[:space:]]" title) title url)))
>> - remember-annotation-functions)
>> - (setq org-stored-links
>> - (cons (list url title) org-stored-links))
>> - (kill-new orglink)
>> - (org-store-link-props :type type
>> - :link url
>> - :description title
>> - :initial region)
>> - (raise-frame)
>> - (org-remember nil (string-to-char template)))
>> -
>> - (message "Org-mode not loaded."))
>> + (or (fboundp 'org-capture))
>> + (org-protocol-do-capture info 'org-capture))
>> + (message "Org-mode not loaded."))
>> nil)
>>
>> +(defun org-protocol-do-capture (info capture-func)
>> + "Support `org-capture' and `org-remember' alike.
>> +CAPTURE-FUNC is either the symbol `org-remember' or `org-capture'."
>> + (let* ((parts (org-protocol-split-data info t))
>> + (template (or (and (= 1 (length (car parts))) (pop parts))
>> + org-protocol-default-template-key))
>> + (url (org-protocol-sanitize-uri (car parts)))
>> + (type (if (string-match "^\\([a-z]+\\):" url)
>> + (match-string 1 url)))
>> + (title(or (cadr parts) ""))
>> + (region (or (caddr parts) ""))
>> + (orglink (org-make-link-string
>> + url (if (string-match "[^[:space:]]" title) title url)))
>> + remember-annotation-functions)
>> + (setq org-stored-links
>> + (cons (list url title) org-stored-links))
>> + (kill-new orglink)
>> + (org-store-link-props :type type
>> + :link url
>> + :description title
>> + :initial region)
>> + (raise-frame)
>> + (funcall capture-func nil template)))
>> +
>> +
>> (defun org-protocol-open-source (fname)
>> "Process an org-protocol://open-source:// style url.
>>
>>
>>
>>
>> Best wishes
>>
>> Sebastian
>
> - Carsten
>
>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sebastian Rose Fachinformatiker / Anwendungsentwicklung
Viktoriastr. 22 Entwicklung von Anwendungen mit freien Werkzeugen
30451 Hannover und Bibliotheken.
0173 83 93 417 sebastian_rose@gmx.de s.rose@emma-stil.de
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-22 14:29 ` Sebastian Rose
@ 2010-06-22 14:42 ` Carsten Dominik
0 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-22 14:42 UTC (permalink / raw)
To: Sebastian Rose; +Cc: Org Mode
On Jun 22, 2010, at 4:29 PM, Sebastian Rose wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Wooooooooooow, that was incredibly fast!
>>
>> :-)
>>
>> template keys used to be characters, now in org-capture.el they are
>> strings.
>> Does the patch handle this correctly?
>
>
>
> I wondering about that, too. But some nice person changed
> org-remember.el to take care for that (See
> `org-select-remember-template').
Great. Thanks!
- Carsten
>
>
> Sebastian
>
>>
>> - Carsten
>>
>>
>>
>> On Jun 22, 2010, at 4:20 PM, Sebastian Rose wrote:
>>
>>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>>>> 3 Why a new name?
>>>> ~~~~~~~~~~~~~~~~~~
>>>>
>>>> I have - at least for now - chosen a new name for the new setup:
>>>> ` org-capture'. There are two reasons for this:
>>>
>>> In the manual it is "Capture - Refile - Archive". I remember
>>> searching
>>> for "Remember" and never found it :)
>>>
>>>
>>>> 5 Setup
>>>> ~~~~~~~~
>>>>
>>>> To use the new setup, do the following:
>>>>
>>>> 1. Run
>>>>
>>>> M-x org-capture-import-remember-templates RET
>>>
>>> Worked perfectly here :)
>>>
>>> I tested all my important templates and they work.
>>> Abandoning org-remember seems painless.
>>>
>>>
>>>> '(("t" "templates adding table lines")
>>>> ("ta" "add to table a" table-line (file+headline "~/notes.org"
>>>> "Table A))
>>>> ("tb" "add to table b" table-line (file+headline "~/notes.org"
>>>> "Table B))
>>>> ("tc" "add to table c" table-line (file+headline "~/notes.org"
>>>> "Table
>>>> C)))
>>>>
>>>> When starting capture, you can then first press "t" and then see
>>>> the individual options.
>>>
>>> This is great. Number of templates is constantly growing and the
>>> new
>>> features will increase the speed of this process.
>>>
>>>
>>>> 7 Request for comments
>>>> ~~~~~~~~~~~~~~~~~~~~~~~
>>>>
>>>> None of what I describe is set in stone yet - let me know if you
>>>> have
>>>> comments, change requests or other ideas.
>>>>
>>>> My feeling right now is that this should become the default capture
>>>> system, and that we will keep the current org-remember in the
>>>> distribution for quite some time, for compatibility.
>>>
>>>
>>> Good track I guess.
>>>
>>>
>>>
>>>
>>> Here's the tested and working patch for org-protocol.el.
>>>
>>> To use `org-remember' and/or `org-capture' alike, copy your org-
>>> remember
>>> link and change
>>>
>>> javascript:location.href='org-protocol://remember://'+...
>>>
>>> to
>>>
>>> javascript:location.href='org-protocol://capture://'+...
>>>
>>>
>>> The template char used is the same for both --- which is OK for
>>> me, but
>>> could be changed.
>>>
>>>
>>>
>>>
>>> diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
>>> index 0642227..88676f4 100644
>>> --- a/lisp/org-protocol.el
>>> +++ b/lisp/org-protocol.el
>>> @@ -87,12 +87,17 @@
>>> ;; pushes the browsers URL to the `kill-ring' for yanking.
>>> This handler is
>>> ;; triggered through the sub-protocol \"store-link\".
>>> ;;
>>> -;; * Call `org-protocol-remember' by using the sub-protocol
>>> \"remember\".
>>> If
>>> -;; Org-mode is loaded, emacs will pop-up a remember buffer
>>> and fill the
>>> +;; * Call `org-protocol-capture' by using the sub-protocol
>>> \"capture\". If
>>> +;; Org-mode is loaded, emacs will pop-up a capture buffer and
>>> fill the
>>> ;; template with the data provided. I.e. the browser's URL is
>>> inserted as
>>> an
>>> ;; Org-link of which the page title will be the description
>>> part. If text
>>> ;; was select in the browser, that text will be the body of
>>> the entry.
>>> ;;
>>> +;; * Call `org-protocol-remember' by using the sub-protocol
>>> \"remember\".
>>> +;; This is provided for backward compatibility.
>>> +;; You may read `org-capture' as `org-remember' throughout
>>> this file if
>>> +;; you still use `org-remember'.
>>> +;;
>>> ;; You may use the same bookmark URL for all those standard
>>> handlers and just
>>> ;; adjust the sub-protocol used:
>>> ;;
>>> @@ -101,7 +106,7 @@
>>> ;; encodeURIComponent(document.title)+'/'+
>>> ;; encodeURIComponent(window.getSelection())
>>> ;;
>>> -;; The handler for the sub-protocol \"remember\" detects an
>>> optional template
>>> +;; The handler for the sub-protocol \"capture\" detects an
>>> optional template
>>> ;; char that, if present, triggers the use of a special template.
>>> ;; Example:
>>> ;;
>>> @@ -143,6 +148,7 @@ for `org-protocol-the-protocol' and sub-
>>> procols defined in
>>>
>>> (defconst org-protocol-protocol-alist-default
>>> '(("org-remember" :protocol "remember" :function org-
>>> protocol-remember :kill-client t)
>>> + ("org-capture" :protocol "capture" :function org-
>>> protocol-capture :kill-client t)
>>> ("org-store-link" :protocol "store-link" :function org-
>>> protocol-store-link)
>>> ("org-open-source" :protocol "open-source" :function org-
>>> protocol-open-source))
>>> "Default protocols to use.
>>> @@ -260,7 +266,6 @@ Here is an example:
>>> :group 'org-protocol
>>> :type 'string)
>>>
>>> -
>>> ;;; Helper functions:
>>>
>>> (defun org-protocol-sanitize-uri (uri)
>>> @@ -443,51 +448,73 @@ The sub-protocol used to reach this function
>>> is set in
>>> (defun org-protocol-remember (info)
>>> "Process an org-protocol://remember:// style url.
>>>
>>> +The location for a browser's bookmark has to look like this:
>>> +
>>> + javascript:location.href='org-protocol://remember://'+ \\
>>> + encodeURIComponent(location.href)+'/' \\
>>> + encodeURIComponent(document.title)+'/'+ \\
>>> + encodeURIComponent(window.getSelection())
>>> +
>>> +See the docs for `org-protocol-capture' for more information."
>>> +
>>> + (if (and (boundp 'org-stored-links)
>>> + (or (fboundp 'org-capture))
>>> + (org-protocol-do-capture info 'org-remember))
>>> + (message "Org-mode not loaded."))
>>> + nil)
>>> +
>>> +(defun org-protocol-capture (info)
>>> + "Process an org-protocol://capture:// style url.
>>> +
>>> The sub-protocol used to reach this function is set in
>>> `org-protocol-protocol-alist'.
>>>
>>> This function detects an URL, title and optional text, separated
>>> by '/'
>>> The location for a browser's bookmark has to look like this:
>>>
>>> - javascript:location.href='org-protocol://remember://'+ \\
>>> + javascript:location.href='org-protocol://capture://'+ \\
>>> encodeURIComponent(location.href)+'/' \\
>>> encodeURIComponent(document.title)+'/'+ \\
>>> encodeURIComponent(window.getSelection())
>>>
>>> By default, it uses the character `org-protocol-default-template-
>>> key',
>>> -which should be associated with a template in `org-remember-
>>> templates'.
>>> +which should be associated with a template in `org-capture-
>>> templates'.
>>> But you may prepend the encoded URL with a character and a slash
>>> like so:
>>>
>>> - javascript:location.href='org-protocol://org-store-link://
>>> b/'+ ...
>>> + javascript:location.href='org-protocol://capture://b/'+ ...
>>>
>>> Now template ?b will be used."
>>> -
>>> (if (and (boundp 'org-stored-links)
>>> - (fboundp 'org-remember))
>>> - (let* ((parts (org-protocol-split-data info t))
>>> - (template (or (and (= 1 (length (car parts))) (pop
>>> parts))
>>> - org-protocol-default-template-key))
>>> - (url (org-protocol-sanitize-uri (car parts)))
>>> - (type (if (string-match "^\\([a-z]+\\):" url)
>>> - (match-string 1 url)))
>>> - (title (or (cadr parts) ""))
>>> - (region (or (caddr parts) ""))
>>> - (orglink (org-make-link-string
>>> - url (if (string-match "[^[:space:]]" title) title url)))
>>> - remember-annotation-functions)
>>> - (setq org-stored-links
>>> - (cons (list url title) org-stored-links))
>>> - (kill-new orglink)
>>> - (org-store-link-props :type type
>>> - :link url
>>> - :description title
>>> - :initial region)
>>> - (raise-frame)
>>> - (org-remember nil (string-to-char template)))
>>> -
>>> - (message "Org-mode not loaded."))
>>> + (or (fboundp 'org-capture))
>>> + (org-protocol-do-capture info 'org-capture))
>>> + (message "Org-mode not loaded."))
>>> nil)
>>>
>>> +(defun org-protocol-do-capture (info capture-func)
>>> + "Support `org-capture' and `org-remember' alike.
>>> +CAPTURE-FUNC is either the symbol `org-remember' or `org-capture'."
>>> + (let* ((parts (org-protocol-split-data info t))
>>> + (template (or (and (= 1 (length (car parts))) (pop parts))
>>> + org-protocol-default-template-key))
>>> + (url (org-protocol-sanitize-uri (car parts)))
>>> + (type (if (string-match "^\\([a-z]+\\):" url)
>>> + (match-string 1 url)))
>>> + (title(or (cadr parts) ""))
>>> + (region (or (caddr parts) ""))
>>> + (orglink (org-make-link-string
>>> + url (if (string-match "[^[:space:]]" title) title url)))
>>> + remember-annotation-functions)
>>> + (setq org-stored-links
>>> + (cons (list url title) org-stored-links))
>>> + (kill-new orglink)
>>> + (org-store-link-props :type type
>>> + :link url
>>> + :description title
>>> + :initial region)
>>> + (raise-frame)
>>> + (funcall capture-func nil template)))
>>> +
>>> +
>>> (defun org-protocol-open-source (fname)
>>> "Process an org-protocol://open-source:// style url.
>>>
>>>
>>>
>>>
>>> Best wishes
>>>
>>> Sebastian
>>
>> - Carsten
>>
>>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Sebastian Rose Fachinformatiker / Anwendungsentwicklung
> Viktoriastr. 22 Entwicklung von Anwendungen mit freien Werkzeugen
> 30451 Hannover und Bibliotheken.
>
> 0173 83 93 417 sebastian_rose@gmx.de s.rose@emma-stil.de
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-22 14:20 ` [Patch] " Sebastian Rose
2010-06-22 14:25 ` Carsten Dominik
@ 2010-06-22 14:26 ` Carsten Dominik
2010-06-22 14:27 ` Carsten Dominik
` (2 subsequent siblings)
4 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-22 14:26 UTC (permalink / raw)
To: Sebastian Rose; +Cc: Org Mode
On Jun 22, 2010, at 4:20 PM, Sebastian Rose wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>> 3 Why a new name?
>> ~~~~~~~~~~~~~~~~~~
>>
>> I have - at least for now - chosen a new name for the new setup:
>> ` org-capture'. There are two reasons for this:
>
> In the manual it is "Capture - Refile - Archive". I remember
> searching
> for "Remember" and never found it :)
:-) Capture was meant to cover remember and attachments - but I guess
it is also a good general name.
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-22 14:20 ` [Patch] " Sebastian Rose
2010-06-22 14:25 ` Carsten Dominik
2010-06-22 14:26 ` Carsten Dominik
@ 2010-06-22 14:27 ` Carsten Dominik
2010-06-23 9:38 ` Ulf Stegemann
2010-06-23 14:06 ` Carsten Dominik
4 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-22 14:27 UTC (permalink / raw)
To: Sebastian Rose; +Cc: Org Mode
On Jun 22, 2010, at 4:20 PM, Sebastian Rose wrote:
>
>
>> '(("t" "templates adding table lines")
>> ("ta" "add to table a" table-line (file+headline "~/notes.org"
>> "Table A))
>> ("tb" "add to table b" table-line (file+headline "~/notes.org"
>> "Table B))
>> ("tc" "add to table c" table-line (file+headline "~/notes.org"
>> "Table C)))
>>
>> When starting capture, you can then first press "t" and then see
>> the individual options.
>
> This is great. Number of templates is constantly growing and the new
> features will increase the speed of this process.
And if two keys are not enough, you can always use 3, 4, ... keys,
this works without problems, I believe.
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-22 14:20 ` [Patch] " Sebastian Rose
` (2 preceding siblings ...)
2010-06-22 14:27 ` Carsten Dominik
@ 2010-06-23 9:38 ` Ulf Stegemann
2010-06-23 10:29 ` Sebastian Rose
2010-06-23 14:06 ` Carsten Dominik
4 siblings, 1 reply; 67+ messages in thread
From: Ulf Stegemann @ 2010-06-23 9:38 UTC (permalink / raw)
To: emacs-orgmode
Hi Carsten, Sebastian,
just tried the new capture mechanism and it works quiet fine. I like it
a lot. Thanks for the work :)
However ...
Sebastian Rose <sebastian_rose@gmx.de> wrote:
> Here's the tested and working patch for org-protocol.el.
... it seems that with `org-protocol-capture' the place holders
`%:link', `%:description' and `%:initial' do not work anymore as they
are inserted literally. I must admit that I haven't looked at my
templates for a very long time and that those place holders may be
outdated, but with `org-protocol-remember' at least `%:description'
still works.
Ulf
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-23 9:38 ` Ulf Stegemann
@ 2010-06-23 10:29 ` Sebastian Rose
2010-06-23 11:28 ` Carsten Dominik
2010-06-23 12:21 ` Ulf Stegemann
0 siblings, 2 replies; 67+ messages in thread
From: Sebastian Rose @ 2010-06-23 10:29 UTC (permalink / raw)
To: Ulf Stegemann; +Cc: emacs-orgmode
Ulf Stegemann <ulf-news@zeitform.de> writes:
> Hi Carsten, Sebastian,
>
> just tried the new capture mechanism and it works quiet fine. I like it
> a lot. Thanks for the work :)
>
> However ...
>
> Sebastian Rose <sebastian_rose@gmx.de> wrote:
>
>> Here's the tested and working patch for org-protocol.el.
>
> ... it seems that with `org-protocol-capture' the place holders
> `%:link', `%:description' and `%:initial' do not work anymore as they
> are inserted literally. I must admit that I haven't looked at my
> templates for a very long time and that those place holders may be
> outdated, but with `org-protocol-remember' at least `%:description'
> still works.
>
> Ulf
Did those placeholders ever work through org-protocol?
How exactly where they meant to work?
Did you convert your remember-templates before testing?
Or did you just copy/rename your `org-remeber-templates' variable to
`org-capture-templates'?
In the new variable `org-capture-templates', these placeholders are not
guarantied to work (at least not documented).
Use
%c - this will be a link to the page in your browser
%i - this will be the selected text in your browser, if any. This is,
what `%:initial' was I guess.
%a - same as %c
Does that work for you?
Best wishes
Sebastian
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-23 10:29 ` Sebastian Rose
@ 2010-06-23 11:28 ` Carsten Dominik
2010-06-23 12:21 ` Ulf Stegemann
1 sibling, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 11:28 UTC (permalink / raw)
To: Sebastian Rose; +Cc: emacs-orgmode, Ulf Stegemann
On Jun 23, 2010, at 12:29 PM, Sebastian Rose wrote:
> Ulf Stegemann <ulf-news@zeitform.de> writes:
>> Hi Carsten, Sebastian,
>>
>> just tried the new capture mechanism and it works quiet fine. I
>> like it
>> a lot. Thanks for the work :)
>>
>> However ...
>>
>> Sebastian Rose <sebastian_rose@gmx.de> wrote:
>>
>>> Here's the tested and working patch for org-protocol.el.
>>
>> ... it seems that with `org-protocol-capture' the place holders
>> `%:link', `%:description' and `%:initial' do not work anymore as they
>> are inserted literally. I must admit that I haven't looked at my
>> templates for a very long time and that those place holders may be
>> outdated, but with `org-protocol-remember' at least `%:description'
>> still works.
>>
>> Ulf
>
> Did those placeholders ever work through org-protocol?
>
> How exactly where they meant to work?
I think they *should* work. You install them into the store-link
property list,
and org-capture tries to pull them out.
But I might have made a mistake - will look later.
- Carsten
>
> Did you convert your remember-templates before testing?
> Or did you just copy/rename your `org-remeber-templates' variable to
> `org-capture-templates'?
>
>
> In the new variable `org-capture-templates', these placeholders are
> not
> guarantied to work (at least not documented).
>
> Use
> %c - this will be a link to the page in your browser
> %i - this will be the selected text in your browser, if any. This
> is,
> what `%:initial' was I guess.
> %a - same as %c
>
>
> Does that work for you?
>
>
> Best wishes
>
> Sebastian
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-23 10:29 ` Sebastian Rose
2010-06-23 11:28 ` Carsten Dominik
@ 2010-06-23 12:21 ` Ulf Stegemann
2010-06-23 12:49 ` Sebastian Rose
1 sibling, 1 reply; 67+ messages in thread
From: Ulf Stegemann @ 2010-06-23 12:21 UTC (permalink / raw)
To: emacs-orgmode
Hi Sebastian,
Sebastian Rose <sebastian_rose@gmx.de> wrote:
> Ulf Stegemann <ulf-news@zeitform.de> writes:
>
>> ... it seems that with `org-protocol-capture' the place holders
>> `%:link', `%:description' and `%:initial' do not work anymore as they
>> are inserted literally. I must admit that I haven't looked at my
>> templates for a very long time and that those place holders may be
>> outdated, but with `org-protocol-remember' at least `%:description'
>> still works.
>
> Did those placeholders ever work through org-protocol?
I re-tried with `org-protocol-remember' and yes, all of the placeholders
work there.
> How exactly where they meant to work?
In exactly the way they are described in the documentation, e.g. at
http://orgmode.org/worg/org-contrib/org-protocol.php#sec-6_2.
My (remember) template looks like ...
--8<--------------------------snip-------------------------->8---
("URLs" ?u "* TODO %:description\n (created: %U)\n\n %c\n\n %i"
"todo.org" bottom)
--8<--------------------------snap-------------------------->8---
> Did you convert your remember-templates before testing?
> Or did you just copy/rename your `org-remeber-templates' variable to
> `org-capture-templates'?
No, I used `org-capture-import-remember-templates' to get the initial
set of templates. All other templates work without problems.
> In the new variable `org-capture-templates', these placeholders are not
> guarantied to work (at least not documented).
>
> Use
> %c - this will be a link to the page in your browser
%c is working as expected, i.e. it creates a link with the page title as
label. BTW, %x contains exactly the same and not (as I thought) the
selected text.
> %i - this will be the selected text in your browser, if any. This is,
> what `%:initial' was I guess.
> %a - same as %c
Those two do not output anything.
Currently, I use a minimal template with more or less only %c. However,
it would be nice to have access to
- page title (w/o link)
- page URL
- selected text
Do you need some more information? Should I do some further testing?
Ulf
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-23 12:21 ` Ulf Stegemann
@ 2010-06-23 12:49 ` Sebastian Rose
2010-06-23 14:22 ` Carsten Dominik
0 siblings, 1 reply; 67+ messages in thread
From: Sebastian Rose @ 2010-06-23 12:49 UTC (permalink / raw)
To: Ulf Stegemann; +Cc: emacs-orgmode
Ulf Stegemann <ulf-news@zeitform.de> writes:
> Do you need some more information? Should I do some further testing?
>
> Ulf
Errr - No. Thanks for testing. I tried again and found, that those
values are not present (only the link). Sorry for the inconvenience.
I guess you read Carstens answer, too.
Sebastian
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-23 12:49 ` Sebastian Rose
@ 2010-06-23 14:22 ` Carsten Dominik
2010-06-23 14:42 ` Sebastian Rose
0 siblings, 1 reply; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 14:22 UTC (permalink / raw)
To: Sebastian Rose; +Cc: emacs-orgmode, Ulf Stegemann
On Jun 23, 2010, at 2:49 PM, Sebastian Rose wrote:
> Ulf Stegemann <ulf-news@zeitform.de> writes:
>> Do you need some more information? Should I do some further testing?
>>
>> Ulf
>
> Errr - No. Thanks for testing. I tried again and found, that those
> values are not present (only the link). Sorry for the inconvenience.
>
> I guess you read Carstens answer, too.
Hi Ulf, hi Sebastian,
I have not tested it, but I think this problem should be fixed now as
well.
Cheers
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-22 14:20 ` [Patch] " Sebastian Rose
` (3 preceding siblings ...)
2010-06-23 9:38 ` Ulf Stegemann
@ 2010-06-23 14:06 ` Carsten Dominik
4 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 14:06 UTC (permalink / raw)
To: Sebastian Rose; +Cc: Org Mode
I have applied this patch, thanks.
- Carsten
On Jun 22, 2010, at 4:20 PM, Sebastian Rose wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>> 3 Why a new name?
>> ~~~~~~~~~~~~~~~~~~
>>
>> I have - at least for now - chosen a new name for the new setup:
>> ` org-capture'. There are two reasons for this:
>
> In the manual it is "Capture - Refile - Archive". I remember
> searching
> for "Remember" and never found it :)
>
>
>> 5 Setup
>> ~~~~~~~~
>>
>> To use the new setup, do the following:
>>
>> 1. Run
>>
>> M-x org-capture-import-remember-templates RET
>
> Worked perfectly here :)
>
> I tested all my important templates and they work.
> Abandoning org-remember seems painless.
>
>
>> '(("t" "templates adding table lines")
>> ("ta" "add to table a" table-line (file+headline "~/notes.org"
>> "Table A))
>> ("tb" "add to table b" table-line (file+headline "~/notes.org"
>> "Table B))
>> ("tc" "add to table c" table-line (file+headline "~/notes.org"
>> "Table C)))
>>
>> When starting capture, you can then first press "t" and then see
>> the individual options.
>
> This is great. Number of templates is constantly growing and the new
> features will increase the speed of this process.
>
>
>> 7 Request for comments
>> ~~~~~~~~~~~~~~~~~~~~~~~
>>
>> None of what I describe is set in stone yet - let me know if you have
>> comments, change requests or other ideas.
>>
>> My feeling right now is that this should become the default capture
>> system, and that we will keep the current org-remember in the
>> distribution for quite some time, for compatibility.
>
>
> Good track I guess.
>
>
>
>
> Here's the tested and working patch for org-protocol.el.
>
> To use `org-remember' and/or `org-capture' alike, copy your org-
> remember
> link and change
>
> javascript:location.href='org-protocol://remember://'+...
>
> to
>
> javascript:location.href='org-protocol://capture://'+...
>
>
> The template char used is the same for both --- which is OK for me,
> but
> could be changed.
>
>
>
>
> diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
> index 0642227..88676f4 100644
> --- a/lisp/org-protocol.el
> +++ b/lisp/org-protocol.el
> @@ -87,12 +87,17 @@
> ;; pushes the browsers URL to the `kill-ring' for yanking. This
> handler is
> ;; triggered through the sub-protocol \"store-link\".
> ;;
> -;; * Call `org-protocol-remember' by using the sub-protocol
> \"remember\". If
> -;; Org-mode is loaded, emacs will pop-up a remember buffer and
> fill the
> +;; * Call `org-protocol-capture' by using the sub-protocol
> \"capture\". If
> +;; Org-mode is loaded, emacs will pop-up a capture buffer and
> fill the
> ;; template with the data provided. I.e. the browser's URL is
> inserted as an
> ;; Org-link of which the page title will be the description
> part. If text
> ;; was select in the browser, that text will be the body of the
> entry.
> ;;
> +;; * Call `org-protocol-remember' by using the sub-protocol
> \"remember\".
> +;; This is provided for backward compatibility.
> +;; You may read `org-capture' as `org-remember' throughout this
> file if
> +;; you still use `org-remember'.
> +;;
> ;; You may use the same bookmark URL for all those standard handlers
> and just
> ;; adjust the sub-protocol used:
> ;;
> @@ -101,7 +106,7 @@
> ;; encodeURIComponent(document.title)+'/'+
> ;; encodeURIComponent(window.getSelection())
> ;;
> -;; The handler for the sub-protocol \"remember\" detects an
> optional template
> +;; The handler for the sub-protocol \"capture\" detects an optional
> template
> ;; char that, if present, triggers the use of a special template.
> ;; Example:
> ;;
> @@ -143,6 +148,7 @@ for `org-protocol-the-protocol' and sub-procols
> defined in
>
> (defconst org-protocol-protocol-alist-default
> '(("org-remember" :protocol "remember" :function org-
> protocol-remember :kill-client t)
> + ("org-capture" :protocol "capture" :function org-
> protocol-capture :kill-client t)
> ("org-store-link" :protocol "store-link" :function org-
> protocol-store-link)
> ("org-open-source" :protocol "open-source" :function org-
> protocol-open-source))
> "Default protocols to use.
> @@ -260,7 +266,6 @@ Here is an example:
> :group 'org-protocol
> :type 'string)
>
> -
> ;;; Helper functions:
>
> (defun org-protocol-sanitize-uri (uri)
> @@ -443,51 +448,73 @@ The sub-protocol used to reach this function
> is set in
> (defun org-protocol-remember (info)
> "Process an org-protocol://remember:// style url.
>
> +The location for a browser's bookmark has to look like this:
> +
> + javascript:location.href='org-protocol://remember://'+ \\
> + encodeURIComponent(location.href)+'/' \\
> + encodeURIComponent(document.title)+'/'+ \\
> + encodeURIComponent(window.getSelection())
> +
> +See the docs for `org-protocol-capture' for more information."
> +
> + (if (and (boundp 'org-stored-links)
> + (or (fboundp 'org-capture))
> + (org-protocol-do-capture info 'org-remember))
> + (message "Org-mode not loaded."))
> + nil)
> +
> +(defun org-protocol-capture (info)
> + "Process an org-protocol://capture:// style url.
> +
> The sub-protocol used to reach this function is set in
> `org-protocol-protocol-alist'.
>
> This function detects an URL, title and optional text, separated by
> '/'
> The location for a browser's bookmark has to look like this:
>
> - javascript:location.href='org-protocol://remember://'+ \\
> + javascript:location.href='org-protocol://capture://'+ \\
> encodeURIComponent(location.href)+'/' \\
> encodeURIComponent(document.title)+'/'+ \\
> encodeURIComponent(window.getSelection())
>
> By default, it uses the character `org-protocol-default-template-key',
> -which should be associated with a template in `org-remember-
> templates'.
> +which should be associated with a template in `org-capture-
> templates'.
> But you may prepend the encoded URL with a character and a slash
> like so:
>
> - javascript:location.href='org-protocol://org-store-link://b/'+ ...
> + javascript:location.href='org-protocol://capture://b/'+ ...
>
> Now template ?b will be used."
> -
> (if (and (boundp 'org-stored-links)
> - (fboundp 'org-remember))
> - (let* ((parts (org-protocol-split-data info t))
> - (template (or (and (= 1 (length (car parts))) (pop
> parts))
> - org-protocol-default-template-key))
> - (url (org-protocol-sanitize-uri (car parts)))
> - (type (if (string-match "^\\([a-z]+\\):" url)
> - (match-string 1 url)))
> - (title (or (cadr parts) ""))
> - (region (or (caddr parts) ""))
> - (orglink (org-make-link-string
> - url (if (string-match "[^[:space:]]" title) title url)))
> - remember-annotation-functions)
> - (setq org-stored-links
> - (cons (list url title) org-stored-links))
> - (kill-new orglink)
> - (org-store-link-props :type type
> - :link url
> - :description title
> - :initial region)
> - (raise-frame)
> - (org-remember nil (string-to-char template)))
> -
> - (message "Org-mode not loaded."))
> + (or (fboundp 'org-capture))
> + (org-protocol-do-capture info 'org-capture))
> + (message "Org-mode not loaded."))
> nil)
>
> +(defun org-protocol-do-capture (info capture-func)
> + "Support `org-capture' and `org-remember' alike.
> +CAPTURE-FUNC is either the symbol `org-remember' or `org-capture'."
> + (let* ((parts (org-protocol-split-data info t))
> + (template (or (and (= 1 (length (car parts))) (pop parts))
> + org-protocol-default-template-key))
> + (url (org-protocol-sanitize-uri (car parts)))
> + (type (if (string-match "^\\([a-z]+\\):" url)
> + (match-string 1 url)))
> + (title(or (cadr parts) ""))
> + (region (or (caddr parts) ""))
> + (orglink (org-make-link-string
> + url (if (string-match "[^[:space:]]" title) title url)))
> + remember-annotation-functions)
> + (setq org-stored-links
> + (cons (list url title) org-stored-links))
> + (kill-new orglink)
> + (org-store-link-props :type type
> + :link url
> + :description title
> + :initial region)
> + (raise-frame)
> + (funcall capture-func nil template)))
> +
> +
> (defun org-protocol-open-source (fname)
> "Process an org-protocol://open-source:// style url.
>
>
>
>
> Best wishes
>
> Sebastian
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
2010-06-22 14:08 ` Sébastien Vauban
2010-06-22 14:20 ` [Patch] " Sebastian Rose
@ 2010-06-22 18:58 ` Tassilo Horn
2010-06-23 3:59 ` Carsten Dominik
2010-06-22 19:26 ` Eric S Fraga
` (11 subsequent siblings)
14 siblings, 1 reply; 67+ messages in thread
From: Tassilo Horn @ 2010-06-22 18:58 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik <carsten.dominik@gmail.com> writes:
Hi Carsten,
> 1. Run
>
> M-x org-capture-import-remember-templates RET
That didn't work completely for me. It generated entries like
("t" "TODO" entry
(file+headline "/home/horn/repos/org/remember.org" bottom)
"* TODO %?\n %i")
but capturing expected a string, not the symbol 'bottom. I corrected it
manually to
("t" "TODO" entry
(file "/home/horn/repos/org/remember.org")
"* TODO %?\n %i")
which also refiles to the bottom of my remember file and is even
simpler.
I like it! It looks good and is easy to use. And I vote for keeping the
new name.
Thanks a ton!
Tassilo
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 18:58 ` Tassilo Horn
@ 2010-06-23 3:59 ` Carsten Dominik
2010-06-23 6:31 ` Tassilo Horn
0 siblings, 1 reply; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 3:59 UTC (permalink / raw)
To: Tassilo Horn; +Cc: emacs-orgmode
Hi Tassilo,
On Jun 22, 2010, at 8:58 PM, Tassilo Horn wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
> Hi Carsten,
>
>> 1. Run
>>
>> M-x org-capture-import-remember-templates RET
>
> That didn't work completely for me. It generated entries like
>
> ("t" "TODO" entry
> (file+headline "/home/horn/repos/org/remember.org" bottom)
> "* TODO %?\n %i")
I cannot reproduce this. Could you please show me what the
corresponding remember template was?
Thanks!
- Carsten
>
> but capturing expected a string, not the symbol 'bottom. I
> corrected it
> manually to
>
> ("t" "TODO" entry
> (file "/home/horn/repos/org/remember.org")
> "* TODO %?\n %i")
>
> which also refiles to the bottom of my remember file and is even
> simpler.
>
> I like it! It looks good and is easy to use. And I vote for keeping
> the
> new name.
>
> Thanks a ton!
> Tassilo
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Re: New implementation of the Org remember process ready for comments and testing
2010-06-23 3:59 ` Carsten Dominik
@ 2010-06-23 6:31 ` Tassilo Horn
2010-06-23 6:44 ` Carsten Dominik
0 siblings, 1 reply; 67+ messages in thread
From: Tassilo Horn @ 2010-06-23 6:31 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
On Wednesday 23 June 2010 05:59:54 Carsten Dominik wrote:
Hi Carsten,
> >> M-x org-capture-import-remember-templates RET
> >
> > That didn't work completely for me. It generated entries like
> >
> > ("t" "TODO" entry
> > (file+headline "/home/horn/repos/org/remember.org" bottom)
> > "* TODO %?\n %i")
>
> I cannot reproduce this. Could you please show me what the
> corresponding remember template was?
Sure. My remember settings were those:
--8<---------------cut here---------------start------------->8---
(org-remember-insinuate)
(setq org-default-notes-file (expand-file-name "remember.org" org-directory)
org-remember-default-headline 'bottom
org-remember-templates
'(("NORMAL" ?n "* %?
:PROPERTIES:
:created: %U
:link: %a
:END:
%i")
("TODO" ?t "* TODO %?
:PROPERTIES:
:created: %U
:link: %a
:END:
%i")
("IDEA" ?i "* IDEA %?
:PROPERTIES:
:created: %U
:link: %a
:END:
%i")
("BROWSER" ?w "* %:description :browser:
:PROPERTIES:
:created: %U
:link: %:link
:END:
%c
%i")))
(setq org-remember-store-without-prompt t
org-remember-backup-directory "~/tmp/")
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Re: New implementation of the Org remember process ready for comments and testing
2010-06-23 6:31 ` Tassilo Horn
@ 2010-06-23 6:44 ` Carsten Dominik
0 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 6:44 UTC (permalink / raw)
To: Tassilo Horn; +Cc: emacs-orgmode
On Jun 23, 2010, at 8:31 AM, Tassilo Horn wrote:
> On Wednesday 23 June 2010 05:59:54 Carsten Dominik wrote:
>
> Hi Carsten,
>
>>>> M-x org-capture-import-remember-templates RET
>>>
>>> That didn't work completely for me. It generated entries like
>>>
>>> ("t" "TODO" entry
>>> (file+headline "/home/horn/repos/org/remember.org" bottom)
>>> "* TODO %?\n %i")
>>
>> I cannot reproduce this. Could you please show me what the
>> corresponding remember template was?
>
> Sure. My remember settings were those:
>
> --8<---------------cut here---------------start------------->8---
> (org-remember-insinuate)
>
> (setq org-default-notes-file (expand-file-name "remember.org" org-
> directory)
> org-remember-default-headline 'bottom
Ah, you set the default headline in this way? I did not even know
that this
would work.
OK, the importer should be able to handle this case now.
Cheers
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
` (2 preceding siblings ...)
2010-06-22 18:58 ` Tassilo Horn
@ 2010-06-22 19:26 ` Eric S Fraga
2010-06-23 7:53 ` Ian Barton
2010-06-22 20:50 ` Bernt Hansen
` (10 subsequent siblings)
14 siblings, 1 reply; 67+ messages in thread
From: Eric S Fraga @ 2010-06-22 19:26 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
On Tue, 22 Jun 2010 14:36:15 +0200, Carsten Dominik <carsten.dominik@gmail.com> wrote:
[...]
> 1. Run
>
> M-x org-capture-import-remember-templates RET
>
> to get a translated version of your remember templates into the
> new variable `org-capture-templates'. This will "mostly" work,
> but maybe not for all cases. At least it will give you a good
> place to modify your templates. The customize interface is the
> best way to work with this complex variable.
This doesn't work for me. I get:
,----
| Import old remember templates into org-capture-templates? (y or n)
| Note that this will remove any templates currently defined in
| `org-capture-templates'. Do you still want to go ahead? (y or n)
| list: Symbol's value as variable is void: org-remember-default-headline
`----
Org-mode version 6.36trans (release_6.36.299.g80bca)
GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-05-16 on raven, modified by Debian
What am I missing?
Thanks,
eric
[-- Attachment #2: Type: text/plain, Size: 75 bytes --]
--
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D
[-- Attachment #3: 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] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 19:26 ` Eric S Fraga
@ 2010-06-23 7:53 ` Ian Barton
0 siblings, 0 replies; 67+ messages in thread
From: Ian Barton @ 2010-06-23 7:53 UTC (permalink / raw)
To: Eric S Fraga; +Cc: Eric S Fraga, Org Mode, Carsten Dominik
>
>> 1. Run
>>
>> M-x org-capture-import-remember-templates RET
>>
>> to get a translated version of your remember templates into the
>> new variable `org-capture-templates'. This will "mostly" work,
>> but maybe not for all cases. At least it will give you a good
>> place to modify your templates. The customize interface is the
>> best way to work with this complex variable.
>
> This doesn't work for me. I get:
>
> ,----
> | Import old remember templates into org-capture-templates? (y or n)
> | Note that this will remove any templates currently defined in
> | `org-capture-templates'. Do you still want to go ahead? (y or n)
> | list: Symbol's value as variable is void: org-remember-default-headline
> `----
>
Eric,
I got this too. I worked around it by setting:
(setq org-remember-default-headline "Tasks")
Since I explicitly set headlines in my templates, this didn't seem to
have any harmful side effects.
Ian.
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
` (3 preceding siblings ...)
2010-06-22 19:26 ` Eric S Fraga
@ 2010-06-22 20:50 ` Bernt Hansen
2010-06-22 23:15 ` Sebastian Rose
2010-06-23 4:35 ` Carsten Dominik
2010-06-22 23:07 ` Sebastian Rose
` (9 subsequent siblings)
14 siblings, 2 replies; 67+ messages in thread
From: Bernt Hansen @ 2010-06-22 20:50 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> New implementation of the Org remember process
> ==============================================
Cool!!
> 6.4 Multiple capture events going on at the same time
> ======================================================
>
> If you need to capture something while already capturing something
> else, you can now do so. Finishing the second process will
> automatically return you to the window setup of the first one.
>
> Bernt, this might lead to confusing results if you would try to
> port your immediate clock-in, clock-out code. It will probably be
> better (if you decide at all to try the new code) to use the
> built-in :clock-in and :clock-resume properties:
>
> These will even work for a chain: start capture 1, then 2, then 3,
> finalize 3, then 2, then 1, and the previous clock will be
> restarted each time. Only when you finish the captures in a
> different sequence, then the clock-resume stuff will lead to
> undefined results.
This all sounds really good. I look forward to test driving it when I
have some extra time to tinker with my setup. I really appreciate the
effort you went through to keep the existing remember process so that I
can try these in parallel -- this will make me try it much sooner than I
would otherwise. It's too disruptive to switch the entire remember
process and have things break and no way to continue in a reasonable
amount of time.
The auto-clocking functionality sounds great. I'll let you know how
that works out.
My current setup with auto-clocking remember buffers seems to break the
old remember system a little - switching remember templates while the
clock is running gets it all confused so I just kill (C-c C-k) then
restart remember if I need a different template.
Great works!!
Regards,
Bernt
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 20:50 ` Bernt Hansen
@ 2010-06-22 23:15 ` Sebastian Rose
2010-06-23 4:35 ` Carsten Dominik
1 sibling, 0 replies; 67+ messages in thread
From: Sebastian Rose @ 2010-06-22 23:15 UTC (permalink / raw)
To: Bernt Hansen; +Cc: Org Mode, Carsten Dominik
Bernt Hansen <bernt@norang.ca> writes:
> This all sounds really good. I look forward to test driving it when I
> have some extra time to tinker with my setup. I really appreciate the
> effort you went through to keep the existing remember process so that I
> can try these in parallel -- this will make me try it much sooner than I
> would otherwise.
Yes - and it IS really easy, since you may keep your entire remember
setup, convert your templates and simply call `org-capture' to test
org-capture, and `org-remember' for your critical stuff.
I used the provided function to convert the templates, cut the results
out of my .emacs and put them in my Org-setup.
There I can easy test and modify single templates.
> The auto-clocking functionality sounds great. I'll let you know how
> that works out.
I tried that a bit and it seems to work. It's so simple to customize
that feature now.
Best wishes
Sebastian
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 20:50 ` Bernt Hansen
2010-06-22 23:15 ` Sebastian Rose
@ 2010-06-23 4:35 ` Carsten Dominik
1 sibling, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 4:35 UTC (permalink / raw)
To: Bernt Hansen; +Cc: Org Mode
On Jun 22, 2010, at 10:50 PM, Bernt Hansen wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> New implementation of the Org remember process
>> ==============================================
>
> Cool!!
>
>> 6.4 Multiple capture events going on at the same time
>> ======================================================
>>
>> If you need to capture something while already capturing something
>> else, you can now do so. Finishing the second process will
>> automatically return you to the window setup of the first one.
>>
>> Bernt, this might lead to confusing results if you would try to
>> port your immediate clock-in, clock-out code. It will probably be
>> better (if you decide at all to try the new code) to use the
>> built-in :clock-in and :clock-resume properties:
>>
>> These will even work for a chain: start capture 1, then 2, then 3,
>> finalize 3, then 2, then 1, and the previous clock will be
>> restarted each time. Only when you finish the captures in a
>> different sequence, then the clock-resume stuff will lead to
>> undefined results.
>
> This all sounds really good. I look forward to test driving it when I
> have some extra time to tinker with my setup. I really appreciate the
> effort you went through to keep the existing remember process so
> that I
> can try these in parallel -- this will make me try it much sooner
> than I
> would otherwise. It's too disruptive to switch the entire remember
> process and have things break and no way to continue in a reasonable
> amount of time.
>
> The auto-clocking functionality sounds great. I'll let you know how
> that works out.
>
> My current setup with auto-clocking remember buffers seems to break
> the
> old remember system a little - switching remember templates while the
> clock is running gets it all confused so I just kill (C-c C-k) then
> restart remember if I need a different template.
Yes. But template switching is no longer supported in org-capture.el
either.
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
` (4 preceding siblings ...)
2010-06-22 20:50 ` Bernt Hansen
@ 2010-06-22 23:07 ` Sebastian Rose
2010-06-22 23:32 ` [Patch] " Sebastian Rose
` (2 more replies)
2010-06-22 23:56 ` New implementation of the Org remember process ready for comments and testing Sebastian Rose
` (8 subsequent siblings)
14 siblings, 3 replies; 67+ messages in thread
From: Sebastian Rose @ 2010-06-22 23:07 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> None of what I describe is set in stone yet - let me know if you have
> comments, change requests or other ideas.
>
> My feeling right now is that this should become the default capture
> system, and that we will keep the current org-remember in the
> distribution for quite some time, for compatibility.
* "C" as template key
C-h v org-catpure-templates
states:
Do not use "C" as a key, it is reserved for customizing the
template variable.
I guess this is for the testing phase only?
* Reuse input
I would like to prompt for a value and use the input in several
places. E.g. part of the last entry in my training diary looks like
this:
=> --->8----------------------------->8----------------------------->8---
***** DONE [2010-06-21 Mo] (run) 22761 5:52
:PROPERTIES:
:date: [2010-06-21 Mo]
:meters: 22761
:time: 02:13:32
:pace: 5:52
:start: 16:00
:type: lgDL
:kcal: 1525
:rpuls: 42
:END:
******* Weather
...
******* Track
... where ...
******* Training
... splits, training contents ...
******* Comment
... feeling, health etc...
<= ---8<-----------------------------8<-----------------------------8<---
As you can see, I use the "distance" and the "pace" in two
places. One in the title for better overview, one as property for
column view. But I'd like to enter it only once.
* Separate template files
I'd like to use Org-mode to edit templates.
I'm trying this:
(setq org-capture-templates
(
`(
("l" "Lauf" entry (file+headline "notes/Laufen/Training.org" "Training")
,(org-file-contents "~/emacs/org/capture-templates/training.org")
:empty-lines 1))))
But I get an error when calling `org-capture':
Debugger entered--Lisp error: (wrong-type-argument listp "* DONE %u (%^{Type:}) %^{Distance:} x:xx
:PROPERTIES:
:date: %u
:meters:
:time:
:pace: x:xx
:start:
:type:
:kcal: xxx
:rpuls:
:END: %^{meters}p %^{start}p %^{time}p %^{type}p %x^{rpuls}p
*** Wetter
%?
*** Strecke
*** Trainingsinhalt
*** Kommentar
")
length(("l" "Lauf" entry (file+headline "notes/Laufen/Training.org" "Training") . "* DONE %u (%^{Type:}) %^{Distance:} x:xx\n :PROPERTIES:\n :date: %u\n :meters:\n :time:\n :pace: x:xx\n :start:\n :type:\n :kcal: xxx\n :rpuls:\n :END: %^{meters}p %^{start}p %^{time}p %^{type}p %x^{rpuls}p\n*** Wetter\n %?\n\n*** Strecke\n\n*** Trainingsinhalt\n\n*** Kommentar\n"))
(= 2 (length (car tbl)))
(and (= 2 (length ...)) (= (length ...) 1))
(cond ((and ... ...) (setq dkey ... ddesc ...) (pop tbl) (push dkey des-keys) (push dkey allowed-keys) (insert prefix "[" dkey "]" "..." " " ddesc "..." "\n") (setq re ...) (while ... ...)) ((= 2 ...)) (t (insert prefix "[" ... "]" " " ... "\n") (push ... allowed-keys) (pop tbl)))
(while tbl (cond (... ... ... ... ... ... ... ...) (...) (t ... ... ...)))
(while t (erase-buffer) (insert title "\n\n") (setq tbl table des-keys nil allowed-keys nil) (setq prefix (if current ... "")) (while tbl (cond ... ... ...)) (when specials (insert "-------------------------------------------------------------------------------\n") (let ... ...)) (push "\a" allowed-keys) (goto-char (point-min)) (if (not ...) (org-fit-window-to-buffer)) (message prompt) (setq pressed (char-to-string ...)) (while (not ...) (message "Invalid key `%s'" pressed) (sit-for 1) (message prompt) (setq pressed ...)) (if (equal pressed "\a") (error "Abort")) (if (assoc pressed specials) (throw ... ...)) (unless (member pressed des-keys) (throw ... ...)) (setq current (concat current pressed)) (setq table (mapcar ... table)) (setq table (remove nil table)))
(catch (quote exit) (while t (erase-buffer) (insert title "\n\n") (setq tbl table des-keys nil allowed-keys nil) (setq prefix ...) (while tbl ...) (when specials ... ...) (push "\a" allowed-keys) (goto-char ...) (if ... ...) (message prompt) (setq pressed ...) (while ... ... ... ... ...) (if ... ...) (if ... ...) (unless ... ...) (setq current ...) (setq table ...) (setq table ...)))
(save-window-excursion (org-switch-to-buffer-other-window "*Org Select*") (setq orig-table table) (catch (quote exit) (while t ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))
(let (tbl orig-table dkey ddesc des-keys allowed-keys current prefix rtn) (save-window-excursion (org-switch-to-buffer-other-window "*Org Select*") (setq orig-table table) (catch ... ...)) (kill-buffer "*Org Select*") rtn)
org-mks((("t" "Todo" entry (file+headline "organizer.org" "Eingang")
"* TODO %^{Title} %^g\n Eingang: %U\n %a\n %i" :empty-lines 1) ("T"
"Termin" entry (file+headline "organizer.org" "Eingang") "* TODO %^T
%^{Title} %^g\n Eingang: %U\n %a\n %i" :empty-lines 1) ("l" "Lauf"
entry (file+headline "notes/Laufen/Training.org" "Training") . "* DONE
%u (%^{Type:}) %^{Distance:} x:xx\n :PROPERTIES:\n :date:
%u\n :meters:\n :time:\n :pace: x:xx\n :start:\n :type:\n
:kcal: xxx\n :rpuls:\n :END: %^{meters}p %^{start}p %^{time}p
%^{type}p %x^{rpuls}p\n*** Wetter\n %?\n\n*** Strecke\n\n***
Trainingsinhalt\n\n*** Kommentar\n")
...
Sebastian
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [Patch] New implementation of the Org remember process ready for comments and testing
2010-06-22 23:07 ` Sebastian Rose
@ 2010-06-22 23:32 ` Sebastian Rose
2010-06-23 4:18 ` Carsten Dominik
2010-06-23 12:24 ` reuse input (was: New implementation of the Org remember process ready for comments and testing) Memnon Anon
2 siblings, 0 replies; 67+ messages in thread
From: Sebastian Rose @ 2010-06-22 23:32 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 476 bytes --]
Sebastian Rose <sebastian_rose@gmx.de> writes:
> * Separate template files
>
> I'd like to use Org-mode to edit templates.
>
> I'm trying this:
>
> (setq org-capture-templates
> (
> `(
> ("l" "Lauf" entry (file+headline "notes/Laufen/Training.org" "Training")
> ,(org-file-contents "~/emacs/org/capture-templates/training.org")
> :empty-lines 1))))
>
> But I get an error when calling `org-capture':
Here is a patch that would do:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-capture-file-templates.patch --]
[-- Type: text/x-diff, Size: 631 bytes --]
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 32db517..dfc7bb1 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -794,6 +794,8 @@ Point will remain at the first line after the inserted text."
(org-capture-put :key (car entry) :description (nth 1 entry)
:target (nth 3 entry))
(let ((txt (nth 4 entry)) (type (or (nth 2 entry) 'entry)))
+ (when (file-exists-p txt)
+ (setq txt (org-file-contents txt)))
(when (or (not txt) (not (string-match "\\S-" txt)))
;; The template may be empty or omitted for special types.
;; Here we insert the default templates for such cases.
[-- Attachment #3: Type: text/plain, Size: 307 bytes --]
Now I could use this:
(setq org-capture-templates
(quote
(("l" "Lauf" entry (file+headline "notes/Laufen/Training.org" "Training")
"~/emacs/org/capture-templates/training.org"
:empty-lines 1))))
This patch ignores a possible clash headline <=> filename.
Sebastian
[-- Attachment #4: 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 related [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 23:07 ` Sebastian Rose
2010-06-22 23:32 ` [Patch] " Sebastian Rose
@ 2010-06-23 4:18 ` Carsten Dominik
2010-06-23 12:24 ` reuse input (was: New implementation of the Org remember process ready for comments and testing) Memnon Anon
2 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 4:18 UTC (permalink / raw)
To: Sebastian Rose; +Cc: Org Mode
On Jun 23, 2010, at 1:07 AM, Sebastian Rose wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>> None of what I describe is set in stone yet - let me know if you have
>> comments, change requests or other ideas.
>>
>> My feeling right now is that this should become the default capture
>> system, and that we will keep the current org-remember in the
>> distribution for quite some time, for compatibility.
>
>
> * "C" as template key
>
> C-h v org-catpure-templates
>
> states:
>
> Do not use "C" as a key, it is reserved for customizing the
> template variable.
>
> I guess this is for the testing phase only?
No, this is for easy access to the customize buffer of this variable.
org-remember does the same with org-remember-templates, and org-agenda
with org-agenda-custom-command.
I think right now, for org-capture-templates, the customization
binding of ?C takes precedent. I guess it would be more consistent to
have your own binding to do so....
OK, now you can use "C" if you want.
> * Reuse input
>
> I would like to prompt for a value and use the input in several
> places. E.g. part of the last entry in my training diary looks like
> this:
>
>
> => --->8----------------------------->8-----------------------------
> >8---
> ***** DONE [2010-06-21 Mo] (run) 22761 5:52
> :PROPERTIES:
> :date: [2010-06-21 Mo]
> :meters: 22761
> :time: 02:13:32
> :pace: 5:52
> :start: 16:00
> :type: lgDL
> :kcal: 1525
> :rpuls: 42
> :END:
>
> ******* Weather
> ...
>
> ******* Track
> ... where ...
>
> ******* Training
> ... splits, training contents ...
>
> ******* Comment
> ... feeling, health etc...
> <=
> ---8<-----------------------------8<-----------------------------8<---
>
>
> As you can see, I use the "distance" and the "pace" in two
> places. One in the title for better overview, one as property for
> column view. But I'd like to enter it only once.
Maybe James has a solution for this one?
>
>
>
>
>
>
> * Separate template files
>
> I'd like to use Org-mode to edit templates.
>
> I'm trying this:
>
> (setq org-capture-templates
> (
> `(
> ("l" "Lauf" entry (file+headline "notes/Laufen/Training.org"
> "Training")
> ,(org-file-contents "~/emacs/org/capture-templates/
> training.org")
> :empty-lines 1))))
You need to put ` on the outside of the outermost list:
(setq org-capture-templates
`(
(
("l" "Lauf" entry (file+headline "notes/Laufen/Training.org"
"Training")
,(org-file-contents "~/emacs/org/capture-templates/
training.org")
:empty-lines 1))))
>
> But I get an error when calling `org-capture':
>
> Debugger entered--Lisp error: (wrong-type-argument listp "* DONE %u
> (%^{Type:}) %^{Distance:} x:xx
> :PROPERTIES:
> :date: %u
> :meters:
> :time:
> :pace: x:xx
> :start:
> :type:
> :kcal: xxx
> :rpuls:
> :END: %^{meters}p %^{start}p %^{time}p %^{type}p %x^{rpuls}p
> *** Wetter
> %?
>
> *** Strecke
>
> *** Trainingsinhalt
>
> *** Kommentar
> ")
> length(("l" "Lauf" entry (file+headline "notes/Laufen/Training.org"
> "Training") . "* DONE %u (%^{Type:}) %^{Distance:} x:xx
> \n :PROPERTIES:\n :date: %u\n :meters:\n :time:
> \n :pace: x:xx\n :start:\n :type:\n :kcal: xxx\n :rpuls:
> \n :END: %^{meters}p %^{start}p %^{time}p %^{type}p %x^{rpuls}p
> \n*** Wetter\n %?\n\n*** Strecke\n\n*** Trainingsinhalt\n\n***
> Kommentar\n"))
> (= 2 (length (car tbl)))
> (and (= 2 (length ...)) (= (length ...) 1))
> (cond ((and ... ...) (setq dkey ... ddesc ...) (pop tbl) (push dkey
> des-keys) (push dkey allowed-keys) (insert prefix "[" dkey "]" "..."
> " " ddesc "..." "\n") (setq re ...) (while ... ...)) ((= 2 ...)) (t
> (insert prefix "[" ... "]" " " ... "\n") (push ... allowed-keys)
> (pop tbl)))
> (while tbl (cond (... ... ... ... ... ... ... ...) (...)
> (t ... ... ...)))
> (while t (erase-buffer) (insert title "\n\n") (setq tbl table des-
> keys nil allowed-keys nil) (setq prefix (if current ... "")) (while
> tbl (cond ... ... ...)) (when specials (insert
> "-------------------------------------------------------------------------------\n
> ") (let ... ...)) (push "\a" allowed-keys) (goto-char (point-min))
> (if (not ...) (org-fit-window-to-buffer)) (message prompt) (setq
> pressed (char-to-string ...)) (while (not ...) (message "Invalid key
> `%s'" pressed) (sit-for 1) (message prompt) (setq pressed ...)) (if
> (equal pressed "\a") (error "Abort")) (if (assoc pressed specials)
> (throw ... ...)) (unless (member pressed des-keys) (throw ... ...))
> (setq current (concat current pressed)) (setq table (mapcar ...
> table)) (setq table (remove nil table)))
> (catch (quote exit) (while t (erase-buffer) (insert title "\n\n")
> (setq tbl table des-keys nil allowed-keys nil) (setq prefix ...)
> (while tbl ...) (when specials ... ...) (push "\a" allowed-keys)
> (goto-char ...) (if ... ...) (message prompt) (setq pressed ...)
> (while ... ... ... ... ...) (if ... ...) (if ... ...)
> (unless ... ...) (setq current ...) (setq table ...) (setq
> table ...)))
> (save-window-excursion (org-switch-to-buffer-other-window "*Org
> Select*") (setq orig-table table) (catch (quote exit) (while
> t
> ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))
> (let (tbl orig-table dkey ddesc des-keys allowed-keys current
> prefix rtn) (save-window-excursion (org-switch-to-buffer-other-
> window "*Org Select*") (setq orig-table table) (catch ... ...))
> (kill-buffer "*Org Select*") rtn)
> org-mks((("t" "Todo" entry (file+headline "organizer.org" "Eingang")
> "* TODO %^{Title} %^g\n Eingang: %U\n %a\n %i" :empty-lines 1)
> ("T"
> "Termin" entry (file+headline "organizer.org" "Eingang") "* TODO %^T
> %^{Title} %^g\n Eingang: %U\n %a\n %i" :empty-lines 1) ("l" "Lauf"
> entry (file+headline "notes/Laufen/Training.org" "Training") . "*
> DONE
> %u (%^{Type:}) %^{Distance:} x:xx\n :PROPERTIES:\n :date:
> %u\n :meters:\n :time:\n :pace: x:xx\n :start:\n :type:\n
> :kcal: xxx\n :rpuls:\n :END: %^{meters}p %^{start}p %^{time}p
> %^{type}p %x^{rpuls}p\n*** Wetter\n %?\n\n*** Strecke\n\n***
> Trainingsinhalt\n\n*** Kommentar\n")
>
> ...
>
>
>
> Sebastian
^ permalink raw reply [flat|nested] 67+ messages in thread
* reuse input (was: New implementation of the Org remember process ready for comments and testing)
2010-06-22 23:07 ` Sebastian Rose
2010-06-22 23:32 ` [Patch] " Sebastian Rose
2010-06-23 4:18 ` Carsten Dominik
@ 2010-06-23 12:24 ` Memnon Anon
2 siblings, 0 replies; 67+ messages in thread
From: Memnon Anon @ 2010-06-23 12:24 UTC (permalink / raw)
To: Sebastian Rose; +Cc: Org Mode, Carsten Dominik
Hi,
Sebastian Rose <sebastian_rose@gmx.de> writes:
> * Reuse input
>
> I would like to prompt for a value and use the input in several
> places. E.g. part of the last entry in my training diary looks like
> this:
>
>
> => --->8----------------------------->8----------------------------->8---
> ***** DONE [2010-06-21 Mo] (run) 22761 5:52
> :PROPERTIES:
> :date: [2010-06-21 Mo]
> :meters: 22761
> :time: 02:13:32
> :pace: 5:52
> :start: 16:00
> :type: lgDL
> :kcal: 1525
> :rpuls: 42
> :END:
[...]
> As you can see, I use the "distance" and the "pace" in two
> places. One in the title for better overview, one as property for
> column view. But I'd like to enter it only once.
I am not exactly sure, but afaik yasnippet has this feature.
http://yasnippet.googlecode.com/svn/trunk/doc/snippet-development.html
,----
| Mirrors
|
| We refer the tab stops with placeholders as a field. A field can have
| mirrors. Its mirrors will get updated when you change the text of a
| field. Here's an example:
|
| \begin{${1:enumerate}}
| $0
| \end{$1}
`----
So I guess a predefined yasnippet template would be able to get the
behaviour you want in a org-remember^Worg-capture buffer?
memnon
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
` (5 preceding siblings ...)
2010-06-22 23:07 ` Sebastian Rose
@ 2010-06-22 23:56 ` Sebastian Rose
2010-06-23 4:23 ` Carsten Dominik
2010-06-23 4:01 ` Puneeth
` (7 subsequent siblings)
14 siblings, 1 reply; 67+ messages in thread
From: Sebastian Rose @ 2010-06-22 23:56 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
I have a problem with the properties and org-capture-templates.
"* DONE %u (%^{Sport|run|run|swim|wout}) %^{Distance} x:xx
:PROPERTIES:
:date: %u
:pace: x:xx
:kcal: xxx
:END:
%^{meters}p %^{start}p %^{time}p %^{type}p %x^{rpuls}p"
results in:
* DONE [2010-06-23 Mi] (run) 22222 x:xx
:PROPERTIES:
:meters: 22222
:start: 16:00
:time: 01:30:00
:type: lgDL
:END:
:date: [2010-06-23 Mi]
:pace: x:xx
:kcal: xxx
:END:
Note the :END: after the :type: property.
There should be a way to set properties automatically, like :date: in
this case, and still prompt for others.
Sebastian
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 23:56 ` New implementation of the Org remember process ready for comments and testing Sebastian Rose
@ 2010-06-23 4:23 ` Carsten Dominik
2010-06-23 8:05 ` Sebastian Rose
0 siblings, 1 reply; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 4:23 UTC (permalink / raw)
To: Sebastian Rose; +Cc: Org Mode
On Jun 23, 2010, at 1:56 AM, Sebastian Rose wrote:
>
>
> I have a problem with the properties and org-capture-templates.
>
>
> "* DONE %u (%^{Sport|run|run|swim|wout}) %^{Distance} x:xx
> :PROPERTIES:
> :date: %u
> :pace: x:xx
> :kcal: xxx
> :END:
> %^{meters}p %^{start}p %^{time}p %^{type}p %x^{rpuls}p"
>
>
> results in:
>
>
> * DONE [2010-06-23 Mi] (run) 22222 x:xx
> :PROPERTIES:
> :meters: 22222
> :start: 16:00
> :time: 01:30:00
> :type: lgDL
> :END:
> :date: [2010-06-23 Mi]
> :pace: x:xx
> :kcal: xxx
> :END:
>
>
> Note the :END: after the :type: property.
I cannot reproduce this.
- Carsten
>
> There should be a way to set properties automatically, like :date: in
> this case, and still prompt for others.
>
>
> Sebastian
>
>
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-23 4:23 ` Carsten Dominik
@ 2010-06-23 8:05 ` Sebastian Rose
2010-06-23 8:18 ` Carsten Dominik
0 siblings, 1 reply; 67+ messages in thread
From: Sebastian Rose @ 2010-06-23 8:05 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> On Jun 23, 2010, at 1:56 AM, Sebastian Rose wrote:
>
>>
>>
>> I have a problem with the properties and org-capture-templates.
>>
>>
>> "* DONE %u (%^{Sport|run|run|swim|wout}) %^{Distance} x:xx
>> :PROPERTIES:
>> :date: %u
>> :pace: x:xx
>> :kcal: xxx
>> :END:
>> %^{meters}p %^{start}p %^{time}p %^{type}p %x^{rpuls}p"
>>
>>
>> results in:
>>
>>
>> * DONE [2010-06-23 Mi] (run) 22222 x:xx
>> :PROPERTIES:
>> :meters: 22222
>> :start: 16:00
>> :time: 01:30:00
>> :type: lgDL
>> :END:
>> :date: [2010-06-23 Mi]
>> :pace: x:xx
>> :kcal: xxx
>> :END:
>>
>>
>> Note the :END: after the :type: property.
>
> I cannot reproduce this.
>
> - Carsten
Err, sorry, my fault.
This here works as expected:
"* DONE %u (%^{Sport|run|run|swim|wout}) %^{Distance} x:xx
:PROPERTIES:
:date: %u
:pace: x:xx
:kcal: xxx
%^{meters}p %^{start}p %^{time}p %^{type}p %^{rpuls}p
:END:"
No idea why I didn't try to put the `:END:' to the end :-/
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-23 8:05 ` Sebastian Rose
@ 2010-06-23 8:18 ` Carsten Dominik
0 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 8:18 UTC (permalink / raw)
To: Sebastian Rose; +Cc: Org Mode
On Jun 23, 2010, at 10:05 AM, Sebastian Rose wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>> On Jun 23, 2010, at 1:56 AM, Sebastian Rose wrote:
>>
>>>
>>>
>>> I have a problem with the properties and org-capture-templates.
>>>
>>>
>>> "* DONE %u (%^{Sport|run|run|swim|wout}) %^{Distance} x:xx
>>> :PROPERTIES:
>>> :date: %u
>>> :pace: x:xx
>>> :kcal: xxx
>>> :END:
>>> %^{meters}p %^{start}p %^{time}p %^{type}p %x^{rpuls}p"
>>>
>>>
>>> results in:
>>>
>>>
>>> * DONE [2010-06-23 Mi] (run) 22222 x:xx
>>> :PROPERTIES:
>>> :meters: 22222
>>> :start: 16:00
>>> :time: 01:30:00
>>> :type: lgDL
>>> :END:
>>> :date: [2010-06-23 Mi]
>>> :pace: x:xx
>>> :kcal: xxx
>>> :END:
>>>
>>>
>>> Note the :END: after the :type: property.
>>
>> I cannot reproduce this.
>>
>> - Carsten
>
>
> Err, sorry, my fault.
>
> This here works as expected:
>
> "* DONE %u (%^{Sport|run|run|swim|wout}) %^{Distance} x:xx
> :PROPERTIES:
> :date: %u
> :pace: x:xx
> :kcal: xxx
> %^{meters}p %^{start}p %^{time}p %^{type}p %^{rpuls}p
> :END:"
>
> No idea why I didn't try to put the `:END:' to the end :-/
>
>
The way properties are added in templates are likely to change
soon, stay tuned...
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
` (6 preceding siblings ...)
2010-06-22 23:56 ` New implementation of the Org remember process ready for comments and testing Sebastian Rose
@ 2010-06-23 4:01 ` Puneeth
2010-06-23 4:31 ` Carsten Dominik
2010-06-23 8:39 ` Carsten Dominik
2010-06-23 4:52 ` Manish
` (6 subsequent siblings)
14 siblings, 2 replies; 67+ messages in thread
From: Puneeth @ 2010-06-23 4:01 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Hi,
On Tue, Jun 22, 2010 at 6:06 PM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
> New implementation of the Org remember process
> ==============================================
[..]
> None of what I describe is set in stone yet - let me know if you have
> comments, change requests or other ideas.
I like the new capture process. All of it works well, except for
1) tab completion on tags (
I have a couple of templates using ^g and ^G and they worked well with
org-remember, but don't work with org-capture. I hope I'm not missing
something here.
2) I have not been able to abort a capture. undo doesn't seem to be
working. It says "undo-more: Changes to be undone are outside visible
portion of buffer". I think I'm doing something wrong here. Can
someone tell me how to abort a capture?
Thanks,
Puneeth
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-23 4:01 ` Puneeth
@ 2010-06-23 4:31 ` Carsten Dominik
2010-06-23 9:04 ` Puneeth
2010-06-23 8:39 ` Carsten Dominik
1 sibling, 1 reply; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 4:31 UTC (permalink / raw)
To: Puneeth; +Cc: Org Mode
On Jun 23, 2010, at 6:01 AM, Puneeth wrote:
> Hi,
>
> On Tue, Jun 22, 2010 at 6:06 PM, Carsten Dominik
> <carsten.dominik@gmail.com> wrote:
>> New implementation of the Org remember process
>> ==============================================
> [..]
>> None of what I describe is set in stone yet - let me know if you have
>> comments, change requests or other ideas.
>
> I like the new capture process. All of it works well, except for
>
> 1) tab completion on tags (
> I have a couple of templates using ^g and ^G and they worked well with
> org-remember, but don't work with org-capture. I hope I'm not missing
> something here.
I just tried - this is working well for me.
>
> 2) I have not been able to abort a capture. undo doesn't seem to be
> working. It says "undo-more: Changes to be undone are outside visible
> portion of buffer". I think I'm doing something wrong here. Can
> someone tell me how to abort a capture?
Yes, a good mechanism for aborting is still missing.
For now, try widening the buffer with `C-x n w' and then use undo to
make the template go away.
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-23 4:31 ` Carsten Dominik
@ 2010-06-23 9:04 ` Puneeth
0 siblings, 0 replies; 67+ messages in thread
From: Puneeth @ 2010-06-23 9:04 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
On Wed, Jun 23, 2010 at 10:01 AM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
>
[..]
>> 1) tab completion on tags (
>> I have a couple of templates using ^g and ^G and they worked well with
>> org-remember, but don't work with org-capture. I hope I'm not missing
>> something here.
>
> I just tried - this is working well for me.
I think this has got something to do with org-directory, though I'm not sure.
My current set-up is enclosed below. Tab completion for tags (in all
agenda files) shows only the tags present in the worg-todo file, not
the ones in the notes file.
-------------------------------------------------
(setq org-directory "/data/life-in-plain-text/")
(custom-set-variables
'(org-agenda-files (quote ("/data/life-in-plain-text/notes.org"
"~/Worg/worg-todo.org"))))
(setq org-capture-templates
'(("t" "task" entry
(file+headline "notes.org" "Refile")
"* TODO %? %^G:\n %U\n")))
-------------------------------------------------
Thanks,
Puneeth
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-23 4:01 ` Puneeth
2010-06-23 4:31 ` Carsten Dominik
@ 2010-06-23 8:39 ` Carsten Dominik
1 sibling, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 8:39 UTC (permalink / raw)
To: Puneeth; +Cc: Org Mode
On Jun 23, 2010, at 6:01 AM, Puneeth wrote:
> Hi,
>
> On Tue, Jun 22, 2010 at 6:06 PM, Carsten Dominik
> <carsten.dominik@gmail.com> wrote:
>> New implementation of the Org remember process
>> ==============================================
> [..]
>> None of what I describe is set in stone yet - let me know if you have
>> comments, change requests or other ideas.
>
> I like the new capture process. All of it works well, except for
>
> 1) tab completion on tags (
> I have a couple of templates using ^g and ^G and they worked well with
> org-remember, but don't work with org-capture. I hope I'm not missing
> something here.
>
> 2) I have not been able to abort a capture. undo doesn't seem to be
> working. It says "undo-more: Changes to be undone are outside visible
> portion of buffer". I think I'm doing something wrong here. Can
> someone tell me how to abort a capture?
This should now work, with `C-c C-k'.
It should work with all capture types except table lines. For table
lines, simply UNDO until the new line is gone and the finalize with `C-
c C-c'.
HTH
- Carsten
>
> Thanks,
> Puneeth
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
` (7 preceding siblings ...)
2010-06-23 4:01 ` Puneeth
@ 2010-06-23 4:52 ` Manish
2010-06-23 5:40 ` Carsten Dominik
2010-06-23 8:02 ` Ian Barton
` (5 subsequent siblings)
14 siblings, 1 reply; 67+ messages in thread
From: Manish @ 2010-06-23 4:52 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
On Tue, Jun 22, 2010 at 6:06 PM, Carsten Dominik wrote:
> New implementation of the Org remember process
> ==============================================
[snip: announcement of org-capture (287 lines)]
>
I got some compilation warnings for the latest files. I have not yet
tried the new system so don't know if these are these of any
consequence or not or if they are specific to my setup.
$ make
emacs-nox -batch -q -no-site-file -eval "(setq load-path (cons
(expand-file-name \"./lisp/\") (cons
\"/usr/local/share/emacs/site-lisp\" load-path)))" -f
batch-byte-compile lisp/org-capture.el
In org-capture-select-template:
org-capture.el:841:25:Warning: `error' called with 0 args to fill 1 format
field(s)
In org-capture-import-remember-templates:
org-capture.el:1110:45:Warning: reference to free variable
`org-remember-default-headline'
org-capture.el:1120:12:Warning: reference to free variable
`org-remember-templates'
In end of data:
org-capture.el:1129:1:Warning: the function `org-datetree-find-date-create' is
not known to be defined.
Wrote /home/zms/elisp/org-mode.git/lisp/org-capture.elc
emacs-nox -batch -q -no-site-file -eval "(setq load-path (cons
(expand-file-name \"./lisp/\") (cons
\"/usr/local/share/emacs/site-lisp\" load-path)))" -f
batch-byte-compile lisp/org-mks.el
In org-mks:
org-mks.el:75:45:Warning: assignment to free variable `re'
org-mks.el:75:32:Warning: reference to free variable `re'
org-mks.el:98:31:Warning: assignment to free variable `pressed'
org-mks.el:99:41:Warning: reference to free variable `pressed'
In end of data:
org-mks.el:127:1:Warning: the following functions are not known to be defined:
org-switch-to-buffer-other-window, cadar, org-fit-window-to-buffer
Wrote /home/zms/elisp/org-mode.git/lisp/org-mks.elc
emacs-nox -batch -q -no-site-file -eval "(setq load-path (cons
(expand-file-name \"./lisp/\") (cons
\"/usr/local/share/emacs/site-lisp\" load-path)))" --eval "(require
'autoload)" \
--eval '(find-file "org-install.el")' \
--eval '(erase-buffer)' \
--eval '(mapc (lambda (x) (generate-file-autoloads
(symbol-name x))) (quote (lisp/org.el lisp/org-agenda.el
lisp/org-ascii.el lisp/org-attach.el lisp/org-archive.el
lisp/org-bbdb.el lisp/org-beamer.el lisp/org-bibtex.el
lisp/org-capture.el lisp/org-clock.el lisp/org-colview.el
lisp/org-colview-xemacs.el lisp/org-compat.el lisp/org-crypt.el
lisp/org-ctags.el lisp/org-datetree.el lisp/org-docview.el
lisp/org-entities.el lisp/org-exp.el lisp/org-exp-blocks.el
lisp/org-docbook.el lisp/org-faces.el lisp/org-feed.el
lisp/org-footnote.el lisp/org-freemind.el lisp/org-gnus.el
lisp/org-habit.el lisp/org-html.el lisp/org-icalendar.el
lisp/org-id.el lisp/org-indent.el lisp/org-info.el
lisp/org-inlinetask.el lisp/org-jsinfo.el lisp/org-irc.el
lisp/org-latex.el lisp/org-list.el lisp/org-mac-message.el
lisp/org-macs.el lisp/org-mew.el lisp/org-mhe.el lisp/org-mks.el
lisp/org-mobile.el lisp/org-mouse.el lisp/org-publish.el
lisp/org-plot.el lisp/org-protocol.el lisp/org-remember.el
lisp/org-rmail.el lisp/org-src.el lisp/org-table.el
lisp/org-taskjuggler.el lisp/org-timer.el lisp/org-vm.el
lisp/org-w3m.el lisp/org-wl.el lisp/org-xoxo.el)))' \
--eval '(insert "\n(provide (quote org-install))\n")' \
--eval '(save-buffer)'
Loading vc-git...
Generating autoloads for lisp/org.el...
[rest of compilation log snipped]
Best regards
--
Manish
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-23 4:52 ` Manish
@ 2010-06-23 5:40 ` Carsten Dominik
0 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 5:40 UTC (permalink / raw)
To: Manish; +Cc: Org Mode
Hi Manish, thanks for checking - this is now fixed.
- Carsten
On Jun 23, 2010, at 6:52 AM, Manish wrote:
> On Tue, Jun 22, 2010 at 6:06 PM, Carsten Dominik wrote:
>> New implementation of the Org remember process
>> ==============================================
> [snip: announcement of org-capture (287 lines)]
>>
>
> I got some compilation warnings for the latest files. I have not yet
> tried the new system so don't know if these are these of any
> consequence or not or if they are specific to my setup.
>
>
> $ make
> emacs-nox -batch -q -no-site-file -eval "(setq load-path (cons
> (expand-file-name \"./lisp/\") (cons
> \"/usr/local/share/emacs/site-lisp\" load-path)))" -f
> batch-byte-compile lisp/org-capture.el
>
> In org-capture-select-template:
> org-capture.el:841:25:Warning: `error' called with 0 args to fill 1
> format
> field(s)
>
> In org-capture-import-remember-templates:
> org-capture.el:1110:45:Warning: reference to free variable
> `org-remember-default-headline'
> org-capture.el:1120:12:Warning: reference to free variable
> `org-remember-templates'
>
> In end of data:
> org-capture.el:1129:1:Warning: the function `org-datetree-find-date-
> create' is
> not known to be defined.
> Wrote /home/zms/elisp/org-mode.git/lisp/org-capture.elc
> emacs-nox -batch -q -no-site-file -eval "(setq load-path (cons
> (expand-file-name \"./lisp/\") (cons
> \"/usr/local/share/emacs/site-lisp\" load-path)))" -f
> batch-byte-compile lisp/org-mks.el
>
> In org-mks:
> org-mks.el:75:45:Warning: assignment to free variable `re'
> org-mks.el:75:32:Warning: reference to free variable `re'
> org-mks.el:98:31:Warning: assignment to free variable `pressed'
> org-mks.el:99:41:Warning: reference to free variable `pressed'
>
> In end of data:
> org-mks.el:127:1:Warning: the following functions are not known to
> be defined:
> org-switch-to-buffer-other-window, cadar, org-fit-window-to-buffer
> Wrote /home/zms/elisp/org-mode.git/lisp/org-mks.elc
> emacs-nox -batch -q -no-site-file -eval "(setq load-path (cons
> (expand-file-name \"./lisp/\") (cons
> \"/usr/local/share/emacs/site-lisp\" load-path)))" --eval "(require
> 'autoload)" \
> --eval '(find-file "org-install.el")' \
> --eval '(erase-buffer)' \
> --eval '(mapc (lambda (x) (generate-file-autoloads
> (symbol-name x))) (quote (lisp/org.el lisp/org-agenda.el
> lisp/org-ascii.el lisp/org-attach.el lisp/org-archive.el
> lisp/org-bbdb.el lisp/org-beamer.el lisp/org-bibtex.el
> lisp/org-capture.el lisp/org-clock.el lisp/org-colview.el
> lisp/org-colview-xemacs.el lisp/org-compat.el lisp/org-crypt.el
> lisp/org-ctags.el lisp/org-datetree.el lisp/org-docview.el
> lisp/org-entities.el lisp/org-exp.el lisp/org-exp-blocks.el
> lisp/org-docbook.el lisp/org-faces.el lisp/org-feed.el
> lisp/org-footnote.el lisp/org-freemind.el lisp/org-gnus.el
> lisp/org-habit.el lisp/org-html.el lisp/org-icalendar.el
> lisp/org-id.el lisp/org-indent.el lisp/org-info.el
> lisp/org-inlinetask.el lisp/org-jsinfo.el lisp/org-irc.el
> lisp/org-latex.el lisp/org-list.el lisp/org-mac-message.el
> lisp/org-macs.el lisp/org-mew.el lisp/org-mhe.el lisp/org-mks.el
> lisp/org-mobile.el lisp/org-mouse.el lisp/org-publish.el
> lisp/org-plot.el lisp/org-protocol.el lisp/org-remember.el
> lisp/org-rmail.el lisp/org-src.el lisp/org-table.el
> lisp/org-taskjuggler.el lisp/org-timer.el lisp/org-vm.el
> lisp/org-w3m.el lisp/org-wl.el lisp/org-xoxo.el)))' \
> --eval '(insert "\n(provide (quote org-install))\n")' \
> --eval '(save-buffer)'
> Loading vc-git...
> Generating autoloads for lisp/org.el...
>
> [rest of compilation log snipped]
>
>
> Best regards
> --
> Manish
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
` (8 preceding siblings ...)
2010-06-23 4:52 ` Manish
@ 2010-06-23 8:02 ` Ian Barton
2010-06-23 11:30 ` Carsten Dominik
2010-06-23 10:40 ` [Typo] " Sebastian Rose
` (4 subsequent siblings)
14 siblings, 1 reply; 67+ messages in thread
From: Ian Barton @ 2010-06-23 8:02 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
O
>
> The fact that I have let go of trying to follow up every thread on the
> mailing list is really great for me, thanks to John and David for
> providing issue and patch tracking - this is a huge simplification.
> And thanks to everyone who is contributing with answers and patches!
>
> The best part of this - for me - is that it allows me to step back
> and do some more systematic work again.
>
> So I have finally found the time to rewrite the Org+Remember capturing
> setup for org-mode. This stuff is now available in the git repo and
> it still needs testing.
>
Carsten,
I see that org-capture.el org-mks.el aren't in the Makefile, so you have
to copy them manually. Is this intentional since the feature is
experimental?
Ian.
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-23 8:02 ` Ian Barton
@ 2010-06-23 11:30 ` Carsten Dominik
0 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 11:30 UTC (permalink / raw)
To: lists; +Cc: Org Mode
On Jun 23, 2010, at 10:02 AM, Ian Barton wrote:
> O
>>
>> The fact that I have let go of trying to follow up every thread on
>> the
>> mailing list is really great for me, thanks to John and David for
>> providing issue and patch tracking - this is a huge simplification.
>> And thanks to everyone who is contributing with answers and patches!
>>
>> The best part of this - for me - is that it allows me to step back
>> and do some more systematic work again.
>>
>> So I have finally found the time to rewrite the Org+Remember
>> capturing
>> setup for org-mode. This stuff is now available in the git repo and
>> it still needs testing.
>>
> Carsten,
>
> I see that org-capture.el org-mks.el aren't in the Makefile, so you
> have to copy them manually. Is this intentional since the feature is
> experimental?
No. This is fixed now, thanks.
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [Typo] New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
` (9 preceding siblings ...)
2010-06-23 8:02 ` Ian Barton
@ 2010-06-23 10:40 ` Sebastian Rose
2010-06-23 11:27 ` Carsten Dominik
2010-06-23 13:53 ` Jason McBrayer
` (3 subsequent siblings)
14 siblings, 1 reply; 67+ messages in thread
From: Sebastian Rose @ 2010-06-23 10:40 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Hi Carsten,
latest pull got me this line 765 in org-capture.el
(defun org-capture-mark-kill-region (bed end)
Typo? The bed is never used :)
Sebastian
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [Typo] New implementation of the Org remember process ready for comments and testing
2010-06-23 10:40 ` [Typo] " Sebastian Rose
@ 2010-06-23 11:27 ` Carsten Dominik
0 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 11:27 UTC (permalink / raw)
To: Sebastian Rose; +Cc: Org Mode
On Jun 23, 2010, at 12:40 PM, Sebastian Rose wrote:
> Hi Carsten,
>
>
> latest pull got me this line 765 in org-capture.el
>
> (defun org-capture-mark-kill-region (bed end)
>
> Typo? The bed is never used :)
Yep, a typo, thanks.
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
` (10 preceding siblings ...)
2010-06-23 10:40 ` [Typo] " Sebastian Rose
@ 2010-06-23 13:53 ` Jason McBrayer
2010-06-23 14:05 ` Darlan Cavalcante Moreira
` (2 subsequent siblings)
14 siblings, 0 replies; 67+ messages in thread
From: Jason McBrayer @ 2010-06-23 13:53 UTC (permalink / raw)
To: Org Mode
This is really great. The templates are easier to read than the old
ones, and the file+datetree selector works really well with how I do
my work journal.
I do have one issue, which is that :clock-in and :clock-resume don't
seem to work right for me. I have both set on a template. It clocks
into the new headline (which I want, this is for dealing with
interruptions), and when I complete it, it says it's resuming the
interrupted clock. Unfortunately, the clock it resumes is the newly
started one on the new headline. Am I misunderstanding how this is
supposed to work?
--
Jason F. McBrayer
http://jfm.carcosa.net/
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
` (11 preceding siblings ...)
2010-06-23 13:53 ` Jason McBrayer
@ 2010-06-23 14:05 ` Darlan Cavalcante Moreira
2010-06-23 15:19 ` Carsten Dominik
2010-06-24 1:32 ` Bernt Hansen
2010-07-05 11:22 ` capture template: %& and %! Memnon Anon
14 siblings, 1 reply; 67+ messages in thread
From: Darlan Cavalcante Moreira @ 2010-06-23 14:05 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Hello Carsten,
The new capture interface is really neat and I have the impression that it
will be even better in the future. Many Thanks!
I have only a few suggestions.
- It would be nice if "q" in the "choose template menu" quit the selection
if the user did not assign any template to the "q" key.
- Using the option "empty-lines: 1" will add an empty line before the
heading. I like to have an empty line after the end of the heading,
instead. I know that in most cases adding an empty line before the next
heading will be equivalent, but when using datetree with the
"empty-lines: 1" option there will be an undesired empty line after the
date three and the first heading added with the capture interface. Not
very important though.
- At last, I frequently need to add a new line in a table in my main org
file and the "table-line" entry type will be very useful. However for it
to work I need a way to tell org-capture to add the filled information
to a line relative to the end of the table. The table is in a form
| Name | Price |
|--------+-------|
| Item 1 | 1.30 |
| Item 2 | 13.14 |
|--------+-------|
| Total | 14.44 |
#+TBLFM: @4$2=vsum(@2..@-1);%.2f
I need a way to add the line after the line with "Item 2". To be really
fantastic org could also evaluate all formulas in the table after that.
Again,
Thanks for always providing us with great stuff.
Darlan
--
At Tue, 22 Jun 2010 14:36:15 +0200,
Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
> New implementation of the Org remember process
> ==============================================
>
> Dear all,
>
> The fact that I have let go of trying to follow up every thread on the
> mailing list is really great for me, thanks to John and David for
> providing issue and patch tracking - this is a huge simplification.
> And thanks to everyone who is contributing with answers and patches!
>
> The best part of this - for me - is that it allows me to step back
> and do some more systematic work again.
>
> So I have finally found the time to rewrite the Org+Remember capturing
> setup for org-mode. This stuff is now available in the git repo and
> it still needs testing.
>
> Table of Contents
> =================
> 1 Where is the new code?
> 2 Why a rewrite
> 3 Why a new name?
> 4 Acknowledgments
> 5 Setup
> 6 Overview over the changes
> 6.1 No temporary buffer
> 6.2 Different types of capture entries
> 6.3 Many different and precise ways to specify the target of a
> template
> 6.4 Multiple capture events going on at the same time
> 6.5 No prefix args to C-c C-c when finishing up
> 6.6 Per template settings
> 6.7 Multi-key access
> 6.8 The code is now much much cleaner and easier to maintain
> 7 Request for comments
>
>
> 1 Where is the new code?
> ~~~~~~~~~~~~~~~~~~~~~~~~~
>
> If you pull from the git repo, the new code is in
> lisp/org-capture.el.
>
> 2 Why a rewrite
> ~~~~~~~~~~~~~~~~
>
> Integration between Org and Remember started early on with very
> limited scope. Since then we have changed and added a lot of stuff
> and accumulated a lot of opaque code. The code has become nearly
> unmaintainable. A number of feature requests have been on the table
> as well.
>
> 3 Why a new name?
> ~~~~~~~~~~~~~~~~~~
>
> I have - at least for now - chosen a new name for the new setup:
> ` org-capture'. There are two reasons for this:
>
> 1. I know that many people have a working setup for org-remember and
> use this a lot and for critical stuff. I did not want to break
> any of this code. While the new implementation works in a very
> similar way, it is still not quite compatible.
>
> 2. The new implementation actually no longer uses remember.el.
>
> We can discuss if also the new implementation should be called
> `org-remember' eventually, just because everyone knows this process
> under this name. I have not come to a conclusion about this and
> welcome opinions.
>
> 4 Acknowledgments
> ~~~~~~~~~~~~~~~~~~
>
> This new implementation draws heavily on ideas by James TD Smith.
> He wrote an [RFC for updates to org-remember] which was discussed on
> the mailing list. Many of the features he describes have found
> there way into org-capture. James has also started to implement
> these changes - at the moment I am not using any of his code, but I
> hope that we will be able to start using his template filling code -
> it is quite general and easily extensible, while in the code I am
> using now every %-escape is hard-coded.
>
> Also Samuel Wales has provided important input, distributed over a
> number of mails over time. In particular, he had the idea to do the
> remembering directly in the target buffer. Normally his would have
> caused problems because this would change properties of the
> window and visibility settings of the target buffer. But using
> indirect buffers works around this issue.
>
> Of course, John Wiegley's remember.el is the prime source of
> inspiration for the entire capture process in Org.
>
>
> [RFC for updates to org-remember]: http://thread.gmane.org/gmane.emacs.orgmode/9579/focus%3D9579
>
> 5 Setup
> ~~~~~~~~
>
> To use the new setup, do the following:
>
> 1. Run
>
> M-x org-capture-import-remember-templates RET
>
> to get a translated version of your remember templates into the
> new variable `org-capture-templates'. This will "mostly" work,
> but maybe not for all cases. At least it will give you a good
> place to modify your templates. The customize interface is the
> best way to work with this complex variable.
>
> 2. Bind the command `org-capture' to a key, similar to what you did
> with org-remember:
>
> (define-key global-map "\C-cc" 'org-capture)
>
> You may also use `C-c r' once you have decided to move over to
> the new implementation.
>
> 6 Overview over the changes
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> 6.1 No temporary buffer
> ========================
>
> We no longer use a temporary buffer for creating the remember note.
> Instead, we make an indirect buffer linked to the target buffer and
> edit the new note already into its intended target file. This
> means you will never again loose a note by accidentally starting a
> second remember process. Also, all local settings like
> file-specific TODO keywords etc in the target buffer will be
> available when composing the note.
>
> 6.2 Different types of capture entries
> =======================================
>
> The capture process can now add to the target file:
>
> - a new Org outline node, either at top level or as a child of an
> existing (this is what org-remember already does)
> - plain list items
> - checkboxes
> - a new line in a table (this is cool)
> - a chunk of plain text (and this is general)
>
> For example, it should be easy now to use `org-capture' in order to
> add stuff to a ledger file (Russell, are you happy now? :)
>
> 6.3 Many different and precise ways to specify the target of a template
> ========================================================================
>
> You can identify the target location for a note in a number of
> ways:
>
> - file
> - file + headline
> - file + outline-path
> - file + regular expression
> - file + date tree
> - clock (to file to the running clock)
> - ID
> - user-defined function
>
> You can also add a template right at point in the buffer where you
> currently are working, bypassing the target setting of the template
> entirely. This is done by using a zero prefix: `C-0 C-c c'.
>
> 6.4 Multiple capture events going on at the same time
> ======================================================
>
> If you need to capture something while already capturing something
> else, you can now do so. Finishing the second process will
> automatically return you to the window setup of the first one.
>
> Bernt, this might lead to confusing results if you would try to
> port your immediate clock-in, clock-out code. It will probably be
> better (if you decide at all to try the new code) to use the
> built-in :clock-in and :clock-resume properties:
>
> These will even work for a chain: start capture 1, then 2, then 3,
> finalize 3, then 2, then 1, and the previous clock will be
> restarted each time. Only when you finish the captures in a
> different sequence, then the clock-resume stuff will lead to
> undefined results.
>
> 6.5 No prefix args to C-c C-c when finishing up
> ================================================
>
> Since the note is already in the target buffer, all exiting does is
> to kill the indirect buffer and to restore the window configuration
> before starting the process. It does no longer make sense to try
> to change the target location when finishing the capture.
> Therefore, prefix arguments to the `C-c C-c' finishing process are
> no longer interpreted.
>
> Instead, you can simply press `C-c C-w' to refile a new Org entry.
> Apart from moving the entry, this will also kill the indirect
> buffer in the process and restore the previous window
> configuration. Note that currently only `C-c C-w' will do this -
> the corresponding speed command or any other keys that lead to
> `org-refile' will not terminate the indirect buffer and restore the
> window configuration.
>
> To abort a capture you can now simply press `undo' to remove the
> template and then kill the (indirect) buffer. I would like to make
> `C-c C-k' do these steps automatically, but that does not yet work
> because I have not figured out quite how to do this in a safe way
> (for example, you might have widened the indirect buffer and edited
> stuff in a different place.....).
>
> 6.6 Per template settings
> ==========================
>
> Many interesting options can be set on a per template way. In
> fact, global settings like `org-reverse-note-order' is now ignored
> for the capture process. Some of the stuff that can be set:
>
> :empty-lines :: Number of empty lines that should surround the
> entry at the target location. This was a feature request,
> among others by Sebastien Vauban.
>
> :prepend :: Set this if the note should be added as the first
> rather than the last at the target location
>
> :clock-in :: Set this to make the clock If the clock should be
> started on the target item while working on the capture.
>
> :clock-resume :: Set this to resume the interrupted clock when
> finishing a capture process.
>
> :immediate-finish :: When this is set, the capture process is
> finished immediately after the templates has been filled.
>
> We can add more stuff here. James has proposed sorting, this is a
> possibility. I am not yet sure if this is worth the trouble, and
> also when this should be done (beginning or end of capture
> process). Input is welcome.
>
> 6.7 Multi-key access
> =====================
>
> If you like to use many different templates, you can now set them
> up in a way that multiple keys access a template. This is very
> similar to the multi-key selection of agenda commands. So we have
> special entries which "define/explain a prefix key", something like
>
> '(("t" "templates adding table lines")
> ("ta" "add to table a" table-line (file+headline "~/notes.org"
> "Table A))
> ("tb" "add to table b" table-line (file+headline "~/notes.org"
> "Table B))
> ("tc" "add to table c" table-line (file+headline "~/notes.org"
> "Table C)))
>
> When starting capture, you can then first press "t" and then see
> the individual options.
>
>
> 6.8 The code is now much much cleaner and easier to maintain
> =============================================================
>
> Just look at it... :)
>
> The docstrings of `org-capture-templates' and of the command
> `org-capture' contain much of the documentation for the moment,
> until I can write it up for the manual (if we decide that this is
> the way to go.....
>
> 7 Request for comments
> ~~~~~~~~~~~~~~~~~~~~~~~
>
> None of what I describe is set in stone yet - let me know if you have
> comments, change requests or other ideas.
>
> My feeling right now is that this should become the default capture
> system, and that we will keep the current org-remember in the
> distribution for quite some time, for compatibility.
>
>
> - 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
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-23 14:05 ` Darlan Cavalcante Moreira
@ 2010-06-23 15:19 ` Carsten Dominik
2010-06-23 17:00 ` Darlan Cavalcante Moreira
0 siblings, 1 reply; 67+ messages in thread
From: Carsten Dominik @ 2010-06-23 15:19 UTC (permalink / raw)
To: Darlan Cavalcante Moreira; +Cc: Org Mode
On Jun 23, 2010, at 4:05 PM, Darlan Cavalcante Moreira wrote:
>
> Hello Carsten,
>
> The new capture interface is really neat and I have the impression
> that it
> will be even better in the future. Many Thanks!
>
> I have only a few suggestions.
> - It would be nice if "q" in the "choose template menu" quit the
> selection
> if the user did not assign any template to the "q" key.
Good idea, this works now.
> - Using the option "empty-lines: 1" will add an empty line before the
> heading. I like to have an empty line after the end of the heading,
> instead. I know that in most cases adding an empty line before the
> next
> heading will be equivalent, but when using datetree with the
> "empty-lines: 1" option there will be an undesired empty line
> after the
> date three and the first heading added with the capture interface.
In a way I disagree here. I you want empty lines, I think it makes
quite some sense to alway have them on both sides. I guess we could
allow a value of '(1 0) for :empty-lines, but you need to rally some
support from others for this complication.
> Not
> very important though.
:)
> - At last, I frequently need to add a new line in a table in my main
> org
> file and the "table-line" entry type will be very useful. However
> for it
> to work I need a way to tell org-capture to add the filled
> information
> to a line relative to the end of the table. The table is in a form
> | Name | Price |
> |--------+-------|
> | Item 1 | 1.30 |
> | Item 2 | 13.14 |
> |--------+-------|
> | Total | 14.44 |
> #+TBLFM: @4$2=vsum(@2..@-1);%.2f
> I need a way to add the line after the line with "Item 2".
Yes, I think that makes sense. When you pull again, try to set the
property
:table-line-pos "II-1"
for the template. This will tell org-capture to place the new line so
that it
becomes the first line before the second hline. That should do the
trick, I think.
> To be really
> fantastic org could also evaluate all formulas in the table after
> that.
That was already the case. If the table has formulas, they are
evaluated
(but not iterated...) when you finish the capture :)
Thanks for your input!
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-23 15:19 ` Carsten Dominik
@ 2010-06-23 17:00 ` Darlan Cavalcante Moreira
2010-06-24 5:20 ` Carsten Dominik
0 siblings, 1 reply; 67+ messages in thread
From: Darlan Cavalcante Moreira @ 2010-06-23 17:00 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Thank you very much Carsten.
It works very well.
One small detail is that if the cursor is not in the table when it is
refiled then the formula is not evaluated. Most users probably won't notice
this and it also works correctly when using the :immediate-finish option.
However, when testing this I think I found a bug that could be
serious. Suppose that I set a template to ask me the name and price for a
new item in the table. If I type C-g at this point the capture buffer will
be buried but still available and unsaved. If the user saves this file the
original file will be overwritten and all information there will be
lost. Even if the user realises the mistake just after saving the file
there is no way to recover the content because all undo information was
lost.
--
Darlan
At Wed, 23 Jun 2010 17:19:44 +0200,
Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
>
> On Jun 23, 2010, at 4:05 PM, Darlan Cavalcante Moreira wrote:
>
> >
> > Hello Carsten,
> >
> > The new capture interface is really neat and I have the impression
> > that it
> > will be even better in the future. Many Thanks!
> >
> > I have only a few suggestions.
> > - It would be nice if "q" in the "choose template menu" quit the
> > selection
> > if the user did not assign any template to the "q" key.
>
> Good idea, this works now.
>
> > - Using the option "empty-lines: 1" will add an empty line before the
> > heading. I like to have an empty line after the end of the heading,
> > instead. I know that in most cases adding an empty line before the
> > next
> > heading will be equivalent, but when using datetree with the
> > "empty-lines: 1" option there will be an undesired empty line
> > after the
> > date three and the first heading added with the capture interface.
>
> In a way I disagree here. I you want empty lines, I think it makes
> quite some sense to alway have them on both sides. I guess we could
> allow a value of '(1 0) for :empty-lines, but you need to rally some
> support from others for this complication.
>
> > Not
> > very important though.
>
> :)
>
> > - At last, I frequently need to add a new line in a table in my main
> > org
> > file and the "table-line" entry type will be very useful. However
> > for it
> > to work I need a way to tell org-capture to add the filled
> > information
> > to a line relative to the end of the table. The table is in a form
> > | Name | Price |
> > |--------+-------|
> > | Item 1 | 1.30 |
> > | Item 2 | 13.14 |
> > |--------+-------|
> > | Total | 14.44 |
> > #+TBLFM: @4$2=vsum(@2..@-1);%.2f
> > I need a way to add the line after the line with "Item 2".
>
> Yes, I think that makes sense. When you pull again, try to set the
> property
>
> :table-line-pos "II-1"
>
> for the template. This will tell org-capture to place the new line so
> that it
> becomes the first line before the second hline. That should do the
> trick, I think.
>
>
> > To be really
> > fantastic org could also evaluate all formulas in the table after
> > that.
>
> That was already the case. If the table has formulas, they are
> evaluated
> (but not iterated...) when you finish the capture :)
>
> Thanks for your input!
>
> - Carsten
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-23 17:00 ` Darlan Cavalcante Moreira
@ 2010-06-24 5:20 ` Carsten Dominik
0 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-24 5:20 UTC (permalink / raw)
To: Darlan Cavalcante Moreira; +Cc: Org Mode
On Jun 23, 2010, at 7:00 PM, Darlan Cavalcante Moreira wrote:
>
> Thank you very much Carsten.
> It works very well.
>
> One small detail is that if the cursor is not in the table when it is
> refiled then the formula is not evaluated. Most users probably won't
> notice
> this and it also works correctly when using the :immediate-finish
> option.
>
>
> However, when testing this I think I found a bug that could be
> serious. Suppose that I set a template to ask me the name and price
> for a
> new item in the table. If I type C-g at this point the capture
> buffer will
> be buried but still available and unsaved. If the user saves this
> file the
> original file will be overwritten and all information there will be
> lost. Even if the user realises the mistake just after saving the file
> there is no way to recover the content because all undo information
> was
> lost.
Hi Darlan,
I have fixed this issue.
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: New implementation of the Org remember process ready for comments and testing
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
` (12 preceding siblings ...)
2010-06-23 14:05 ` Darlan Cavalcante Moreira
@ 2010-06-24 1:32 ` Bernt Hansen
2010-06-24 2:25 ` BUG: org-capture saves an incorrect clock marker in org-clock-history Bernt Hansen
2010-06-24 2:36 ` Re: New implementation of the Org remember process ready for comments and testing Nick Dokos
2010-07-05 11:22 ` capture template: %& and %! Memnon Anon
14 siblings, 2 replies; 67+ messages in thread
From: Bernt Hansen @ 2010-06-24 1:32 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> 6.4 Multiple capture events going on at the same time
> ======================================================
>
> If you need to capture something while already capturing something
> else, you can now do so. Finishing the second process will
> automatically return you to the window setup of the first one.
>
> Bernt, this might lead to confusing results if you would try to
> port your immediate clock-in, clock-out code. It will probably be
> better (if you decide at all to try the new code) to use the
> built-in :clock-in and :clock-resume properties:
>
> These will even work for a chain: start capture 1, then 2, then 3,
> finalize 3, then 2, then 1, and the previous clock will be
> restarted each time. Only when you finish the captures in a
> different sequence, then the clock-resume stuff will lead to
> undefined results.
Hi Carsten,
I'm trying out the new capture mode and it works pretty well. The clock
in and resume functions work really well :)
One thing I'm missing is I have a function that changes my TODO state to
NEXT on clock in except when I'm creating a new remember-mode task.
I need a similar way to tell if I'm in a capture-mode buffer to prevent
changing the todo state to NEXT on clock-in.
I can use the buffer name which starts with "CAPTURE-" and ends in
".org" but that feels kind of hackish. Is there a variable or function
available that I can use to tell if I'm clocking in a task in a capture
buffer?
Something like (capture-mode-p) maybe?
How do you recommend I deal with this?
Thanks,
Bernt
^ permalink raw reply [flat|nested] 67+ messages in thread
* BUG: org-capture saves an incorrect clock marker in org-clock-history
2010-06-24 1:32 ` Bernt Hansen
@ 2010-06-24 2:25 ` Bernt Hansen
2010-06-24 5:39 ` Carsten Dominik
2010-06-24 2:36 ` Re: New implementation of the Org remember process ready for comments and testing Nick Dokos
1 sibling, 1 reply; 67+ messages in thread
From: Bernt Hansen @ 2010-06-24 2:25 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Hi Carsten,
I have the following templates converted from my remember templates.
I've enabled clock in and clock resume for all templates.
(global-set-key (kbd "C-c c") 'org-capture)
org-capture-templates
Value:
(("t" "todo" entry
(file "~/git/org/refile.org")
"* TODO %?\n %U\n %a" :clock-in t :clock-resume t)
("n" "note" entry
(file "~/git/org/refile.org")
"* %? :NOTE:\n %U\n %a\n :CLOCK:\n :END:" :clock-in t :clock-resume t)
("a" "appointment" entry
(file+headline "~/git/org/todo.org" "Appointments")
"* %?\n %U" :clock-in t :clock-resume t)
("w" "org-protocol" entry
(file "~/git/org/refile.org")
"* TODO Review %c\n %U" :immediate-finish t :clock-in t :clock-resume t))
If I try to create a simple capture note with the 't' template like
this:
C-c c t
and then file the note with C-c C-c
org-clock-history gets a marker in no buffer added to the list.
org-clock-history is a variable defined in `org-clock.el'.
Its value is
(#<marker in no buffer> #<marker at 253 in refile.org> #<marker at 59699 in org.org> ...
^^^^^^^^^^^^^^^^^^^^^^^
Clocking in another task cleans up the clock history but this entry is
wrong. I have a function mapped to F9-SPC that goes to the last clocked
in task by using the marker from org-clock-history directly and when it
hits this marker in no buffer it fails with an error.
(global-set-key (kbd "<f9> SPC") 'bh/clock-in-last-task)
(defun bh/clock-in-last-task ()
"Clock in the interrupted task if there is one"
(interactive)
(let ((clock-in-to-task (if (org-clock-is-active)
(setq clock-in-to-task (cadr org-clock-history))
(setq clock-in-to-task (car org-clock-history)))))
(org-with-point-at clock-in-to-task
(org-clock-in nil))))
Let me know if you need any additional information.
Regards,
Bernt
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: BUG: org-capture saves an incorrect clock marker in org-clock-history
2010-06-24 2:25 ` BUG: org-capture saves an incorrect clock marker in org-clock-history Bernt Hansen
@ 2010-06-24 5:39 ` Carsten Dominik
2010-06-24 13:37 ` Bernt Hansen
0 siblings, 1 reply; 67+ messages in thread
From: Carsten Dominik @ 2010-06-24 5:39 UTC (permalink / raw)
To: Bernt Hansen; +Cc: Org Mode
Hi Bernt,
this one should be fixed now.
- Carsten
On Jun 24, 2010, at 4:25 AM, Bernt Hansen wrote:
> Hi Carsten,
>
> I have the following templates converted from my remember templates.
> I've enabled clock in and clock resume for all templates.
>
> (global-set-key (kbd "C-c c") 'org-capture)
>
> org-capture-templates
> Value:
> (("t" "todo" entry
> (file "~/git/org/refile.org")
> "* TODO %?\n %U\n %a" :clock-in t :clock-resume t)
> ("n" "note" entry
> (file "~/git/org/refile.org")
> "*
> %? :NOTE
> :\n %U\n %a\n :CLOCK:\n :END:" :clock-in t :clock-resume t)
> ("a" "appointment" entry
> (file+headline "~/git/org/todo.org" "Appointments")
> "* %?\n %U" :clock-in t :clock-resume t)
> ("w" "org-protocol" entry
> (file "~/git/org/refile.org")
> "* TODO Review %c\n %U" :immediate-finish t :clock-in t :clock-
> resume t))
>
> If I try to create a simple capture note with the 't' template like
> this:
>
> C-c c t
> and then file the note with C-c C-c
>
> org-clock-history gets a marker in no buffer added to the list.
>
> org-clock-history is a variable defined in `org-clock.el'.
> Its value is
> (#<marker in no buffer> #<marker at 253 in refile.org> #<marker at
> 59699 in org.org> ...
> ^^^^^^^^^^^^^^^^^^^^^^^
>
> Clocking in another task cleans up the clock history but this entry is
> wrong. I have a function mapped to F9-SPC that goes to the last
> clocked
> in task by using the marker from org-clock-history directly and when
> it
> hits this marker in no buffer it fails with an error.
>
> (global-set-key (kbd "<f9> SPC") 'bh/clock-in-last-task)
>
> (defun bh/clock-in-last-task ()
> "Clock in the interrupted task if there is one"
> (interactive)
> (let ((clock-in-to-task (if (org-clock-is-active)
> (setq clock-in-to-task (cadr org-clock-history))
> (setq clock-in-to-task (car org-clock-history)))))
> (org-with-point-at clock-in-to-task
> (org-clock-in nil))))
>
> Let me know if you need any additional information.
>
> Regards,
> Bernt
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: BUG: org-capture saves an incorrect clock marker in org-clock-history
2010-06-24 5:39 ` Carsten Dominik
@ 2010-06-24 13:37 ` Bernt Hansen
0 siblings, 0 replies; 67+ messages in thread
From: Bernt Hansen @ 2010-06-24 13:37 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Thanks this works now.
Regards,
Bernt
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Hi Bernt,
>
> this one should be fixed now.
>
> - Carsten
>
> On Jun 24, 2010, at 4:25 AM, Bernt Hansen wrote:
>
>> Hi Carsten,
>>
>> I have the following templates converted from my remember templates.
>> I've enabled clock in and clock resume for all templates.
>>
>> (global-set-key (kbd "C-c c") 'org-capture)
>>
>> org-capture-templates
>> Value:
>> (("t" "todo" entry
>> (file "~/git/org/refile.org")
>> "* TODO %?\n %U\n %a" :clock-in t :clock-resume t)
>> ("n" "note" entry
>> (file "~/git/org/refile.org")
>> "* %?
>> :NOTE :\n %U\n %a\n :CLOCK:\n :END:" :clock-in t :clock-resume
>> t)
>> ("a" "appointment" entry
>> (file+headline "~/git/org/todo.org" "Appointments")
>> "* %?\n %U" :clock-in t :clock-resume t)
>> ("w" "org-protocol" entry
>> (file "~/git/org/refile.org")
>> "* TODO Review %c\n %U" :immediate-finish t :clock-in t :clock-
>> resume t))
>>
>> If I try to create a simple capture note with the 't' template like
>> this:
>>
>> C-c c t
>> and then file the note with C-c C-c
>>
>> org-clock-history gets a marker in no buffer added to the list.
>>
>> org-clock-history is a variable defined in `org-clock.el'.
>> Its value is
>> (#<marker in no buffer> #<marker at 253 in refile.org> #<marker at
>> 59699 in org.org> ...
>> ^^^^^^^^^^^^^^^^^^^^^^^
>>
>> Clocking in another task cleans up the clock history but this entry is
>> wrong. I have a function mapped to F9-SPC that goes to the last
>> clocked
>> in task by using the marker from org-clock-history directly and when
>> it
>> hits this marker in no buffer it fails with an error.
>>
>> (global-set-key (kbd "<f9> SPC") 'bh/clock-in-last-task)
>>
>> (defun bh/clock-in-last-task ()
>> "Clock in the interrupted task if there is one"
>> (interactive)
>> (let ((clock-in-to-task (if (org-clock-is-active)
>> (setq clock-in-to-task (cadr org-clock-history))
>> (setq clock-in-to-task (car org-clock-history)))))
>> (org-with-point-at clock-in-to-task
>> (org-clock-in nil))))
>>
>> Let me know if you need any additional information.
>>
>> Regards,
>> Bernt
>
> - Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Re: New implementation of the Org remember process ready for comments and testing
2010-06-24 1:32 ` Bernt Hansen
2010-06-24 2:25 ` BUG: org-capture saves an incorrect clock marker in org-clock-history Bernt Hansen
@ 2010-06-24 2:36 ` Nick Dokos
2010-06-24 2:37 ` Bernt Hansen
1 sibling, 1 reply; 67+ messages in thread
From: Nick Dokos @ 2010-06-24 2:36 UTC (permalink / raw)
To: Bernt Hansen; +Cc: nicholas.dokos, Org Mode, Carsten Dominik
Bernt Hansen <bernt@norang.ca> wrote:
>
> One thing I'm missing is I have a function that changes my TODO state to
> NEXT on clock in except when I'm creating a new remember-mode task.
>
> I need a similar way to tell if I'm in a capture-mode buffer to prevent
> changing the todo state to NEXT on clock-in.
>
> I can use the buffer name which starts with "CAPTURE-" and ends in
> ".org" but that feels kind of hackish. Is there a variable or function
> available that I can use to tell if I'm clocking in a task in a capture
> buffer?
>
> Something like (capture-mode-p) maybe?
>
Maybe this?
,----
| org-capture-mode is a variable defined in `org-capture.el'.
| Its value is t
| Local in buffer CAPTURE-work.org; global value is nil
|
| Automatically becomes buffer-local when set in any fashion.
|
| Documentation:
| Non-nil if Org-Capture mode is enabled.
| Use the command `org-capture-mode' to change this variable.
`----
HTH,
Nick
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Re: New implementation of the Org remember process ready for comments and testing
2010-06-24 2:36 ` Re: New implementation of the Org remember process ready for comments and testing Nick Dokos
@ 2010-06-24 2:37 ` Bernt Hansen
2010-06-24 2:41 ` Bernt Hansen
0 siblings, 1 reply; 67+ messages in thread
From: Bernt Hansen @ 2010-06-24 2:37 UTC (permalink / raw)
To: nicholas.dokos; +Cc: Org Mode, Carsten Dominik
Nick Dokos <nicholas.dokos@hp.com> writes:
> Bernt Hansen <bernt@norang.ca> wrote:
>
>>
>> One thing I'm missing is I have a function that changes my TODO state to
>> NEXT on clock in except when I'm creating a new remember-mode task.
>>
>> I need a similar way to tell if I'm in a capture-mode buffer to prevent
>> changing the todo state to NEXT on clock-in.
>>
>> I can use the buffer name which starts with "CAPTURE-" and ends in
>> ".org" but that feels kind of hackish. Is there a variable or function
>> available that I can use to tell if I'm clocking in a task in a capture
>> buffer?
>>
>> Something like (capture-mode-p) maybe?
>>
>
> Maybe this?
>
> ,----
> | org-capture-mode is a variable defined in `org-capture.el'.
> | Its value is t
> | Local in buffer CAPTURE-work.org; global value is nil
> |
> | Automatically becomes buffer-local when set in any fashion.
> |
> | Documentation:
> | Non-nil if Org-Capture mode is enabled.
> | Use the command `org-capture-mode' to change this variable.
> `----
I tried that but couldn't get it to work :)
-Bernt
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Re: New implementation of the Org remember process ready for comments and testing
2010-06-24 2:37 ` Bernt Hansen
@ 2010-06-24 2:41 ` Bernt Hansen
2010-06-24 2:57 ` Capture mode seems to be easily confused in Emacs 22 Bernt Hansen
0 siblings, 1 reply; 67+ messages in thread
From: Bernt Hansen @ 2010-06-24 2:41 UTC (permalink / raw)
To: nicholas.dokos; +Cc: Org Mode, Carsten Dominik
Bernt Hansen <bernt@norang.ca> writes:
> Nick Dokos <nicholas.dokos@hp.com> writes:
>
>> Bernt Hansen <bernt@norang.ca> wrote:
>>
>>>
>>> One thing I'm missing is I have a function that changes my TODO state to
>>> NEXT on clock in except when I'm creating a new remember-mode task.
>>>
>>> I need a similar way to tell if I'm in a capture-mode buffer to prevent
>>> changing the todo state to NEXT on clock-in.
>>>
>>> I can use the buffer name which starts with "CAPTURE-" and ends in
>>> ".org" but that feels kind of hackish. Is there a variable or function
>>> available that I can use to tell if I'm clocking in a task in a capture
>>> buffer?
>>>
>>> Something like (capture-mode-p) maybe?
>>>
>>
>> Maybe this?
>>
>> ,----
>> | org-capture-mode is a variable defined in `org-capture.el'.
>> | Its value is t
>> | Local in buffer CAPTURE-work.org; global value is nil
>> |
>> | Automatically becomes buffer-local when set in any fashion.
>> |
>> | Documentation:
>> | Non-nil if Org-Capture mode is enabled.
>> | Use the command `org-capture-mode' to change this variable.
>> `----
>
> I tried that but couldn't get it to work :)
Actually that seems to work in Emacs 23 but not in Emacs 22. It's value
is always nil in emacs 22.
GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of 2008-11-09
on raven, modified by Debian
-Bernt
^ permalink raw reply [flat|nested] 67+ messages in thread
* Capture mode seems to be easily confused in Emacs 22
2010-06-24 2:41 ` Bernt Hansen
@ 2010-06-24 2:57 ` Bernt Hansen
2010-06-24 5:44 ` Carsten Dominik
0 siblings, 1 reply; 67+ messages in thread
From: Bernt Hansen @ 2010-06-24 2:57 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Hi Carsten,
In my Emacs 22 on Debian
GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of 2008-11-09
on raven, modified by Debian
if I start a capture buffer with C-c c t and then immediately try to
file it with C-c C-c (with the point still on the heading) it prompts
for tags instead of filing. This seems to work fine in Emacs 23.
In Emacs 22 I end up in the CAPTURE-refile.org buffer with the overlay
on line 1 stating to use C-c C-c to file and C-c C-k to abort but these
keys no longer work. Widening the buffer and using C-c C-c on
the #+STARTUP line refreshes the config and makes it possible to
continue.
Regards,
Bernt
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Capture mode seems to be easily confused in Emacs 22
2010-06-24 2:57 ` Capture mode seems to be easily confused in Emacs 22 Bernt Hansen
@ 2010-06-24 5:44 ` Carsten Dominik
2010-06-24 12:26 ` Bernt Hansen
0 siblings, 1 reply; 67+ messages in thread
From: Carsten Dominik @ 2010-06-24 5:44 UTC (permalink / raw)
To: Bernt Hansen; +Cc: Org Mode
On Jun 24, 2010, at 4:57 AM, Bernt Hansen wrote:
> Hi Carsten,
>
> In my Emacs 22 on Debian
>
> GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of
> 2008-11-09
> on raven, modified by Debian
>
> if I start a capture buffer with C-c c t and then immediately try to
> file it with C-c C-c (with the point still on the heading) it prompts
> for tags instead of filing. This seems to work fine in Emacs 23.
>
> In Emacs 22 I end up in the CAPTURE-refile.org buffer with the overlay
> on line 1 stating to use C-c C-c to file and C-c C-k to abort but
> these
> keys no longer work. Widening the buffer and using C-c C-c on
> the #+STARTUP line refreshes the config and makes it possible to
> continue.
Hi Bernt,
this is strange, and also a sign that org-capture-mode is not active
in that buffer. My preliminary test show that it works here under
emacs 22.
Anything suspicious in *Messages* ?
Regards
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Capture mode seems to be easily confused in Emacs 22
2010-06-24 5:44 ` Carsten Dominik
@ 2010-06-24 12:26 ` Bernt Hansen
2010-06-24 12:46 ` Carsten Dominik
0 siblings, 1 reply; 67+ messages in thread
From: Bernt Hansen @ 2010-06-24 12:26 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> On Jun 24, 2010, at 4:57 AM, Bernt Hansen wrote:
>
>> In my Emacs 22 on Debian
>>
>> GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of
>> 2008-11-09
>> on raven, modified by Debian
>>
>> if I start a capture buffer with C-c c t and then immediately try to
>> file it with C-c C-c (with the point still on the heading) it prompts
>> for tags instead of filing. This seems to work fine in Emacs 23.
>>
>> In Emacs 22 I end up in the CAPTURE-refile.org buffer with the overlay
>> on line 1 stating to use C-c C-c to file and C-c C-k to abort but
>> these
>> keys no longer work. Widening the buffer and using C-c C-c on
>> the #+STARTUP line refreshes the config and makes it possible to
>> continue.
>
> this is strange, and also a sign that org-capture-mode is not active
> in that buffer. My preliminary test show that it works here under
> emacs 22.
>
> Anything suspicious in *Messages* ?
The toggling capture mode off message look suspicious.
,----
| Loading /home/bernt/git/org-mode/lisp/org-capture.el (source)...done
| Template key:
| Loading tabify...done
| Clipboard pasted as level 1 subtree
| Toggling org-capture-mode off; better pass an explicit argument.
| Clock starts at [2010-06-24 Thu 08:24] - showing entire task time.
`----
-Bernt
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Capture mode seems to be easily confused in Emacs 22
2010-06-24 12:26 ` Bernt Hansen
@ 2010-06-24 12:46 ` Carsten Dominik
2010-06-24 13:14 ` Bernt Hansen
2010-06-24 13:32 ` Bernt Hansen
0 siblings, 2 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-24 12:46 UTC (permalink / raw)
To: Bernt Hansen; +Cc: Org Mode
On Jun 24, 2010, at 2:26 PM, Bernt Hansen wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On Jun 24, 2010, at 4:57 AM, Bernt Hansen wrote:
>>
>>> In my Emacs 22 on Debian
>>>
>>> GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of
>>> 2008-11-09
>>> on raven, modified by Debian
>>>
>>> if I start a capture buffer with C-c c t and then immediately try to
>>> file it with C-c C-c (with the point still on the heading) it
>>> prompts
>>> for tags instead of filing. This seems to work fine in Emacs 23.
>>>
>>> In Emacs 22 I end up in the CAPTURE-refile.org buffer with the
>>> overlay
>>> on line 1 stating to use C-c C-c to file and C-c C-k to abort but
>>> these
>>> keys no longer work. Widening the buffer and using C-c C-c on
>>> the #+STARTUP line refreshes the config and makes it possible to
>>> continue.
>>
>
>> this is strange, and also a sign that org-capture-mode is not active
>> in that buffer. My preliminary test show that it works here under
>> emacs 22.
>>
>> Anything suspicious in *Messages* ?
>
> The toggling capture mode off message look suspicious.
>
> ,----
> | Loading /home/bernt/git/org-mode/lisp/org-capture.el (source)...done
> | Template key:
> | Loading tabify...done
> | Clipboard pasted as level 1 subtree
> | Toggling org-capture-mode off; better pass an explicit argument.
> | Clock starts at [2010-06-24 Thu 08:24] - showing entire task time.
> `----
Hi Bernt,
I suspect that you use
(org-capture-mode)
in one of your hook function, in order to check if the mode is on.
However, this is a function call, and it will TOGGLE the mode, so you
are turning it off.
Just remove the parenthesis, to test the *variable*
(if org-capture-mode
.........
If you want to protect yourself from running this hook before org-
capture
is is loaded and org-capture-mode defined, you can do
(if (and (boundp 'org-capture-mode) org-capture-mode
......
I am willing to bet that this is the problem you are experiencing. :-)
Cheers
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Capture mode seems to be easily confused in Emacs 22
2010-06-24 12:46 ` Carsten Dominik
@ 2010-06-24 13:14 ` Bernt Hansen
2010-06-24 13:21 ` Carsten Dominik
2010-06-24 13:32 ` Bernt Hansen
1 sibling, 1 reply; 67+ messages in thread
From: Bernt Hansen @ 2010-06-24 13:14 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> On Jun 24, 2010, at 2:26 PM, Bernt Hansen wrote:
>
>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>>
>>> On Jun 24, 2010, at 4:57 AM, Bernt Hansen wrote:
>>>
>>>> In my Emacs 22 on Debian
>>>>
>>>> GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of
>>>> 2008-11-09
>>>> on raven, modified by Debian
>>>>
>>>> if I start a capture buffer with C-c c t and then immediately try to
>>>> file it with C-c C-c (with the point still on the heading) it
>>>> prompts
>>>> for tags instead of filing. This seems to work fine in Emacs 23.
>>>>
>>>> In Emacs 22 I end up in the CAPTURE-refile.org buffer with the
>>>> overlay
>>>> on line 1 stating to use C-c C-c to file and C-c C-k to abort but
>>>> these
>>>> keys no longer work. Widening the buffer and using C-c C-c on
>>>> the #+STARTUP line refreshes the config and makes it possible to
>>>> continue.
>>>
>>
>>> this is strange, and also a sign that org-capture-mode is not active
>>> in that buffer. My preliminary test show that it works here under
>>> emacs 22.
>>>
>>> Anything suspicious in *Messages* ?
>>
>> The toggling capture mode off message look suspicious.
>>
>> ,----
>> | Loading /home/bernt/git/org-mode/lisp/org-capture.el (source)...done
>> | Template key:
>> | Loading tabify...done
>> | Clipboard pasted as level 1 subtree
>> | Toggling org-capture-mode off; better pass an explicit argument.
>> | Clock starts at [2010-06-24 Thu 08:24] - showing entire task time.
>> `----
>
> Hi Bernt,
>
> I suspect that you use
>
> (org-capture-mode)
>
> in one of your hook function, in order to check if the mode is on.
> However, this is a function call, and it will TOGGLE the mode, so you
> are turning it off.
>
> Just remove the parenthesis, to test the *variable*
>
> (if org-capture-mode
> .........
>
> If you want to protect yourself from running this hook before org-
> capture
> is is loaded and org-capture-mode defined, you can do
>
> (if (and (boundp 'org-capture-mode) org-capture-mode
> ......
>
> I am willing to bet that this is the problem you are experiencing. :-)
*BINGO*. Duh now I feel stupid :)
Sorry about that snafu. /me blames it on the guy that named the
variable and function the same thing ;)
After my post to Nick about not being able to use the capture mode
*variable* I promptly updated my clock in to NEXT function to try to use
it and I wrapped org-capture-mode in parens... so it called the
function.
Just FYI this is my new function
,----
| (defun bh/clock-in-to-next (kw)
| "Switch task from TODO to NEXT when clocking in.
| Skips remember tasks and tasks with subtasks"
| (if (and (string-equal kw "TODO")
| (not (string-equal (buffer-name) "*Remember*"))
| ; (not (string-match "^CAPTURE-.*\.org" (buffer-name) )))
| (not org-capture-mode))
| (let ((subtree-end (save-excursion (org-end-of-subtree t)))
| (has-subtask nil))
| (save-excursion
| (forward-line 1)
| (while (and (not has-subtask)
| (< (point) subtree-end)
| (re-search-forward "^\*+ " subtree-end t))
| (message "Found todo keyword %s" (org-get-todo-state))
| (when (member (org-get-todo-state) org-not-done-keywords)
| (setq has-subtask t))))
| (when (not has-subtask)
| "NEXT"))))
`----
and the call to org-capture-mode used to look like this
,----
| (not (org-capture-mode)))
`----
Thank for solving this one!
Best regards,
Bernt
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Capture mode seems to be easily confused in Emacs 22
2010-06-24 13:14 ` Bernt Hansen
@ 2010-06-24 13:21 ` Carsten Dominik
0 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-06-24 13:21 UTC (permalink / raw)
To: Bernt Hansen; +Cc: Org Mode
On Jun 24, 2010, at 3:14 PM, Bernt Hansen wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On Jun 24, 2010, at 2:26 PM, Bernt Hansen wrote:
>>
>>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>>>
>>>> On Jun 24, 2010, at 4:57 AM, Bernt Hansen wrote:
>>>>
>>>>> In my Emacs 22 on Debian
>>>>>
>>>>> GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of
>>>>> 2008-11-09
>>>>> on raven, modified by Debian
>>>>>
>>>>> if I start a capture buffer with C-c c t and then immediately
>>>>> try to
>>>>> file it with C-c C-c (with the point still on the heading) it
>>>>> prompts
>>>>> for tags instead of filing. This seems to work fine in Emacs 23.
>>>>>
>>>>> In Emacs 22 I end up in the CAPTURE-refile.org buffer with the
>>>>> overlay
>>>>> on line 1 stating to use C-c C-c to file and C-c C-k to abort but
>>>>> these
>>>>> keys no longer work. Widening the buffer and using C-c C-c on
>>>>> the #+STARTUP line refreshes the config and makes it possible to
>>>>> continue.
>>>>
>>>
>>>> this is strange, and also a sign that org-capture-mode is not
>>>> active
>>>> in that buffer. My preliminary test show that it works here under
>>>> emacs 22.
>>>>
>>>> Anything suspicious in *Messages* ?
>>>
>>> The toggling capture mode off message look suspicious.
>>>
>>> ,----
>>> | Loading /home/bernt/git/org-mode/lisp/org-capture.el
>>> (source)...done
>>> | Template key:
>>> | Loading tabify...done
>>> | Clipboard pasted as level 1 subtree
>>> | Toggling org-capture-mode off; better pass an explicit argument.
>>> | Clock starts at [2010-06-24 Thu 08:24] - showing entire task time.
>>> `----
>>
>> Hi Bernt,
>>
>> I suspect that you use
>>
>> (org-capture-mode)
>>
>> in one of your hook function, in order to check if the mode is on.
>> However, this is a function call, and it will TOGGLE the mode, so you
>> are turning it off.
>>
>> Just remove the parenthesis, to test the *variable*
>>
>> (if org-capture-mode
>> .........
>>
>> If you want to protect yourself from running this hook before org-
>> capture
>> is is loaded and org-capture-mode defined, you can do
>>
>> (if (and (boundp 'org-capture-mode) org-capture-mode
>> ......
>>
>> I am willing to bet that this is the problem you are
>> experiencing. :-)
>
> *BINGO*. Duh now I feel stupid :)
Don't. I have been there, and I am sure others too. :-)
So I guess that means that your setup is working now?
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: Capture mode seems to be easily confused in Emacs 22
2010-06-24 12:46 ` Carsten Dominik
2010-06-24 13:14 ` Bernt Hansen
@ 2010-06-24 13:32 ` Bernt Hansen
1 sibling, 0 replies; 67+ messages in thread
From: Bernt Hansen @ 2010-06-24 13:32 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> If you want to protect yourself from running this hook before org-
> capture
> is is loaded and org-capture-mode defined, you can do
>
> (if (and (boundp 'org-capture-mode) org-capture-mode
> ......
And yes I need this -- thanks!
-Bernt
^ permalink raw reply [flat|nested] 67+ messages in thread
* capture template: %& and %!
2010-06-22 12:36 New implementation of the Org remember process ready for comments and testing Carsten Dominik
` (13 preceding siblings ...)
2010-06-24 1:32 ` Bernt Hansen
@ 2010-07-05 11:22 ` Memnon Anon
2010-07-05 12:50 ` Carsten Dominik
14 siblings, 1 reply; 67+ messages in thread
From: Memnon Anon @ 2010-07-05 11:22 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Hi,
I was just experimenting with the new capture interface and I *really*
like it :).
I see some problem with these escape sequences:
,----[ (info "(org)Template expansion") ]
| %! immediately store note after completing the template
| (skipping the `C-c C-c' that normally triggers storing)
| %& jump to target location immediately after storing note
`----
I can't get them to be recognized, they are inserted literally.
On a second look, I saw that %! is now implemented as a Property:
,----[ (info "(org)Template elements") ]
| PROPERTIES
[...]
| `:immediate-finish'
| When set, do not offer to edit the information, just file it
| away immediately. This makes sense if the template only needs
| information that can be added automatically.
`----
So, my guess is that %! and %& are probably related to org-*remember*,
but not org-capture? If so, this could be made clearer in the docs, I
guess?
If this is not the case, I will go on and try to get it working.
Memnon
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: capture template: %& and %!
2010-07-05 11:22 ` capture template: %& and %! Memnon Anon
@ 2010-07-05 12:50 ` Carsten Dominik
2010-07-05 13:18 ` Memnon Anon
0 siblings, 1 reply; 67+ messages in thread
From: Carsten Dominik @ 2010-07-05 12:50 UTC (permalink / raw)
To: Memnon Anon; +Cc: Org Mode
On Jul 5, 2010, at 1:22 PM, Memnon Anon wrote:
> Hi,
>
> I was just experimenting with the new capture interface and I *really*
> like it :).
>
> I see some problem with these escape sequences:
>
> ,----[ (info "(org)Template expansion") ]
> | %! immediately store note after completing the
> template
> | (skipping the `C-c C-c' that normally triggers
> storing)
> | %& jump to target location immediately after storing
> note
> `----
>
> I can't get them to be recognized, they are inserted literally.
Both are no longer supported. They make no sense with org-capture.
As you have seen, :immediate-finish replaces %!, and every capture
process
makes you go to the target place while editing the entry - just
try `M-x widen' in a CAPTURE... buffer to see what I mean.
- Carsten
>
> On a second look, I saw that %! is now implemented as a Property:
>
> ,----[ (info "(org)Template elements") ]
> | PROPERTIES
> [...]
> | `:immediate-finish'
> | When set, do not offer to edit the information, just
> file it
> | away immediately. This makes sense if the template only
> needs
> | information that can be added automatically.
> `----
>
> So, my guess is that %! and %& are probably related to org-*remember*,
> but not org-capture? If so, this could be made clearer in the docs, I
> guess?
>
> If this is not the case, I will go on and try to get it working.
>
> Memnon
>
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: capture template: %& and %!
2010-07-05 12:50 ` Carsten Dominik
@ 2010-07-05 13:18 ` Memnon Anon
2010-07-05 13:26 ` Carsten Dominik
0 siblings, 1 reply; 67+ messages in thread
From: Memnon Anon @ 2010-07-05 13:18 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Both are no longer supported. They make no sense with org-capture.
> As you have seen, :immediate-finish replaces %!, and every capture
> process
> makes you go to the target place while editing the entry - just
> try `M-x widen' in a CAPTURE... buffer to see what I mean.
Okay, exactly what I thought.
Thanks for confirmation.
> If so, this could be made clearer in the docs, I guess?
%! immediately store note after completing the template
(skipping the `C-c C-c' that normally triggers storing)
(org-remember only)
%& jump to target location immediately after storing note
(org-remember only)
Or a simple footnote...
Memnon
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: capture template: %& and %!
2010-07-05 13:18 ` Memnon Anon
@ 2010-07-05 13:26 ` Carsten Dominik
0 siblings, 0 replies; 67+ messages in thread
From: Carsten Dominik @ 2010-07-05 13:26 UTC (permalink / raw)
To: Memnon Anon; +Cc: Org Mode
Yes, this was a bug in the docs, thanks.
- Carsten
On Jul 5, 2010, at 3:18 PM, Memnon Anon wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Both are no longer supported. They make no sense with org-capture.
>> As you have seen, :immediate-finish replaces %!, and every capture
>> process
>> makes you go to the target place while editing the entry - just
>> try `M-x widen' in a CAPTURE... buffer to see what I mean.
>
> Okay, exactly what I thought.
> Thanks for confirmation.
>
>> If so, this could be made clearer in the docs, I guess?
>
> %! immediately store note after completing the template
> (skipping the `C-c C-c' that normally triggers storing)
> (org-remember only)
> %& jump to target location immediately after storing note
> (org-remember only)
>
> Or a simple footnote...
>
> Memnon
>
>
>
>
- Carsten
^ permalink raw reply [flat|nested] 67+ messages in thread