Closed Moanrisy closed 4 years ago
That won't do what you think it will, because it will call the function every time an Org buffer is opened, which would turn the sidebar on and off.
Since this is not a bug, please post a message asking for help in a more appropriate place, e.g. https://old.reddit.com/r/orgmode. You may tag me there if you like, /u/github-alphapapa
.
I found a way, I will leave this config, here maybe someone interested in future.
(defun my-sidebar-hook () (when (string= (file-name-extension buffer-file-name) "org") (org-sidebar) (org-sidebar-toggle) )) (add-hook 'deft-open-file-hook 'my-sidebar-hook)
I use org-mode-hook to launch org-sidebar-toggle (add-hook 'org-mode-hook 'org-sidebar-toggle) but it's not working