mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-27 09:32:52 +00:00
4c3bc6482d
Kai Tetzlaff writes: > i noticed that when using the org-mode clock persistence, the > stored clock data gets deleted when i start emacs and exit again > without turning on org-mode in between. > > When looking at org-clock-persistence-insinuate it looks like > org-clock load will only run after org-mode gets started whereas > org-clock-save will always be called when exiting emacs: > > (defun org-clock-persistence-insinuate () > "Set up hooks for clock persistence" > (add-hook 'org-mode-hook 'org-clock-load) > (add-hook 'kill-emacs-hook 'org-clock-save)) > > Not running org-mode-hook (i.e. not starting org-mode) thus does > not load clock data but org-clock-save overwrites any prviously > saved data when exiting emacs. > > An easy fix for that would be to just add org-clock-load to e.g. > emacs-startup-hook. But this will only work if the code in > org-clock-load does not depend on any org-mode initialization > code (or would require loading org-mode). > > So org-clock-save should probably check if org-clock-load has > been running during the current emacs session (or if clock > persistence was just enabled) and only then save clock data when > exiting emacs. I tried to add this to the code in org-clock-save: |
||
---|---|---|
BUGFIXING | ||
contrib | ||
doc | ||
EXPERIMENTAL | ||
lisp | ||
ORGWEBPAGE | ||
UTILITIES | ||
xemacs | ||
.dir-settings.el | ||
.gitignore | ||
ChangeLog | ||
Makefile | ||
README | ||
README_DIST | ||
README_GIT | ||
request-assign-future.txt |
This is the Emacs Org project, an emacs subsystem for organizing your life The homepage of Org is at http://orgmode.org This distribution contains: README This file. README_DIST The README file for the distribution (zip and tar files) README_GIT Information about the git repository and how to contribute to Org-mode development. lisp/ Directory with all the Emacs Lisp files that make up Org. doc/ The documentation files. org.texi is the source of the documentation, org.html and org.pdf are formatted versions of it. xemacs/ The xemacs directory contains special code for XEmacs users, in particular a port of the GNU Emacs outline.el to XEmacs. Org-mode does not work under XEmacs without this file installed. It did until version 4.37, but no longer. CONTRIB/ A diretory with third-party additions for Org. Some really cool stuff is in there. ORGWEBPAGE/ Directory with the source files for the orgmode.org web page. ChangeLog The standard ChangeLog file. Makefile The makefile to compile and install Org, and also for maintenance tasks. request-assign-future.txt The form that contributors have to sign and get processed with the FSF before contributed changes can be integrated into the Org core. All files in this distribution except the CONTRIB directory have copyright assigned to the FSF. EXPERIMENTAL Experimental code, not necessarily FSF copyright.