emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: John Hendy <jw.hendy@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Clarification on org-startup-fold behavior vs. docs
Date: Wed, 20 Oct 2021 01:29:32 +0800	[thread overview]
Message-ID: <87wnm8gbyb.fsf@localhost> (raw)
In-Reply-To: <CA+M2ft-FmeL6LMiyBgUgmzf27=w6Ge_h0s+9A2LEb2aq0jYV1Q@mail.gmail.com>

John Hendy <jw.hendy@gmail.com> writes:

> #+begin_example
> (add-to-list 'load-path "~/.elisp/org/lisp/")
> (add-to-list 'load-path "~/.elisp/org/contrib/lisp/")
> (setq org-startup-folded "overview")
> #+end_example

The value should be a symbol, not a string:

(setq org-startup-folded 'overview)

customise interface even tries to warn you that something is wrong:

> In addition, M-x customize-variable for org-startup-folded says:
> #+begin_quote
> org-startup-folded: "overview"
>     State : CHANGED outside Customize. (mismatch) <--- this is a clue 
>    Non-nil means entering Org mode will switch to OVERVIEW. Hide

If you select the value from customise interface, Emacs would set it
correctly.  Direct setting is indeed possible, but you need to consult
how the variable is defined.  Note the :type specifier below (also, see
15.4 Customization Types section of Elisp manual).

(defcustom org-startup-folded 'showeverything
  "Non-nil means entering Org mode will switch to OVERVIEW.

This can also be configured on a per-file basis by adding one of
the following lines anywhere in the buffer:

   #+STARTUP: fold              (or `overview', this is equivalent)
   #+STARTUP: nofold            (or `showall', this is equivalent)
   #+STARTUP: content
   #+STARTUP: show<n>levels (<n> = 2..5)
   #+STARTUP: showeverything

Set `org-agenda-inhibit-startup' to a non-nil value if you want
to ignore this option when Org opens agenda files for the first
  :group 'org-startup
  :package-version '(Org . "9.4")
  :type '(choice
	  (const :tag "nofold: show all" nil)
	  (const :tag "fold: overview" t)
	  (const :tag "fold: show two levels" show2levels)
	  (const :tag "fold: show three levels" show3levels)
	  (const :tag "fold: show four levels" show4evels)
	  (const :tag "fold: show five levels" show5levels)
	  (const :tag "content: all headlines" content)
	  (const :tag "show everything, even drawers" showeverything)))


  reply	other threads:[~2021-10-19 17:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 16:58 Clarification on org-startup-fold behavior vs. docs John Hendy
2021-10-19 17:29 ` Ihor Radchenko [this message]
2021-10-19 18:23   ` John Hendy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnm8gbyb.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jw.hendy@gmail.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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