Compare commits
No commits in common. "a01bbe28e7f761cfd9e525e67db13e26e0422169" and "ddbcfee3d9e0516e3febfa0a1f2bb6f247844c7d" have entirely different histories.
a01bbe28e7
...
ddbcfee3d9
7
init.el
7
init.el
@ -1249,14 +1249,13 @@ respectively."
|
|||||||
(org-ql-block '(and (property "NOT_BEFORE")
|
(org-ql-block '(and (property "NOT_BEFORE")
|
||||||
(scheduled)
|
(scheduled)
|
||||||
(> (org-2ft (property "NOT_BEFORE"))
|
(> (org-2ft (property "NOT_BEFORE"))
|
||||||
(org-2ft (property "SCHEDULED"))))
|
(org-2ft (scheduled))))
|
||||||
((org-ql-block-header "Items whose NOT_BEFORE value is after SCHEDULED")))
|
((org-ql-block-header "Items whose NOT_BEFORE value is after SCHEDULED")))
|
||||||
|
|
||||||
;; Check whether any NOT_BEFORE is beind their DEADLINE
|
;; Check whether any NOT_BEFORE is beind their DEADLINE
|
||||||
(org-ql-block '(and (property "NOT_BEFORE")
|
(org-ql-block '(and (property "NOT_BEFORE") (deadline)
|
||||||
(deadline)
|
|
||||||
(> (org-2ft (property "NOT_BEFORE"))
|
(> (org-2ft (property "NOT_BEFORE"))
|
||||||
(org-2ft (property "DEADLINE"))))
|
(org-2ft (deadline))))
|
||||||
((org-ql-block-header "Items whose NOT_BEFORE value is after their DEADLINE")))
|
((org-ql-block-header "Items whose NOT_BEFORE value is after their DEADLINE")))
|
||||||
|
|
||||||
))
|
))
|
||||||
|
|||||||
@ -939,14 +939,7 @@ inserting the checklist."
|
|||||||
number-of-backlinks
|
number-of-backlinks
|
||||||
point-before-backlinks)
|
point-before-backlinks)
|
||||||
|
|
||||||
;; Insert blank line, but only if the previous line is not blank
|
(insert (format "\nRelevant backlinks (%s):\n\n"
|
||||||
;; already.
|
|
||||||
(unless (save-mark-and-excursion
|
|
||||||
(forward-line -1)
|
|
||||||
(looking-at (rx bol (* space) eol)))
|
|
||||||
(insert "\n"))
|
|
||||||
|
|
||||||
(insert (format "Relevant backlinks (%s):\n\n"
|
|
||||||
(if parent-depth
|
(if parent-depth
|
||||||
(format "parent-depth %d" parent-depth)
|
(format "parent-depth %d" parent-depth)
|
||||||
"all parents")))
|
"all parents")))
|
||||||
@ -977,6 +970,7 @@ inserting the checklist."
|
|||||||
(insert "\n\nTemplate:")
|
(insert "\n\nTemplate:")
|
||||||
(if (not template-marker)
|
(if (not template-marker)
|
||||||
(insert " none.")
|
(insert " none.")
|
||||||
|
(insert "\n")
|
||||||
(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
|
||||||
@ -1002,8 +996,7 @@ determined."
|
|||||||
This can be used to copy checklists from templates to the current
|
This can be used to copy checklists from templates to the current
|
||||||
item, which might be an instance of a periodic task. If POM is
|
item, which might be an instance of a periodic task. If POM is
|
||||||
not given, use `db/org-get-location' to interactively query for
|
not given, use `db/org-get-location' to interactively query for
|
||||||
it. Ensures that there are newlines before and after the
|
it. Adds newline before and after the template."
|
||||||
inserted template."
|
|
||||||
(interactive (list (db/org-get-location t)))
|
(interactive (list (db/org-get-location t)))
|
||||||
(unless (number-or-marker-p pom)
|
(unless (number-or-marker-p pom)
|
||||||
(user-error "Argument is neither point nor mark: %s" pom))
|
(user-error "Argument is neither point nor mark: %s" pom))
|
||||||
@ -1031,26 +1024,9 @@ inserted template."
|
|||||||
(user-error "Cannot find content in template, or content is empty"))
|
(user-error "Cannot find content in template, or content is empty"))
|
||||||
(string-trim-right
|
(string-trim-right
|
||||||
(buffer-substring-no-properties content-begin content-end)))))))))
|
(buffer-substring-no-properties content-begin content-end)))))))))
|
||||||
|
(insert "\n")
|
||||||
(cond
|
|
||||||
;; Open next line if the current line is not blank
|
|
||||||
((not (looking-at (rx bol eol)))
|
|
||||||
(insert "\n\n"))
|
|
||||||
|
|
||||||
;; Add newline, but only if the previous line is not blank already.
|
|
||||||
((not (save-mark-and-excursion
|
|
||||||
(forward-line -1)
|
|
||||||
(looking-at (rx bol (* space) eol))))
|
|
||||||
(insert "\n")))
|
|
||||||
|
|
||||||
(insert body)
|
(insert body)
|
||||||
|
(insert "\n")
|
||||||
;; Insert final newline, but only when no blank line follows.
|
|
||||||
(unless (save-mark-and-excursion
|
|
||||||
(forward-line 1)
|
|
||||||
(looking-at (rx bol (* space) eol)))
|
|
||||||
(insert "\n"))
|
|
||||||
|
|
||||||
(org-update-statistics-cookies nil)))
|
(org-update-statistics-cookies nil)))
|
||||||
|
|
||||||
(defun db/org-update-headline-log-note (&optional new-headline)
|
(defun db/org-update-headline-log-note (&optional new-headline)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user