[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57003: 28.1.90; Can local variables be loaded before loading major m
From: |
Stefan Monnier |
Subject: |
bug#57003: 28.1.90; Can local variables be loaded before loading major mode? |
Date: |
Tue, 18 Oct 2022 09:29:40 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> We have a variable org-startup-folded:
>
> Non-nil means entering Org mode will switch to OVERVIEW.
>
> This variable controls the initial state of the Org buffer.
> When, non-nil, headings will be folded at the end of Org initialization.
> This folding happens inside org-mode specification and hence setting the
> variable after Org mode is loaded makes no difference.
The problem is not that the variables are set too late,it's that you
fold too early: the folding should not to take place from within
`org-mode` but instead `org-mode` should add the folding function to
`hack-local-variables-hook`.
What you request is a common need, and `hack-local-variables-hook` is
the standard answer.
Stefan
- bug#57003: 28.1.90; Can local variables be loaded before loading major mode?,
Stefan Monnier <=
- bug#57003: 28.1.90; Can local variables be loaded before loading major mode?, Ihor Radchenko, 2022/10/29
- bug#57003: 28.1.90; Can local variables be loaded before loading major mode?, Stefan Monnier, 2022/10/29
- bug#57003: 28.1.90; Can local variables be loaded before loading major mode?, Ihor Radchenko, 2022/10/29
- bug#57003: 28.1.90; Can local variables be loaded before loading major mode?, Stefan Monnier, 2022/10/29
- bug#57003: 28.1.90; Can local variables be loaded before loading major mode?, Stefan Monnier, 2022/10/29
- bug#57003: 28.1.90; Can local variables be loaded before loading major mode?, Ihor Radchenko, 2022/10/30
- bug#57003: 28.1.90; Can local variables be loaded before loading major mode?, Stefan Monnier, 2022/10/30
- bug#57003: 28.1.90; Can local variables be loaded before loading major mode?, Ihor Radchenko, 2022/10/30
- bug#57003: 28.1.90; Can local variables be loaded before loading major mode?, Ihor Radchenko, 2022/10/30