Re: [Orgmode] Bug: org-capture destroys target file when user aborting prompt in template [6.36trans (release_6.36.430.gec51)]
Hi David, thanks for the detailed report - nice catch. This was due to the fact that I am copying all local variables from the target buffer to the temp buffer, unfortunately including buffer-file-name :) THhis is fixed now - I hope you did not loose any data. - Carsten On Jun 27, 2010, at 7:48 AM, David Maus wrote: Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. When I use an org-capture template that prompts for something (e.g. headline title) and I abort the prompt (C-g), the capture process is aborted. When I quit Emacs right after this, it mentions the target file to be changed and asks if I would like to save the change. If I say yes, the target file is written to disk with just the skeleton of the template. Steps to reproduce: - setup capture targets with a prompt, e.g. (setq org-capture-templates '((t Task or appointment entry (file ~/org/inbox.org) * TODO %^{Todo} \n:PROPERTIES:\n:created: %U\n:END:\n\n%?) (m Task or appointment (internet message) entry (file ~/org/inbox.org) * TODO %:subject \n:PROPERTIES:\n:created: %U\n:END:\n\n%a\n\n%?) (i Idea (some day, may be) entry (file ~/org/inbox.org) * MAYBE %^{What} \n:PROPERTIES:\n:created: %U\n:END:\n\n%?) (n Note entry (file ~/org/inbox.org) * %:subject%^{Topic} :note:\n:PROPERTIES:\n:created: %U\n:END:\n\n %?) (p Project entry (file ~/org/inbox.org) * %^{Project} :project:\n:PROPERTIES:\n:created: %U\n:END:\n\n %?))) - call `org-capture' and select template with prompt (e.g. t) - when prompted, press C-g - quit Emacs, answer yes to save target file - *boom*, the target contains just: * TODO :PROPERTIES: :created: [2010-06-27 So 07:36] :END: %? Taking a quick look at this, I noticed that after aborting the prompt I have a buffer namend *Capture* with the skeletion of the template, i.e. exactly what is writting to disk when I leave Emacs. C-c C-k does not work in this buffer. And it is not even necessary to leave Emacs -- calling `org-save-all-org-buffers' seems to cause this buffer writting to target file. -- David Emacs : GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-05-16 on raven, modified by Debian Package: Org-mode version 6.36trans (release_6.36.430.gec51) current state: == (setq org-export-html-final-hook '(org-inlinetask-remove-terminator) org-log-done 'time org-wl-nntp-prefer-web-links t org-export-author-info nil org-export-latex-default-class scrartcl org-export-latex-after-initial-vars-hook '(org-beamer-after-initial- vars) org-todo-keyword-faces '((MAYBE :foreground coral :weight bold) (TODO :foreground red :weight bold) (NEXT :foreground orange red :weight bold) (WAIT :foreground dark red :weight bold) (DONE :foreground forest green :weight bold) (CANCELLED :foreground dark gray :weight bold)) org-wl-shimbun-prefer-web-links t org-agenda-custom-commands '((r Refile new tasks, projects, notes, and references tags LEVEL=1+REFILE ((org-agenda-overriding-header New tasks, projects, notes, and references))) (o Other tasks tags-todo STYLE\habit\/!TODO ((org-agenda-skip-function (quote dmj/has-timestamp)) (org-agenda-overriding-header Other tasks)) ) (n Next actions tags-todo /!NEXT ((org-agenda- overriding-header Next actions))) (M Someday/maybe tags-todo /!MAYBE) (p Projects tags project ((org-agenda-overriding- header Projects))) (P New projects tags-todo /!-DONE-CANCELLED ((org-agenda-overriding-header New projects) (org-agenda-skip-function (quote dmj/skip-non-project))) ) ) org-agenda-files '(~/org/) org-blocker-hook '(org-block-todo-from-children-or-siblings-or- parent org-depend-block-todo) org-agenda-tags-column -100 org-export-ascii-final-hook '(org-inlinetask-remove-terminator) org-hide-leading-stars t org-clock-into-drawer CLOCK org-checklist-export-function 'org-export-as-ascii org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current org- checklist) org-agenda-todo-ignore-scheduled t org-todo-state-tags-triggers '((todo (note))) org-log-state-notes-insert-after-drawers t org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup) org-export-latex-format-toc-function 'org-export-latex-format-toc- default
Re: [Orgmode] Bug: org-capture destroys target file when user aborting prompt in template [6.36trans (release_6.36.430.gec51)]
Hi Carsten, Carsten Dominik wrote: Hi David, thanks for the detailed report - nice catch. This was due to the fact that I am copying all local variables from the target buffer to the temp buffer, unfortunately including buffer-file-name :) THhis is fixed now - I hope you did not loose any data. Luckily I didn't, just a good rush of adrenalin :) It's still not entirely fixed: The target is not overwritten, but when I abort org-capture there is one of those #filename#-file (how are those called?) with the skeleton left behind. E.g. when aborting a template that files to ~/org/inbox.org and leaving Emacs (or calling `org-save-all-org-buffers' I get a ~/org/#inbox.org# with the template's skeleton. Thanks for the quick fix, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber dmj...@jabber.org Email. dm...@ictsoc.de pgptOP6waAXYf.pgp Description: PGP signature ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Bug: org-capture destroys target file when user aborting prompt in template [6.36trans (release_6.36.430.gec51)]
Hi David, can you please make me an example template and then the exact steps to reproduce this? Thank you. - Carsten On Jun 27, 2010, at 9:09 AM, David Maus wrote: Hi Carsten, Carsten Dominik wrote: Hi David, thanks for the detailed report - nice catch. This was due to the fact that I am copying all local variables from the target buffer to the temp buffer, unfortunately including buffer-file-name :) THhis is fixed now - I hope you did not loose any data. Luckily I didn't, just a good rush of adrenalin :) It's still not entirely fixed: The target is not overwritten, but when I abort org-capture there is one of those #filename#-file (how are those called?) with the skeleton left behind. E.g. when aborting a template that files to ~/org/inbox.org and leaving Emacs (or calling `org-save-all-org-buffers' I get a ~/org/#inbox.org# with the template's skeleton. Thanks for the quick fix, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber dmj...@jabber.org Email. dm...@ictsoc.de - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Bug: org-capture destroys target file when user aborting prompt in template [6.36trans (release_6.36.430.gec51)]
Carsten Dominik wrote: Hi David, can you please make me an example template and then the exact steps to reproduce this? Sure: - this template: (setq org-capture-templates '((t Task or appointment entry (file ~/test.org) * TODO %^{Todo}))) - call org-capture and abort on the prompt - quit Emacs and there it is , |dm...@t41 ~ % ls |bin/ code/ docs/ downloads/ git/ mail/ org/ #test.org# texmf/ www/ |dm...@t41 ~ % ` And there is another, smaller issue: If I call org-capture again after aborting the prompt the capture buffer contains the remains of the aborted capture. Version: Org-mode version 6.36trans (release_6.36.432.g1b2a2) HTH -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber dmj...@jabber.org Email. dm...@ictsoc.de pgpE831JlZhxX.pgp Description: PGP signature ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Bug: org-capture destroys target file when user aborting prompt in template [6.36trans (release_6.36.430.gec51)]
Hi David, thanks a lot. I have not been able to reproduce this, but maybe I have different setup with auto-save files. I have just improved the error catching code around the template filling, and I would like to ask you to pull again and see if the problem still persists. Sorry that this is not more straight forward. - Carsten On Jun 27, 2010, at 10:20 AM, David Maus wrote: Carsten Dominik wrote: Hi David, can you please make me an example template and then the exact steps to reproduce this? Sure: - this template: (setq org-capture-templates '((t Task or appointment entry (file ~/test.org) * TODO %^{Todo}))) - call org-capture and abort on the prompt - quit Emacs and there it is , |dm...@t41 ~ % ls |bin/ code/ docs/ downloads/ git/ mail/ org/ #test.org# texmf/ www/ |dm...@t41 ~ % ` And there is another, smaller issue: If I call org-capture again after aborting the prompt the capture buffer contains the remains of the aborted capture. Version: Org-mode version 6.36trans (release_6.36.432.g1b2a2) HTH -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber dmj...@jabber.org Email. dm...@ictsoc.de - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Bug: org-capture destroys target file when user aborting prompt in template [6.36trans (release_6.36.430.gec51)]
Carsten Dominik wrote: Hi David, thanks a lot. I have not been able to reproduce this, but maybe I have different setup with auto-save files. I have just improved the error catching code around the template filling, and I would like to ask you to pull again and see if the problem still persists. Yes, catching the quit works: No more wrong auto-save files (thanks Štěpán). Thanks -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber dmj...@jabber.org Email. dm...@ictsoc.de pgpZLnuBkCOAS.pgp Description: PGP signature ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Bug: org-capture destroys target file when user aborting prompt in template [6.36trans (release_6.36.430.gec51)]
Great, I am glad this is fixed. - Carsten On Jun 27, 2010, at 2:26 PM, David Maus wrote: Carsten Dominik wrote: Hi David, thanks a lot. I have not been able to reproduce this, but maybe I have different setup with auto-save files. I have just improved the error catching code around the template filling, and I would like to ask you to pull again and see if the problem still persists. Yes, catching the quit works: No more wrong auto-save files (thanks Štěpán). Thanks -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber dmj...@jabber.org Email. dm...@ictsoc.de - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Bug: org-capture destroys target file when user aborting prompt in template [6.36trans (release_6.36.430.gec51)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. When I use an org-capture template that prompts for something (e.g. headline title) and I abort the prompt (C-g), the capture process is aborted. When I quit Emacs right after this, it mentions the target file to be changed and asks if I would like to save the change. If I say yes, the target file is written to disk with just the skeleton of the template. Steps to reproduce: - setup capture targets with a prompt, e.g. (setq org-capture-templates '((t Task or appointment entry (file ~/org/inbox.org) * TODO %^{Todo} \n:PROPERTIES:\n:created: %U\n:END:\n\n%?) (m Task or appointment (internet message) entry (file ~/org/inbox.org) * TODO %:subject \n:PROPERTIES:\n:created: %U\n:END:\n\n%a\n\n%?) (i Idea (some day, may be) entry (file ~/org/inbox.org) * MAYBE %^{What} \n:PROPERTIES:\n:created: %U\n:END:\n\n%?) (n Note entry (file ~/org/inbox.org) * %:subject%^{Topic} :note:\n:PROPERTIES:\n:created: %U\n:END:\n\n%?) (p Project entry (file ~/org/inbox.org) * %^{Project} :project:\n:PROPERTIES:\n:created: %U\n:END:\n\n%?))) - call `org-capture' and select template with prompt (e.g. t) - when prompted, press C-g - quit Emacs, answer yes to save target file - *boom*, the target contains just: * TODO :PROPERTIES: :created: [2010-06-27 So 07:36] :END: %? Taking a quick look at this, I noticed that after aborting the prompt I have a buffer namend *Capture* with the skeletion of the template, i.e. exactly what is writting to disk when I leave Emacs. C-c C-k does not work in this buffer. And it is not even necessary to leave Emacs -- calling `org-save-all-org-buffers' seems to cause this buffer writting to target file. -- David Emacs : GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-05-16 on raven, modified by Debian Package: Org-mode version 6.36trans (release_6.36.430.gec51) current state: == (setq org-export-html-final-hook '(org-inlinetask-remove-terminator) org-log-done 'time org-wl-nntp-prefer-web-links t org-export-author-info nil org-export-latex-default-class scrartcl org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-todo-keyword-faces '((MAYBE :foreground coral :weight bold) (TODO :foreground red :weight bold) (NEXT :foreground orange red :weight bold) (WAIT :foreground dark red :weight bold) (DONE :foreground forest green :weight bold) (CANCELLED :foreground dark gray :weight bold)) org-wl-shimbun-prefer-web-links t org-agenda-custom-commands '((r Refile new tasks, projects, notes, and references tags LEVEL=1+REFILE ((org-agenda-overriding-header New tasks, projects, notes, and references))) (o Other tasks tags-todo STYLE\habit\/!TODO ((org-agenda-skip-function (quote dmj/has-timestamp)) (org-agenda-overriding-header Other tasks)) ) (n Next actions tags-todo /!NEXT ((org-agenda-overriding-header Next actions))) (M Someday/maybe tags-todo /!MAYBE) (p Projects tags project ((org-agenda-overriding-header Projects))) (P New projects tags-todo /!-DONE-CANCELLED ((org-agenda-overriding-header New projects) (org-agenda-skip-function (quote dmj/skip-non-project))) ) ) org-agenda-files '(~/org/) org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent org-depend-block-todo) org-agenda-tags-column -100 org-export-ascii-final-hook '(org-inlinetask-remove-terminator) org-hide-leading-stars t org-clock-into-drawer CLOCK org-checklist-export-function 'org-export-as-ascii org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current org-checklist) org-agenda-todo-ignore-scheduled t org-todo-state-tags-triggers '((todo (note))) org-log-state-notes-insert-after-drawers t org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-stuck-projects '(project/-DONE-CANCELLED (NEXT) nil nil) org-trigger-hook '(org-depend-trigger-todo) org-export-preprocess-hook '(org-export-blocks-preprocess) org-tags-exclude-from-inheritance '(note project)