From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EBUTJ4kYRV85SgAA0tVLHw (envelope-from ) for ; Tue, 25 Aug 2020 13:56:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id WIICI4kYRV99ZgAA1q6Kng (envelope-from ) for ; Tue, 25 Aug 2020 13:56:25 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 40EA0940539 for ; Tue, 25 Aug 2020 13:56:25 +0000 (UTC) Received: from localhost ([::1]:53478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAZR2-0001aR-7y for larch@yhetil.org; Tue, 25 Aug 2020 09:56:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAZQd-0001YT-Jg for emacs-orgmode@gnu.org; Tue, 25 Aug 2020 09:55:59 -0400 Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]:42846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAZQb-0000N9-US for emacs-orgmode@gnu.org; Tue, 25 Aug 2020 09:55:59 -0400 Received: by mail-ot1-x330.google.com with SMTP id o8so7686282otp.9 for ; Tue, 25 Aug 2020 06:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=ZPbSDnihBgkW7vfWMTeYWDtl69DrFHmffJERGRZ0q0M=; b=JImY4X6K0S7cL5EwP5P+ti82e4xYNnzMJQeKhrY7pNqKvk6L4oAw8vzpKvXP7tjeQ/ t16gAzTh6rgPSxkB3GgI6c72siJ2oVsDFgUYr/w8lqB3kmvNqjf07w8FEkfq0u3IpzOo WNPj0q3J1xve/U3kzVSbBCoo7d6K7WopLkkFI8g+qRNtGhjEugV7ZBYKGpYD4wUDyL8c EVrbR+Er9OdOY4ysN8V1EYZaagmJ/tL6Kl6nIO1f6Ui343boGrMcWRndBeMuXvlhIL73 EPEo4GsUVnkPozPTyZ0CllfQA6EpgpoUsBlTolANx0byK/9HnV2WXlWzy1nQ7+5/hIkw Ns9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=ZPbSDnihBgkW7vfWMTeYWDtl69DrFHmffJERGRZ0q0M=; b=Ux7bNXS14cEzyPsK56xT2+QWPna0x+0gIDvgboGjfzH3PBMAISDUptHssfHLWSLV/L gxLRcRQPNHhd32nMecLBeSfYEA74AQoajPYlEU8T5MoYBWwpS2+8v0bwCHEe9inLIF1V IaBw3mLwxXXwtZM4Ve0bWaDgyT1vc1s2OeDBjk+y6otq3J+i+Cf4FpxCIEyk9xnkZ2La CP6Qi1GOH3+9hGSGb0iGnS7rkwQJaGolx11xORGMOy+hdwFOMDYeq6nZo9+rdWBEUsFY 8quFEwuSqr1BRM3zUDuwIwNQJbOi5bGusuutuVID+rr1TLPKYJFHhxBQ5jHdLiKvks1l lSSA== X-Gm-Message-State: AOAM530UU1uz9acGcxz0rwEVqSOQukqdmp+oC+9nOrz77s8WzRd7HKEa NcT+OpDXhNWip8iqoxFOvw3KTu6l+myRzhmuUTt+0yABQiRQdg== X-Google-Smtp-Source: ABdhPJwyvLz3IKTtFTuK72Go0k6FL+IIf/vjSWxbBQDhwIMt94z389aXQbdy7XXIZrvAQGJqMZcDVwKsDCp4H4Vot1E= X-Received: by 2002:a9d:6b0c:: with SMTP id g12mr5442787otp.315.1598363755894; Tue, 25 Aug 2020 06:55:55 -0700 (PDT) MIME-Version: 1.0 From: Anders Johansson Date: Tue, 25 Aug 2020 15:55:45 +0200 Message-ID: Subject: [PATCH] Fix bug in org-num check for commented headlines To: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::330; envelope-from=mejlaandersj@gmail.com; helo=mail-ot1-x330.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=JImY4X6K; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: Z0vP7nrqBQgv I found an easily solved bug in org-num. 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 =E2=80=98title=E2=80= =98 is nil and the string-match check breaks. Checking if title is non-nil fixes this. TINYCHANGE --- lisp/org-num.el | 1 + 1 file changed, 1 insertion(+) 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 @@ (defun org-num--skip-value () 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) --=20 2.28.0