NicolasPetton / nroam

Org-roam backlinks within org-mode buffers
GNU General Public License v3.0
107 stars 6 forks source link

Control the initial fold state of the backlinks headline #33

Open sienic opened 3 years ago

sienic commented 3 years ago

@NicolasPetton, thanks for such a useful package. I found myself with the need of always expanding the backlinks headline when opening a file, as I can visualise links right away. So I adviced one of the methods as follows:

(warning: my elisp is basic)

(defun sn/advice-nroam--set-sections-visibility (orig-func &rest args)
  (let ((org-startup-folded 'showeverything))
         (apply orig-func args)))

(advice-add 'nroam--set-sections-visibility :around #'sn/advice-nroam--set-sections-visibility)

If you like the idea of adding a custom variable to your package, I am happy to contribute the changes. Otherwise, I can just live with my advice function.