2

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

2

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

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

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.

2
  • 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 that you have read and understand our privacy policy and code of conduct.

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