diff options
author | Anders Johansson <mejlaandersj@gmail.com> | 2020-08-25 15:55:45 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-08-27 11:29:12 +0200 |
commit | 40474827eade4ab4d3667b4dde5f0833562c7b87 (patch) | |
tree | 169c2c1a8330673ad482c21f18dcccba5e05feee | |
parent | cdfc404bed0fabeee65938af329240f183040493 (diff) | |
download | org-mode-40474827eade4ab4d3667b4dde5f0833562c7b87.tar.gz |
org-num: Fix bug in check for commented headlines
* lisp/org-num.el (org-num--skip-value): Handle empty headlines.
This happens when org-num-skip-commented is non-nil. When creating
a new headline, often org-num--skip-value is invoked before any
headline text is created. This means that ‘title‘ is nil and the
string-match check breaks. Checking if title is non-nil fixes this.
TINYCHANGE
-rw-r--r-- | lisp/org-num.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/org-num.el b/lisp/org-num.el index e816080..a5b044e 100644 --- a/lisp/org-num.el +++ b/lisp/org-num.el @@ -254,6 +254,7 @@ otherwise." org-footnote-section (equal title org-footnote-section)) (and org-num-skip-commented + title (let ((case-fold-search nil)) (string-match org-num--comment-re title)) t) |