Commit Diff


commit - 77b36c37d2858a69ffecf518dddc50ef58c5a20c
commit + c0c08a12c78e66a4409c14ad8001b1058fa141b6
blob - 31fc355d7a66c0f8a3b2de66924e35788a96d0ba
blob + d1f1959c1cacc3ff029792cd3d9a2edbe5b39331
--- doom/config.el
+++ doom/config.el
@@ -130,7 +130,7 @@
 ;; Remove closing confirmation because I'm a big boy
 (setq confirm-kill-emacs nil)
 
-;; Homemade -- Remove empty agenda blocks
+;; Remove empty agenda blocks
 (defun org-agenda-delete-empty-blocks ()
     "Remove empty agenda blocks.
   A block is identified as empty if there are fewer than 2
@@ -149,7 +149,7 @@
           (cond
            ((looking-at-p block-re)
             (when (< content-line-count 2)
-              (delete-region start-pos (1+ (point-at-bol))))
+              (delete-region start-pos (1+ (pos-bol))))
             (setq start-pos (point))
             (forward-line)
             (setq content-line-count (if (looking-at-p blank-line-re) 0 1)))
@@ -161,7 +161,7 @@
         ;; The above strategy can leave a separator line at the beginning
         ;; of the buffer.
         (when (looking-at-p block-re)
-          (delete-region (point) (1+ (point-at-eol))))))
+          (delete-region (point) (1+ (pos-eol))))))
     (setq buffer-read-only t))
 
   (add-hook 'org-agenda-finalize-hook #'org-agenda-delete-empty-blocks)