Fix some identation

but not all, in particular not the one of the `cl-flet` call; see
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9622 for this.
This commit is contained in:
Daniel - 2023-01-12 16:46:26 +01:00
parent f534833520
commit fc4d6b7767
Signed by: dbo
GPG Key ID: 784AA8DF0CCDF625
1 changed files with 40 additions and 40 deletions

View File

@ -355,18 +355,18 @@ should not be clocked."
(not org-clock-resolving-clocks-due-to-idleness)) (not org-clock-resolving-clocks-due-to-idleness))
(let ((parent-task (db/find-parent-task))) (let ((parent-task (db/find-parent-task)))
(save-mark-and-excursion (save-mark-and-excursion
(cond (cond
(parent-task (parent-task
;; found parent task ;; found parent task
(org-with-point-at parent-task (org-with-point-at parent-task
(org-clock-in))) (org-clock-in)))
((and (markerp org-clock-default-task) ((and (markerp org-clock-default-task)
(marker-buffer org-clock-default-task)) (marker-buffer org-clock-default-task))
;; default task is set ;; default task is set
(org-with-point-at org-clock-default-task (org-with-point-at org-clock-default-task
(org-clock-in))) (org-clock-in)))
(t (t
(org-clock-in '(4)))))))) (org-clock-in '(4))))))))
(defun db/save-current-org-task-to-file () (defun db/save-current-org-task-to-file ()
"Format currently clocked task and write it to`db/org-clock-current-task-file'." "Format currently clocked task and write it to`db/org-clock-current-task-file'."
@ -880,7 +880,7 @@ determined."
(string-match-p "^Template.*" (string-match-p "^Template.*"
(org-entry-get top-most-sibling "ITEM"))) (org-entry-get top-most-sibling "ITEM")))
(setq template-marker (org-with-point-at top-most-sibling (setq template-marker (org-with-point-at top-most-sibling
(point-marker)))))) (point-marker))))))
;; Return `template-marker', which is either `nil' or a marker. ;; Return `template-marker', which is either `nil' or a marker.
template-marker)) template-marker))
@ -911,34 +911,34 @@ current item and see whether its headline is matching
;; Insert relevant backlinks, when available. ;; Insert relevant backlinks, when available.
(let ((parent-depth (--when-let (org-entry-get (point) "CHECKLIST_BACKLINK_DEPTH" nil) (let ((parent-depth (--when-let (org-entry-get (point) "CHECKLIST_BACKLINK_DEPTH" nil)
(string-to-number it))) (string-to-number it)))
number-of-backlinks number-of-backlinks
point-before-backlinks) point-before-backlinks)
(insert (format "\nBacklinks (not DONE, no TEMPLATE, %s, no archives, not scheduled in the future):\n\n" (insert (format "\nBacklinks (not DONE, no TEMPLATE, %s, no archives, not scheduled in the future):\n\n"
(if parent-depth (if parent-depth
(format "parent-depth %d" parent-depth) (format "parent-depth %d" parent-depth)
"all parents"))) "all parents")))
;; Store where we are (minus the two newlines) so we can delete the ;; Store where we are (minus the two newlines) so we can delete the
;; checklist in case it's empty. ;; checklist in case it's empty.
(setq point-before-backlinks (- (point) 2)) (setq point-before-backlinks (- (point) 2))
(setq number-of-backlinks (setq number-of-backlinks
(org-dblock-write:db/org-backlinks (list (org-dblock-write:db/org-backlinks (list
:org-ql-match '(and :org-ql-match '(and
(not (done)) (not (done))
(not (ltags "TEMPLATE")) (not (ltags "TEMPLATE"))
(not (scheduled :from 1))) (not (scheduled :from 1)))
:parent-depth (--when-let (org-entry-get (point) "CHECKLIST_BACKLINK_DEPTH" nil) :parent-depth (--when-let (org-entry-get (point) "CHECKLIST_BACKLINK_DEPTH" nil)
(string-to-number it)) (string-to-number it))
:archive nil))) :archive nil)))
;; When no backlinks have been found, remove the empty table head and just ;; When no backlinks have been found, remove the empty table head and just
;; print "none". ;; print "none".
(when (zerop number-of-backlinks) (when (zerop number-of-backlinks)
(delete-region point-before-backlinks (point)) (delete-region point-before-backlinks (point))
(insert " none."))) (insert " none.")))
;; Insert template, when avilable. ;; Insert template, when avilable.
(let ((template-marker (db/org--find-template))) (let ((template-marker (db/org--find-template)))
@ -949,7 +949,7 @@ current item and see whether its headline is matching
(db/org-copy-body-from-item-to-point template-marker)))) (db/org-copy-body-from-item-to-point template-marker))))
(define-obsolete-function-alias 'db/org-copy-template (define-obsolete-function-alias 'db/org-copy-template
'db/org-insert-checklist 'db/org-insert-checklist
"2022-10-09") "2022-10-09")
(defun db/org-goto-checklist-item-of-point () (defun db/org-goto-checklist-item-of-point ()
@ -1193,8 +1193,8 @@ linking to any item."
;; search through it; otherwise, use the default Org Mode file as ;; search through it; otherwise, use the default Org Mode file as
;; default buffer ;; default buffer
(default-buffer (if (and (buffer-file-name) (derived-mode-p 'org-mode)) (default-buffer (if (and (buffer-file-name) (derived-mode-p 'org-mode))
(current-buffer) (current-buffer)
(find-file-noselect db/org-default-org-file)))) (find-file-noselect db/org-default-org-file))))
(when (null default-buffer) (when (null default-buffer)
(user-error "Current buffer is not associated with a file and `db/org-default-org-file' does not exist; nothing to search through")) (user-error "Current buffer is not associated with a file and `db/org-default-org-file' does not exist; nothing to search through"))
(let* ((org-refile-targets (append (and arg (let* ((org-refile-targets (append (and arg