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:

enter image description here

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?


  • The function you use to activate is probably 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 type M-x find-function RET org-columns RET, you will see that down towards the end of the function, truncate-lines is set to t -- and that is what is causing the behavior you experience . . .
    – lawlist
    Aug 15, 2016 at 0:25
  • In addition to the above-comment, you could also use advice -- but I rarely use it. Most people seem to prefer advice instead of creating a new function, but I'm not sure why that is. In general, visual-line-mode and org-mode do not play well together. I turn on visual-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.
    – lawlist
    Aug 15, 2016 at 0:31
  • Thanks @lawlist, this works great! I added (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 use C-c C-x C-c to launch the modified mode.
    – Adam
    Aug 15, 2016 at 8:31


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.