Org-mode mailing list
 help / color / mirror / 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

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

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

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

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git