I am trying to improve my org-fu, and one of my tasks is updating list items. I usually prefer to use list items for various reasons (mainly without clogging up my CONTENT view and having a real plan, given the number of tasks I have).
But, alas, when I try to update the list item created using the capture system, I get an error message - I am not allowed to do this because it "does not make sense".
Is there any way to undo this behavior?
Edit: ATM. I only manage to restore the entries (i.e. Headings) and then convert them manually to list items. I guess there is a better solution than this ...
I found this function in org-capture.el:
(defun org-capture-refile () "Finalize the current capture and then refile the entry. Refiling is done from the base buffer, because the indirect buffer is then already gone. Any prefix argument will be passed to the refile command." (interactive) (unless (eq (org-capture-get :type 'local) 'entry) (error "Refiling from a capture buffer makes only sense for `entry'-type templates")) (let ((pos (point)) (base (buffer-base-buffer (current-buffer))) (org-refile-for-capture t)) (org-capture-finalize) (save-window-excursion (with-current-buffer (or base (current-buffer)) (save-excursion (save-restriction (widen) (goto-char pos) (call-interactively 'org-refile)))))))
How can I remove the part (unless (eq (org-capture-get :type 'local) 'entry) so that it can take effect?
Edit: 10/23/12
So far I have managed to get this to work:
(defun narrow-and-reveal () "Narrow and reveal all content" (org-narrow-to-subtree) (org-show-subtree) ) (defun widen-and-outline () "Widen and move to beginning of file" (widen) (beginning-of-buffer) (org-overview) (org-content) ) (defun org-goto-symbol () "Will navigate to the symbol at the current point of the cursor" (widen-and-outline) (interactive) (let ((current-prefix-arg 4)) ;; emulate Cu (call-interactively 'org-refile)) ;; invoke org-refile interactively (narrow-and-reveal) ) (defun custom-org-prompt-headline () (org-goto-symbol) ;; invoke org-refile interactively (end-of-buffer)) (setq org-capture-templates`( ("t" "ToDo" item (file+function (concat org-directory "ToDo.org") custom-org-prompt-headline))))
But it asks for a section in the file before entering the list item, which I find distracting. I just would like to be able to update list items. I canβt imagine that it should be so hard to achieve ... is it?
source share