emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-startup-folded does not work with directory local variables
       [not found] <1984742079.3751611.1651538242680.ref@mail.yahoo.com>
@ 2022-05-03  0:37 ` Max Fujimoto
  2022-05-03 21:29   ` Jeremie Juste
  2022-05-04 10:37   ` Ihor Radchenko
  0 siblings, 2 replies; 10+ messages in thread
From: Max Fujimoto @ 2022-05-03  0:37 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 616 bytes --]

Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6)

The variable org-startup-folded does not work expected in .dir-locals.el.The option "#+startup: fold" works as expected.


To replicate 
    - start emacs -q    - create a test dir    - create or copy an .org file with a few headers, sub headers and some content in(to) the test dir.
    - add "((org-mode . ((org-startup-folded . t))))" to "./.dir-locals.el"    - open the org file    - check M-x describe-variable to confirm variable org-startup-folded is set to t and not default value


thanks

[-- Attachment #2: Type: text/html, Size: 1571 bytes --]

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

* Re: org-startup-folded does not work with directory local variables
  2022-05-03  0:37 ` org-startup-folded does not work with directory local variables Max Fujimoto
@ 2022-05-03 21:29   ` Jeremie Juste
  2022-05-04 10:37   ` Ihor Radchenko
  1 sibling, 0 replies; 10+ messages in thread
From: Jeremie Juste @ 2022-05-03 21:29 UTC (permalink / raw)
  To: Max Fujimoto; +Cc: emacs-orgmode

Hello Max,


On Tuesday,  3 May 2022 at 00:37, Max Fujimoto wrote:
> Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo
> version 1.17.6)


I must apologise for, I haven't made the jump to emacs 28 yet:  GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.24) of 2022-01-16.

I'm on the following version of Org mode version 9.5.3 (release_9.5.3-467-g2bd34e @ /home/djj/src/org-mode/lisp/)

and I don't know where is .dir-locals.el.

but, with the following unfoled file /tmp/test.org

* Some Heading Title [0/2] 
** TODO Some Todo Item
** TODO heading 3


the following command

$ emacs -Q -L ./lisp -l org   --eval "(setq org-startup-folded t)"
/tmp/test.org

Produces your desired results

* Some Heading Title [0/2] ...


HTH,
Jeremie


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

* Re: org-startup-folded does not work with directory local variables
  2022-05-03  0:37 ` org-startup-folded does not work with directory local variables Max Fujimoto
  2022-05-03 21:29   ` Jeremie Juste
@ 2022-05-04 10:37   ` Ihor Radchenko
  2022-05-04 13:17     ` Robert Pluim
  1 sibling, 1 reply; 10+ messages in thread
From: Ihor Radchenko @ 2022-05-04 10:37 UTC (permalink / raw)
  To: Max Fujimoto; +Cc: emacs-orgmode

Max Fujimoto <max.fujimoto@rogers.com> writes:

> Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6)
>
> The variable org-startup-folded does not work expected in .dir-locals.el.The option "#+startup: fold" works as expected.

This is because Emacs loads directory-local variables _after_ Org mode
is loaded. That is, you set org-startup-folded after startup is
complete.

I recommend reporting this to Emacs bug tracker.

Best,
Ihor


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

* Re: org-startup-folded does not work with directory local variables
  2022-05-04 10:37   ` Ihor Radchenko
@ 2022-05-04 13:17     ` Robert Pluim
  2022-05-04 13:46       ` Ihor Radchenko
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2022-05-04 13:17 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Max Fujimoto, emacs-orgmode

>>>>> On Wed, 04 May 2022 18:37:47 +0800, Ihor Radchenko <yantar92@gmail.com> said:

    Ihor> Max Fujimoto <max.fujimoto@rogers.com> writes:
    >> Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6)
    >> 
    >> The variable org-startup-folded does not work expected in
    >> .dir-locals.el.The option "#+startup: fold" works as expected.

    Ihor> This is because Emacs loads directory-local variables _after_ Org mode
    Ihor> is loaded. That is, you set org-startup-folded after startup is
    Ihor> complete.

    Ihor> I recommend reporting this to Emacs bug tracker.

I donʼt think this is a bug: directory-local variables are supposed to
behave the same as file-local variables, and setting
org-startup-folded in a local variable section also doesnʼt get
applied.

Robert
-- 


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

* Re: org-startup-folded does not work with directory local variables
  2022-05-04 13:17     ` Robert Pluim
@ 2022-05-04 13:46       ` Ihor Radchenko
  2022-05-04 14:16         ` Robert Pluim
  0 siblings, 1 reply; 10+ messages in thread
From: Ihor Radchenko @ 2022-05-04 13:46 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Max Fujimoto, emacs-orgmode

Robert Pluim <rpluim@gmail.com> writes:

>     Ihor> I recommend reporting this to Emacs bug tracker.
>
> I donʼt think this is a bug: directory-local variables are supposed to
> behave the same as file-local variables, and setting
> org-startup-folded in a local variable section also doesnʼt get
> applied.

This is no different. org-startup-folded controls loading of Org mode.
However, Emacs applies directory-local variables and file-local
variables _after_ loading Org mode. Org cannot do much about it without
hacking Emacs defaults.

Best,
Ihor


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

* Re: org-startup-folded does not work with directory local variables
  2022-05-04 13:46       ` Ihor Radchenko
@ 2022-05-04 14:16         ` Robert Pluim
  2022-05-04 14:46           ` Ihor Radchenko
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2022-05-04 14:16 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Max Fujimoto, emacs-orgmode

>>>>> On Wed, 04 May 2022 21:46:14 +0800, Ihor Radchenko <yantar92@gmail.com> said:

    Ihor> Robert Pluim <rpluim@gmail.com> writes:
    Ihor> I recommend reporting this to Emacs bug tracker.
    >> 
    >> I donʼt think this is a bug: directory-local variables are supposed to
    >> behave the same as file-local variables, and setting
    >> org-startup-folded in a local variable section also doesnʼt get
    >> applied.

    Ihor> This is no different. org-startup-folded controls loading of Org mode.
    Ihor> However, Emacs applies directory-local variables and file-local
    Ihor> variables _after_ loading Org mode. Org cannot do much about it without
    Ihor> hacking Emacs defaults.

Weʼre in agreement there. My point is that itʼs not a bug (although I
guess you could ask for a feature to apply local/directory variables
before applying the mode, but in this case thereʼs an easy
workaround).

Robert
-- 


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

* Re: org-startup-folded does not work with directory local variables
  2022-05-04 14:16         ` Robert Pluim
@ 2022-05-04 14:46           ` Ihor Radchenko
  2022-05-04 15:04             ` Robert Pluim
  0 siblings, 1 reply; 10+ messages in thread
From: Ihor Radchenko @ 2022-05-04 14:46 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Max Fujimoto, emacs-orgmode

Robert Pluim <rpluim@gmail.com> writes:

>     Ihor> This is no different. org-startup-folded controls loading of Org mode.
>     Ihor> However, Emacs applies directory-local variables and file-local
>     Ihor> variables _after_ loading Org mode. Org cannot do much about it without
>     Ihor> hacking Emacs defaults.
>
> Weʼre in agreement there. My point is that itʼs not a bug (although I
> guess you could ask for a feature to apply local/directory variables
> before applying the mode

It's not exactly a bug, but feature request to Emacs is exactly what I
was implying.

> , but in this case thereʼs an easy
> workaround).

I am not sure which workaround you are referring to.
Setting org-startup-folded globally? On per-file basis? the former is
global and will apply to broader scope than a directory-local variable.
The latter only works in a single file (and works instead of file-local
variable).

Best,
Ihor


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

* Re: org-startup-folded does not work with directory local variables
  2022-05-04 14:46           ` Ihor Radchenko
@ 2022-05-04 15:04             ` Robert Pluim
  2022-05-04 23:31               ` Max Fujimoto
  2022-05-05  3:21               ` Ihor Radchenko
  0 siblings, 2 replies; 10+ messages in thread
From: Robert Pluim @ 2022-05-04 15:04 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Max Fujimoto, emacs-orgmode

>>>>> On Wed, 04 May 2022 22:46:56 +0800, Ihor Radchenko <yantar92@gmail.com> said:

    Ihor> Robert Pluim <rpluim@gmail.com> writes:
    Ihor> This is no different. org-startup-folded controls loading of Org mode.
    Ihor> However, Emacs applies directory-local variables and file-local
    Ihor> variables _after_ loading Org mode. Org cannot do much about it without
    Ihor> hacking Emacs defaults.
    >> 
    >> Weʼre in agreement there. My point is that itʼs not a bug (although I
    >> guess you could ask for a feature to apply local/directory variables
    >> before applying the mode

    Ihor> It's not exactly a bug, but feature request to Emacs is exactly what I
    Ihor> was implying.

Right. My predictatron says itʼs unlikely to be greeted
enthusiastically.

    >> , but in this case thereʼs an easy
    >> workaround).

    Ihor> I am not sure which workaround you are referring to.
    Ihor> Setting org-startup-folded globally? On per-file basis? the former is
    Ihor> global and will apply to broader scope than a directory-local variable.
    Ihor> The latter only works in a single file (and works instead of file-local
    Ihor> variable).

I was talking about #+STARTUP: (Iʼm assuming #+SETUPFILE: also works,
but I haven't tried it).

Robert
-- 


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

* Re: org-startup-folded does not work with directory local variables
  2022-05-04 15:04             ` Robert Pluim
@ 2022-05-04 23:31               ` Max Fujimoto
  2022-05-05  3:21               ` Ihor Radchenko
  1 sibling, 0 replies; 10+ messages in thread
From: Max Fujimoto @ 2022-05-04 23:31 UTC (permalink / raw)
  To: Ihor Radchenko, Robert Pluim; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]

 Thanks for the info, 

I will look into reporting the issue with the emacs bug-tracker and for now use the per file "STARTUP:" option.
thanks again

    On Wednesday, May 4, 2022, 11:04:42 a.m. EDT, Robert Pluim <rpluim@gmail.com> wrote:  
 
 >>>>> On Wed, 04 May 2022 22:46:56 +0800, Ihor Radchenko <yantar92@gmail.com> said:

    Ihor> Robert Pluim <rpluim@gmail.com> writes:
    Ihor> This is no different. org-startup-folded controls loading of Org mode.
    Ihor> However, Emacs applies directory-local variables and file-local
    Ihor> variables _after_ loading Org mode. Org cannot do much about it without
    Ihor> hacking Emacs defaults.
    >> 
    >> Weʼre in agreement there. My point is that itʼs not a bug (although I
    >> guess you could ask for a feature to apply local/directory variables
    >> before applying the mode

    Ihor> It's not exactly a bug, but feature request to Emacs is exactly what I
    Ihor> was implying.

Right. My predictatron says itʼs unlikely to be greeted
enthusiastically.

    >> , but in this case thereʼs an easy
    >> workaround).

    Ihor> I am not sure which workaround you are referring to.
    Ihor> Setting org-startup-folded globally? On per-file basis? the former is
    Ihor> global and will apply to broader scope than a directory-local variable.
    Ihor> The latter only works in a single file (and works instead of file-local
    Ihor> variable).

I was talking about #+STARTUP: (Iʼm assuming #+SETUPFILE: also works,
but I haven't tried it).

Robert
-- 
  

[-- Attachment #2: Type: text/html, Size: 3387 bytes --]

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

* Re: org-startup-folded does not work with directory local variables
  2022-05-04 15:04             ` Robert Pluim
  2022-05-04 23:31               ` Max Fujimoto
@ 2022-05-05  3:21               ` Ihor Radchenko
  1 sibling, 0 replies; 10+ messages in thread
From: Ihor Radchenko @ 2022-05-05  3:21 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Max Fujimoto, emacs-orgmode

Robert Pluim <rpluim@gmail.com> writes:

> I was talking about #+STARTUP: (Iʼm assuming #+SETUPFILE: also works,
> but I haven't tried it).

FYI. #+SETUPFILE also does work.

Best,
Ihor


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

end of thread, other threads:[~2022-05-05 12:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1984742079.3751611.1651538242680.ref@mail.yahoo.com>
2022-05-03  0:37 ` org-startup-folded does not work with directory local variables Max Fujimoto
2022-05-03 21:29   ` Jeremie Juste
2022-05-04 10:37   ` Ihor Radchenko
2022-05-04 13:17     ` Robert Pluim
2022-05-04 13:46       ` Ihor Radchenko
2022-05-04 14:16         ` Robert Pluim
2022-05-04 14:46           ` Ihor Radchenko
2022-05-04 15:04             ` Robert Pluim
2022-05-04 23:31               ` Max Fujimoto
2022-05-05  3:21               ` Ihor Radchenko

Code repositories for project(s) associated with this 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).