Hi, I recently read about the #+STARTUP parameter "hideblocks", but it doesn't seem to have any effect in my set-up. All the blocks kept laughing straight in my face. :-( Any ideas about what could have gone wrong? I use Org Mode 9.4.5 with Emacs 26.3, and I also tried closing the file and Emacs before I tried. Cheers Rasmus p.s. Setting org-hide-block-startup with local variables is a solution, but not as nice as doing it with #+STARTUP, I'd say.
autofrettage writes:
> I recently read about the #+STARTUP parameter "hideblocks", but it
> doesn't seem to have any effect in my set-up. All the blocks kept
> laughing straight in my face. :-(
>
> Any ideas about what could have gone wrong?
Are you leaving org-startup-folded at showeverything (the default as of
9.4)? That will prevent org-startup-folded and "#+startup: hideblocks"
from having an effect:
(defun org-set-startup-visibility ()
...
(unless (eq org-startup-folded 'showeverything)
(when org-hide-block-startup (org-hide-block-all))
...)
For example, try this:
--8<---------------cut here---------------start------------->8---
#+startup: nofold
#+startup: hideblocks
#+begin_src emacs-lisp
(message "ok")
#+end_src
--8<---------------cut here---------------end--------------->8---
Kyle> Are you leaving org-startup-folded at showeverything Yes I do. Kyle> That will prevent org-startup-folded and "#+startup: Kyle> hideblocks" from having an effect: I must admit I was pig ignorant of that. Kyle> For example, try this: Specifying "#+startup: nofold" together with "#+startup: hideblocks", as suggested, worked like a charm! Case closed, and I will try to RTFM the next time. Cheers Rasmus
autofrettage <autofrettage@protonmail.ch> writes:
> I recently read about the #+STARTUP parameter "hideblocks", but it
> doesn't seem to have any effect in my set-up. All the blocks kept
> laughing straight in my face. :-(
>
> Any ideas about what could have gone wrong?
>
> I use Org Mode 9.4.5 with Emacs 26.3, and I also tried closing the
> file and Emacs before I tried.
>
>
> p.s. Setting org-hide-block-startup with local variables is a
> solution, but not as nice as doing it with #+STARTUP, I'd say.
It interacts with org-startup-folded (whose default was changed
recently to 'showeverything'): you need to set the latter to something
other than 'showeverything' in order for hideblocks to be effective.
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler