A hook is a list of functions ran on particular occasion. Most modes, if not all, have at least one hook, generally named <mode-name>-mode-hook
, to which you can add functions with add-hook
and remove functions with remove-hook
.
You can see if a hook exists and inspect its value with C-hv<mode-name>-mode-hook
RET.
In your case, you want to configure org-agenda-mode-hook
.
(add-hook 'org-agenda-mode-hook (lambda () (visual-line-mode -1) (toggle-truncate-lines 1)))