emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* "#+STARTUP: hideblocks"  has no effect?
@ 2021-04-01 13:10 autofrettage
  2021-04-06  3:07 ` Kyle Meyer
  2021-04-07  0:12 ` Nick Dokos
  0 siblings, 2 replies; 4+ messages in thread
From: autofrettage @ 2021-04-01 13:10 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "#+STARTUP: hideblocks"  has no effect?
  2021-04-01 13:10 "#+STARTUP: hideblocks" has no effect? autofrettage
@ 2021-04-06  3:07 ` Kyle Meyer
  2021-04-06 12:31   ` autofrettage
  2021-04-07  0:12 ` Nick Dokos
  1 sibling, 1 reply; 4+ messages in thread
From: Kyle Meyer @ 2021-04-06  3:07 UTC (permalink / raw)
  To: autofrettage; +Cc: emacs-orgmode@gnu.org

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---


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "#+STARTUP: hideblocks"  has no effect?
  2021-04-06  3:07 ` Kyle Meyer
@ 2021-04-06 12:31   ` autofrettage
  0 siblings, 0 replies; 4+ messages in thread
From: autofrettage @ 2021-04-06 12:31 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "#+STARTUP: hideblocks"  has no effect?
  2021-04-01 13:10 "#+STARTUP: hideblocks" has no effect? autofrettage
  2021-04-06  3:07 ` Kyle Meyer
@ 2021-04-07  0:12 ` Nick Dokos
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Dokos @ 2021-04-07  0:12 UTC (permalink / raw)
  To: emacs-orgmode

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-07  0:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 13:10 "#+STARTUP: hideblocks" has no effect? autofrettage
2021-04-06  3:07 ` Kyle Meyer
2021-04-06 12:31   ` autofrettage
2021-04-07  0:12 ` Nick Dokos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).