Chang Xiaoduan <dr...@sina.com> writes: > I have been experimenting with org-num-mode recently. I find that if an > org-mode file enables org-num-mode on startup by adding: > > ```emacs-lisp > #+STARTUP: num > ``` > > and if there is a file local prop line: > > ```emacs-lisp > # -*- org-num-skip-unnumbered: t; -*- > ```
> then org-num-mode does not respect the file local variable, i.e., some > headings with the `UNNUMBERED` property set to `t` still get their > numbering. This also happens for `org-num-max-level` if it is set on the > file local prop line. If I toggle org-num-mode after visiting the > file, then org-num-mode respect those file local variables. This is known. #+STARTUP options are handled before buffer-local variables take effect. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57003 Handled. > What's more, I have tried to remove the `STARTUP` keyword, so I can > enable org-num-mode after visiting the file. However, without enabling > org-num-mode on visiting the file, Emacs reports those file local > variables as unsafe, though their values are safe, according to the > documentation. I guess it is determined as unsafe because org-num-mode > is not loaded. Yup. Fixed on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=bfc0cb372 -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>