Fixed premature deletion of data when scripting org-plot.

This patch was sent by James TD Smith.
This commit is contained in:
Bastien Guerry 2009-07-17 19:02:01 +02:00
parent 14c0c432be
commit 57838f8286
3 changed files with 7 additions and 4 deletions

View File

@ -3,6 +3,9 @@
* org.el (org-tags-sort-function): New option for sorting tags.
(org-set-tags): Use the new option to sort tags.
* org-plot.el (org-plot/gnuplot): Run with an idle timer to avoid
premature deletion of the data when using org-plot in a script.
2009-07-17 Bastien Guerry <bzg@altern.org>
* org-clock.el (org-clock-in-prepare-hook): New hook.

View File

@ -346,7 +346,7 @@ line directly before or after the table."
(gnuplot-send-buffer-to-gnuplot))
;; cleanup
(bury-buffer (get-buffer "*gnuplot*"))
(delete-file data-file))))
(run-with-idle-timer 0.1 nil (lambda () (delete-file data-file))))))
(provide 'org-plot)

View File

@ -10849,9 +10849,9 @@ With prefix ARG, realign all tags in headings in the current buffer."
(setq tags (replace-match ":" t t tags))))
(if org-tags-sort-function
(setq tags (mapconcat 'identity
(sort (org-split-string tags (org-re "[^[:alnum:]_@]+"))
org-tags-sort-function) ":")))
(setq tags (mapconcat 'identity
(sort (org-split-string tags (org-re "[^[:alnum:]_@]+"))
org-tags-sort-function) ":")))
(if (string-match "\\`[\t ]*\\'" tags)
(setq tags "")