From c576813fc8203d8aca1cafe030315c8d0ebb1b3b Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sun, 25 Aug 2019 19:59:24 -0500 Subject: [PATCH] Fix: (org-ql-agenda-block) Insert newline after block Fixes #40. Thanks to Milan Zamazal (@mz-pdm). --- org-ql-agenda.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org-ql-agenda.el b/org-ql-agenda.el index 4406f64..b2acd20 100644 --- a/org-ql-agenda.el +++ b/org-ql-agenda.el @@ -342,7 +342,8 @@ QUERY should be an `org-ql' query form. Like other agenda block commands, it searches files returned by function `org-agenda-files'. Intended to be used as a user-defined function in `org-agenda-custom-commands'. QUERY corresponds to -the `match' item in the custom command form." +the `match' item in the custom command form. Inserts a newline +after the block." (when-let* ((from (org-agenda-files nil 'ifmode)) (items (org-ql-select from query :action 'element-with-markers))) @@ -359,7 +360,8 @@ the `match' item in the custom command form." (->> items (-map #'org-ql-agenda--format-element) org-agenda-finalize-entries - insert))) + insert) + (insert "\n"))) (defalias 'org-ql-block 'org-ql-agenda-block)