From: Carsten Dominik <carsten.dominik@gmail.com>
To: David Maus <dmaus@ictsoc.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: org-capture destroys target file when user aborting prompt in template [6.36trans (release_6.36.430.gec51)]
Date: Sun, 27 Jun 2010 08:35:41 +0200 [thread overview]
Message-ID: <8D3E7F4D-3975-455F-9512-173001D9C419@gmail.com> (raw)
In-Reply-To: <878w6110wp.wl%dmaus@ictsoc.de>
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
> 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")
> org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-
> result-toggle-maybe)
> org-src-mode-hook '(org-src-mode-configure-edit-buffer)
> org-confirm-shell-link-function 'yes-or-no-p
> org-export-first-hook '(org-beamer-initialize-open-trackers)
> org-wl-link-remove-filter t
> org-startup-indented t
> org-todo-keywords '((sequence "MAYBE(m)" "TODO(t)" "NEXT(n)"
> "WAIT(w@/!)" "|" "DONE(D)" "CANCELLED(C@)"))
> org-agenda-before-write-hook '(org-agenda-add-entry-text)
> org-default-notes-file "/home/dmaus/org//bucket.org"
> org-directory "/home/dmaus/org/"
> org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-
> drawers org-cycle-show-empty-lines
> org-optimize-window-after-visibility-change)
> org-export-latex-classes '(("scrartcl" "\\documentclass[12pt]
> {scrartcl}" ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}") ("\
> \subsubsection{%s}" . "\\subsubsection*{%s}")
> ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\
> \subparagraph{%s}" . "\\subparagraph*{%s}"))
> ("article" "\\documentclass[11pt]{article}" ("\
> \section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}") ("\
> \subsubsection{%s}" . "\\subsubsection*{%s}")
> ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\
> \subparagraph{%s}" . "\\subparagraph*{%s}"))
> ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\
> \part*{%s}")
> ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\
> \section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}") ("\
> \subsubsection{%s}" . "\\subsubsection*{%s}"))
> ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\
> \part*{%s}")
> ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\
> \section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}") ("\
> \subsubsection{%s}" . "\\subsubsection*{%s}"))
> ("beamer" "\\documentclass{beamer}" org-beamer-sectioning))
> org-publish-project-alist '(("ictsoc-base-dyn" :base-directory "~/
> www/ictsoc.de/src/" :base-extension "org"
> :publishing-directory "~/www/ictsoc.de/www/" :publishing-
> function org-publish-org-to-html
> :author "David Maus" :email "dmaus@ictsoc.de" :author-info
> t :email-info nil :creator-info t
> :section-numbers t :sub-superscript nil :recursive t)
> ("ictsoc-base-stat" :base-directory "~/www/ictsoc.de/
> src/" :base-extension
> "css\\|png\\|atom\\|patch" :publishing-directory "~/www/
> ictsoc.de/www/" :publishing-function
> org-publish-attachment :recursive t)
> ("ictsoc-bookmarks" :base-directory "~/.emacs.d/
> bookmarks/" :base-extension "org"
> :publishing-directory "~/www/ictsoc.de/www/" :publishing-
> function org-publish-org-to-html
> :author "David Maus" :email "dmaus@ictsoc.de" :author-info
> t :email-info nil :creator-info t
> :section-numbers t :recursive nil)
> ("ictsoc" :components ("ictsoc-base-dyn" "ictsoc-base-stat"
> "ictsoc-bookmarks")))
> org-export-preprocess-before-normalizing-links-hook '(org-remove-
> file-link-modifiers)
> org-email-link-description-format "%m"
> org-mode-hook '((lambda nil
> (org-add-hook (quote change-major-mode-hook) (quote org-show-
> block-all) (quote append) (quote local)))
> (lambda nil
> (org-add-hook (quote change-major-mode-hook) (quote org-babel-
> show-result-all) (quote append)
> (quote local))
> )
> org-babel-result-hide-spec org-babel-hide-all-hashes)
> org-clock-out-remove-zero-time-clocks t
> org-font-lock-hook '(org-inlinetask-fontify)
> org-export-creator-info nil
> org-agenda-ndays 1
> org-refile-targets '((org-agenda-files :maxlevel . 3))
> org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel-hash-
> at-point org-babel-execute-src-block-maybe)
> org-confirm-elisp-link-function 'yes-or-no-p
> org-refile-use-outline-path 'file
> org-log-into-drawer "LOGBOOK"
> org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-
> babel-exp-inline-src-blocks))
> org-export-html-style-include-default nil
> org-enforce-todo-dependencies t
> org-refile-allow-creating-parent-nodes 'confirm
> org-occur-hook '(org-first-headline-recenter)
> org-export-preprocess-before-selecting-backend-code-hook '(org-
> beamer-select-beamer-code)
> org-tags-column -100
> org-agenda-todo-ignore-deadlines t
> org-modules '(org-habit org-bbdb org-bibtex org-docview org-gnus org-
> info org-jsinfo org-irc org-mew org-mhe org-rmail
> org-vm org-w3m org-wl)
> org-export-preprocess-after-tree-selection-hook '(org-inlinetask-
> export-handler)
> org-export-docbook-final-hook '(org-inlinetask-remove-terminator)
> org-export-latex-final-hook '(org-inlinetask-remove-terminator org-
> beamer-amend-header org-beamer-fix-toc
> org-beamer-auto-fragile-frames org-beamer-place-default-
> actions-for-lists)
> org-metadown-hook '(org-babel-pop-to-session-maybe)
> org-export-blocks '((src org-babel-exp-src-blocks nil) (comment org-
> export-blocks-format-comment t)
> (ditaa org-export-blocks-format-ditaa nil) (dot org-export-
> blocks-format-dot nil))
> )
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de
> _______________________________________________
> 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
next prev parent reply other threads:[~2010-06-27 6:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-27 5:48 Bug: org-capture destroys target file when user aborting prompt in template [6.36trans (release_6.36.430.gec51)] David Maus
2010-06-27 6:35 ` Carsten Dominik [this message]
2010-06-27 7:09 ` David Maus
2010-06-27 7:25 ` Carsten Dominik
2010-06-27 8:20 ` David Maus
2010-06-27 10:27 ` Carsten Dominik
2010-06-27 12:26 ` David Maus
2010-06-27 16:32 ` Carsten Dominik
2010-06-27 9:23 ` Štěpán Němec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8D3E7F4D-3975-455F-9512-173001D9C419@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=dmaus@ictsoc.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.