Running Doom Emacs v2.0.9 on Emacs 27.1.

In the agenda buffer, how do I get the current line highlighted?

global-hl-line-mode is enabled and the current line in other buffers is highlighted as expected.

However, agenda buffer does not show this highlighting.

2 Answers 2


(add-hook 'org-agenda-finalize-hook #'hl-line-mode)

  • Thanks. This worked perfectly.
    – deshmukh
    Jan 9, 2021 at 9:22

Even you are using global-hl-line-mode. You have to still be sure local variables(Which can be different for different buffers) are correct.

I have like that definition in my files. Reverse should be correct for you.

  ;; Don' use globl-hl-line-in-org-agenda
  (add-hook 'org-agenda-mode-hook (lambda () (setq-local global-hl-line-mode nil)))

I highly recommend to use helpful package to see this variables in good format.

  • Thanks. But disabling global-hl-line-mode while in an agenda buffer did not change the display. Also, the solution suggested by @gigiair worked perfectly.
    – deshmukh
    Jan 9, 2021 at 9:21
  • (add-hook 'org-agenda-mode-hook (lambda () (setq-local global-hl-line-mode t))) ? weird that it didn't work. Jan 9, 2021 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.