emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Chang Xiaoduan <drcxd@sina.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-num-skip-unnumbered is not respected if a org-mode file enables org-num-mode on startup [9.6.18 ( @ /home/drcxd/.emacs.d/elpa/org-9.6.18/)]
Date: Thu, 08 Feb 2024 15:21:40 +0000	[thread overview]
Message-ID: <87v86zyoaj.fsf@localhost> (raw)
In-Reply-To: <87jznf7gqo.fsf@PWRD-20230207OU.>

Chang Xiaoduan <drcxd@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>


  reply	other threads:[~2024-02-08 15:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08  3:54 [BUG] org-num-skip-unnumbered is not respected if a org-mode file enables org-num-mode on startup [9.6.18 ( @ /home/drcxd/.emacs.d/elpa/org-9.6.18/)] Chang Xiaoduan
2024-02-08 15:21 ` Ihor Radchenko [this message]
2024-02-09  4:29   ` Chang Xiaoduan
2024-02-09 22:55     ` Ihor Radchenko

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=87v86zyoaj.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=drcxd@sina.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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