diff --git a/TODO.org b/TODO.org index 85b1fce..70067eb 100644 --- a/TODO.org +++ b/TODO.org @@ -941,36 +941,15 @@ The plist backend could theoretically be extended to support it, but I'd rather 2. [ ] Use active backend as the suggested input backend 3. [ ] Conserve file local variables prop line for text backends -** make migrate command async +** make migrate command async [33%] :PROPERTIES: :CREATED: 2022-04-01T18:02:03+0530 :END: =chronometrist-migrate= / =chronometrist-to-file= can take a long time to run, freezing Emacs until completion if run synchronously. -I tried using =async.el= by changing the main =if= branch of =chronometrist-migrate= to the following - - -#+BEGIN_SRC emacs-lisp -(if (and confirm confirm-overwrite) - (async-start - `(lambda () - (require 'cl) - ;; This will break if the user did not install Chronometrist - ;; and related packages via MELPA. An improvement would be to - ;; load `(locate-user-emacs-file "init.el")' if it - ;; exists. It's not perfect, but would cover most situations. - (package-initialize) - (cl-loop for (pkg . desc) in package-alist - when (string-match-p "^chronometrist" (symbol-name pkg)) - do (require pkg)) - ,(async-inject-variables "chronometrist-") - (chronometrist-to-file (chronometrist-backend-hash-table ,input-backend) - ,output-backend ,output-file)) - (lambda (result) - (message "Conversion complete."))) - (message "Conversion aborted.")) -#+END_SRC - -Unfortunately, this code does not work - it results in an =(invalid-read-syntax "#")= error, which seems to be a [[https://github.com/jwiegley/emacs-async/issues?q=is%3Aissue+read+syntax][common error]] with this library. +1. [X] basic async export +2. [ ] display message on start and completion +3. [ ] test the INPUT-FILE argument * STARTED Support for the Third Time System [57%] :extension: :PROPERTIES: