April 15th 2026 - Things I Worked On

I updated my packages today and some of them ended up having funky behavior. Here are some of the fixes I had to do.

Opening Elfeed buffers in the current window

Elfeed was opening its buffers in a new window I came up with this fix:

(add-to-list 'display-buffer-alist
             '("\\*elfeed.*"
               (display-buffer-same-window)
               (inhibit-same-window . nil)))

Org source blocks bleeding into closed headings

I use the darcula theme and after the update I noticed when I close a heading that included a source block the background color of the block was bleeding into the background of the heading.

I found this fix on stackexchange.

  (defun org-fix-bleed-end-line-block (from to flag spec)
  "Toggle fontification of last char of block end lines when cycling.

This avoids the bleeding of `org-block-end-line' when block is
folded."
  (when (and (eq spec 'org-hide-block)
             (/= (point-max) to))
    (save-excursion
      (if flag
          (font-lock-unfontify-region to (1+ to))
        (font-lock-flush to (1+ to))))))

(advice-add 'org-flag-region :after #'org-fix-bleed-end-line-block)

(defun org-fix-bleed-end-line-cycle (state)
  "Toggle fontification of last char of block lines when cycling.

This avoids the bleeding of `org-block-end-line' when outline is
folded."
  (save-excursion
    (when org-fontify-whole-block-delimiter-line
      (let ((case-fold-search t)
            beg end)
        (cond ((memq state '(overview contents all))
               (setq beg (point-min)
                     end (point-max)))
              ((memq state '(children folded subtree))
               (setq beg (point)
                 end (org-end-of-subtree t t))))
        (when beg
          (goto-char beg)
          (while (search-forward "#+end" end t)
            (end-of-line)
            (unless (= (point) (point-max))
              (if (org-invisible-p (1- (point)))
                  (font-lock-unfontify-region (point) (1+ (point)))
                (font-lock-flush (point) (1+ (point)))))))))))

(add-hook 'org-cycle-hook #'org-fix-bleed-end-line-cycle)