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.

deshmukh
  • 1,852
  • 13
  • 29

2 Answers2

2

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

gigiair
  • 2,124
  • 1
  • 8
  • 14
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.

itirazimvar
  • 568
  • 4
  • 15
  • 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 09 '21 at 09:21
  • `(add-hook 'org-agenda-mode-hook (lambda () (setq-local global-hl-line-mode t)))` ? weird that it didn't work. – itirazimvar Jan 09 '21 at 09:34