I want to enable visual-line-mode for use with org-column-view, so that the text under each headline wraps underneath. Here is a sample "shopping list" to illustrate what I mean:
Notice how the item's description extends to the full width of the buffer but wraps for readability. I was able to get this to work by calling visual-line-mode
after I ran column view. So I would love to find a hook that lets me load this from init, something like this:
(setq 'org-column-view-hook 'visual-line-mode)
Can't find an org-column-view-hook
though..?
I've also noticed that if I make any changes to the view (e.g., hitting "<" or ">" to adjust the column width) then visual-line-mode is immediately disabled... anyway ideas on how to fix this?
Thanks!
M-x org-columns
. Since it doesn't have a hook, you could just make a new function that calls(org-columns)
with the optional argument if so desired; and, then call your own settings -- e.g.,(setq truncate-lines nil word-wrap t)
. Like this:(defun adam-fn () (interactive) (org-columns) (setq truncate-lines nil word-wrap t))
If you typeM-x find-function RET org-columns RET
, you will see that down towards the end of the function,truncate-lines
is set tot
-- and that is what is causing the behavior you experience . . .advice
-- but I rarely use it. Most people seem to preferadvice
instead of creating a new function, but I'm not sure why that is. In general,visual-line-mode
andorg-mode
do not play well together. I turn onvisual-line-mode
in a few limited circumstances where I am familiar with the combined behavior -- e.g., when I am editing a task in a narrowed indirect buffer.(defun adam-fn () (interactive) (org-columns) (setq truncate-lines nil word-wrap t))
to my init.el file, followed by(define-key (current-global-map) [remap org-columns] 'adam-fn)
so I can useC-c C-x C-c
to launch the modified mode.