Update call sites for create-file
This commit is contained in:
parent
2b6ee13b96
commit
4e6243b3e3
|
@ -1096,10 +1096,6 @@ button action."
|
|||
(interactive)
|
||||
(chronometrist-sexp-open-log))
|
||||
|
||||
(defun chronometrist-common-create-file ()
|
||||
"Create `chronometrist-file' if it doesn't already exist."
|
||||
(chronometrist-sexp-create-file))
|
||||
|
||||
(defun chronometrist-task-active-p (task)
|
||||
"Return t if TASK is currently clocked in, else nil."
|
||||
(equal (chronometrist-current-task (chronometrist-active-backend)) task))
|
||||
|
@ -1523,7 +1519,7 @@ run `chronometrist-statistics'."
|
|||
(cond ((or (not (file-exists-p chronometrist-file))
|
||||
(chronometrist-common-file-empty-p chronometrist-file))
|
||||
;; first run
|
||||
(chronometrist-common-create-file)
|
||||
(chronometrist-create-file (chronometrist-active-backend))
|
||||
(let ((inhibit-read-only t))
|
||||
(erase-buffer)
|
||||
(insert "Welcome to Chronometrist! Hit RET to ")
|
||||
|
@ -1734,7 +1730,7 @@ current week. Otherwise, display data from the week specified by
|
|||
(kill-buffer buffer))
|
||||
(t (unless keep-date
|
||||
(setq chronometrist-report--ui-date nil))
|
||||
(chronometrist-common-create-file)
|
||||
(chronometrist-create-file (chronometrist-active-backend))
|
||||
(chronometrist-report-mode)
|
||||
(switch-to-buffer buffer)
|
||||
(chronometrist-report-refresh-file nil)
|
||||
|
@ -1965,7 +1961,7 @@ specified by `chronometrist-statistics--ui-state'."
|
|||
(setq chronometrist-statistics--ui-state `(:mode week
|
||||
:start ,week-start
|
||||
:end ,week-end)))
|
||||
(chronometrist-common-create-file)
|
||||
(chronometrist-create-file (chronometrist-active-backend))
|
||||
(chronometrist-statistics-mode)
|
||||
(switch-to-buffer buffer)
|
||||
(chronometrist-statistics-refresh))))))
|
||||
|
|
|
@ -2161,12 +2161,6 @@ button action."
|
|||
(interactive)
|
||||
(chronometrist-sexp-open-log))
|
||||
#+END_SRC
|
||||
**** create-file :procedure:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun chronometrist-common-create-file ()
|
||||
"Create `chronometrist-file' if it doesn't already exist."
|
||||
(chronometrist-sexp-create-file))
|
||||
#+END_SRC
|
||||
**** task-active-p :reader:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun chronometrist-task-active-p (task)
|
||||
|
@ -2665,7 +2659,7 @@ run `chronometrist-statistics'."
|
|||
(cond ((or (not (file-exists-p chronometrist-file))
|
||||
(chronometrist-common-file-empty-p chronometrist-file))
|
||||
;; first run
|
||||
(chronometrist-common-create-file)
|
||||
(chronometrist-create-file (chronometrist-active-backend))
|
||||
(let ((inhibit-read-only t))
|
||||
(erase-buffer)
|
||||
(insert "Welcome to Chronometrist! Hit RET to ")
|
||||
|
@ -2911,7 +2905,7 @@ current week. Otherwise, display data from the week specified by
|
|||
(kill-buffer buffer))
|
||||
(t (unless keep-date
|
||||
(setq chronometrist-report--ui-date nil))
|
||||
(chronometrist-common-create-file)
|
||||
(chronometrist-create-file (chronometrist-active-backend))
|
||||
(chronometrist-report-mode)
|
||||
(switch-to-buffer buffer)
|
||||
(chronometrist-report-refresh-file nil)
|
||||
|
@ -3175,7 +3169,7 @@ specified by `chronometrist-statistics--ui-state'."
|
|||
(setq chronometrist-statistics--ui-state `(:mode week
|
||||
:start ,week-start
|
||||
:end ,week-end)))
|
||||
(chronometrist-common-create-file)
|
||||
(chronometrist-create-file (chronometrist-active-backend))
|
||||
(chronometrist-statistics-mode)
|
||||
(switch-to-buffer buffer)
|
||||
(chronometrist-statistics-refresh))))))
|
||||
|
|
Reference in New Issue