From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aJDBMZyi+1/bMAAA0tVLHw (envelope-from ) for ; Mon, 11 Jan 2021 00:58:04 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id yCSVLZyi+18uOQAAB5/wlQ (envelope-from ) for ; Mon, 11 Jan 2021 00:58:04 +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 51B5F9402A9 for ; Mon, 11 Jan 2021 00:58:04 +0000 (UTC) Received: from localhost ([::1]:48950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kylX0-0007Pw-Rm for larch@yhetil.org; Sun, 10 Jan 2021 19:58:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kylWJ-0007Pa-Mh for emacs-orgmode@gnu.org; Sun, 10 Jan 2021 19:57:19 -0500 Received: from out0.migadu.com ([2001:41d0:2:267::]:45790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kylWD-0002rS-5J for emacs-orgmode@gnu.org; Sun, 10 Jan 2021 19:57:19 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1610326630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HY2GQlxDh24ZPEZi9FhGOcLY35WtABu68TFSpm9wGOo=; b=R3AqjeG7XLKL25pFObtVRy5Qk5pUWx0jwxfU6UrZTL2VCNigLHudjAkOpoLP7U7RHxjPZ9 x8AEiIS5bQbbg2xrGG+tRWunjY2q7FS30nJYrj6CDV2T3NZq8Qv2SA6aQZY9UcsaZc0C9f H1tL7GvS48vVJMvVHabDWvhmNM+SqLa+c1UDeu6Q1hHX76fM+jQYqlwF5ob2DEkXrZHEAh RtpRmWS8uWamVbiUhxqMdHsQgqgQIOd+xW+2ScgGTyTU2sRq8dctSRklHVmZl14+oELhL/ XpKXaZ69iquMeQL7p+vw2qqEHtcHw8AQM92nZUgbSQ5F8uovVc+wfDMq66oXPQ== From: Kyle Meyer To: TRS-80 Subject: Re: [PATCH] org-footnote: fix inserting new footnote mangling drawers (was: Re: Bug: inserting footnote when Footnotes heading has property drawer [9.3.6 (9.3.6-23-g01ee25-elpaplus @ /home/user/.emacs.d/elpa/org-plus-contrib-20200309/)]) In-Reply-To: References: <1e98d0e48139cfb9cc98460dbf7ffccd@isnotmyreal.name> Message-ID: <87h7nop9y5.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Date: Mon, 11 Jan 2021 00:57:09 GMT Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=kyle@kyleam.com; helo=out0.migadu.com 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, 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.81 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=R3AqjeG7; dmarc=none; 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-Migadu-Queue-Id: 51B5F9402A9 X-Spam-Score: -0.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: 5UrXeq8xIVAk Thanks for the initial report and the patch. TRS-80 writes: > Attached please find a very simple (one line) patch that I believe > should fix this issue. > > This patch is of course based on latest git (not my personal outdated > version) and also maint branch. I think I've got that right? Looks good to me. > Subject: [PATCH] org-footnote: fix inserting new footnote mangling drawers convention nit: s/fix/Fix/ (no need to resend) > * org-footnote.el (org-footnote-create-definition): Replace > `forward-line' with `org-end-of-meta-data' to skip over any > properties and/or drawers that may be present on the > `org-footnote-section' heading (default "Footnotes"). > > TINYCHANGE > --- > lisp/org-footnote.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I'm planning to squash the following test in when applying. Look okay to you? diff --git a/testing/lisp/test-org-footnote.el b/testing/lisp/test-org-footnote.el index eca24d315..50a430785 100644 --- a/testing/lisp/test-org-footnote.el +++ b/testing/lisp/test-org-footnote.el @@ -138,7 +138,20 @@ (ert-deftest test-org-footnote/new () (org-test-with-temp-text "Paragraph\n# Local Variables:\n# foo: t\n# End:" (let ((org-footnote-section "Footnotes")) (org-footnote-new)) - (buffer-string))))) + (buffer-string)))) + (should + (equal "Para[fn:1] +* Footnotes +:properties: +:custom_id: id +:end: + +\[fn:1]" + (org-test-with-temp-text + "Para\n* Footnotes\n:properties:\n:custom_id: id\n:end:" + (let ((org-footnote-section "Footnotes")) + (org-footnote-new)) + (org-trim (buffer-string)))))) (ert-deftest test-org-footnote/delete () "Test `org-footnote-delete' specifications."