From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uPV9OAFl2mTrfQAASxT56A (envelope-from ) for ; Mon, 14 Aug 2023 19:31:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ONBkOAFl2mQmmwAA9RJhRA (envelope-from ) for ; Mon, 14 Aug 2023 19:31:45 +0200 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 B025F4D859 for ; Mon, 14 Aug 2023 19:31:44 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fizz.buzz header.s=fm3 header.b=Mh2jYHCl; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=A2xjpPKM; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692034305; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=joHniLbyT6ZhbVSSeSlAMZUMhwjo7LyJg/woYziAqMw=; b=k4KgUWu+ezW7y7U5/islCfnoXVdwcOyHZj4ILLK7tduiB8k/Qp4mMdZdInRVr09+v+z+R6 /sdsGeHXniaV09Fs6fJtqXEGoXJkbNoIDALb13Y4GPUuuesYrNVfFojRypYfHkeJ2TFzDW CqWziia+60K/MP6X+KYsu0BQX/x3m1vTzZ2QOAwgq7jd7Z/CGkeBTrNgjsXrPznTYoNFGF HQAV/oEByQrH1/EqnBYQjnJJH12bii+2CD3doJr80axDRmQU1fv7P/O7SyNYXQqwsFl/cH LF0m4SAGj+51PkilwBcSphpDurGWF1x1WO2eoiuF35DvUtzoxNXchZgZBcp0OA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fizz.buzz header.s=fm3 header.b=Mh2jYHCl; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=A2xjpPKM; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692034305; a=rsa-sha256; cv=none; b=k+w0FJxguBBJ55FXgy1Udi2DPpx2XIXVZRdLFYh60KPcoCPghcS12eAOIRzU8M17vHXyNN /EOatKcywKIL1Rk0IRmGmks8bSqwU+aiSi2mkCwezRKufgUbyLJKNDLPJCgFVQVltovLNp NHL5x2i15kpMzpSZqMGvVuYkYa7DuyWx1fSar/nHDorNsAslwHHRZyhqF5TsjCE4JdtYQJ mP2kphCZk39ZnlF9YN4brwbZlayTSWSpeiNGEy14xIx4rmW3Ji9WU6YKPy80dJR6rkomwY TeZuP3y3mygAq0lY1YaJc3LkFRU5DvBuGsF5gbWlRFfUg8QLOyTFqSKeiz31mQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVbP4-0007T3-RX; Mon, 14 Aug 2023 13:30:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVbP2-0007SV-Sl for emacs-orgmode@gnu.org; Mon, 14 Aug 2023 13:30:53 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVbP0-0006oe-Qd for emacs-orgmode@gnu.org; Mon, 14 Aug 2023 13:30:52 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 633B15C0167 for ; Mon, 14 Aug 2023 13:30:48 -0400 (EDT) Received: from imap47 ([10.202.2.97]) by compute6.internal (MEProxy); Mon, 14 Aug 2023 13:30:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fizz.buzz; h=cc :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t=1692034248; x=1692120648; bh=joHniLbyT6ZhbVSSeSlAMZUMh wjo7LyJg/woYziAqMw=; b=Mh2jYHClx2xQguh+4rFTpvRZKjj/+9jHET0TcfZNn Gp8mAdNY+r+WXyx4M0tsj3zOnhUbAGWspeCd4ZI91gCe+MhmSsCwNeu1Ew0D4FTH kQwCwG06A8abphIba0WCu+FZP1FvWm/rUCyrgJrSzou/o1s6DGZKLlEgNFN7c35i lmRclKlyUAvmGAWSK/JhCGXhxYkdA9ikNP4zav0sURC1UqMqtdhQxIjetAypSrTd 0dkIbiLFmVjsBCRPN8bmNOP1ogclENEeuKeyK+xoE7NybOJoFnkfpWpnCOgs47n0 2/hxjHesMS4PofiQuZSK9y8BgsE0GeCmq++t1GoJMntBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1692034248; x=1692120648; bh=joHniLbyT6ZhbVSSeSlAMZUMhwjo7LyJg/w oYziAqMw=; b=A2xjpPKMPnCV3sEC4V+jFNTcKbzeGh6cb6YVBtstyPuhNYeo9kk DzZjHxOQNG85oJ3Sqz7Jw6Jvwy8xLcolB/Oco8E3l2wttWn/76y1izijI7+cxlce 4wQmms1ETZqYoAcqulMBHfEzf+Gz5lcW/v8LZOh+wambR065j+LKukISLjl39pgt dkiAWyKrNrj4bhXgNb3odlGzlF/LOkyObMuffQzrhdcbQuzZTXAQI0OmTlFHsXb3 CABqcx6D5dlpSMt1RwPXi+m3SIsx26BLTHSuihQhwJ8aqy0IBTkgRa0RvGlltVnK YZxU11QIXKuw9SKO/Gq9TAc02cDPgHLNJtQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddtgedgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesthdtre dtreertdenucfhrhhomhepfdfvohhmucetlhgvgigrnhguvghrfdcuoehtohhmsehfihii iidrsghuiiiiqeenucggtffrrghtthgvrhhnpeekffehfeeigeeklefgjeeutdehfefgfe elfeeuvdetvdegudetudeitefgheffteenucffohhmrghinhepohhrghhmohguvgdrohhr ghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehtoh hmsehfihiiiidrsghuiiii X-ME-Proxy: Feedback-ID: i589b4368:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0DCDCA60077; Mon, 14 Aug 2023 13:30:47 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-624-g7714e4406d-fm-20230801.001-g7714e440 Mime-Version: 1.0 Message-Id: Date: Mon, 14 Aug 2023 13:30:23 -0400 From: "Tom Alexander" To: emacs-orgmode@gnu.org Subject: Export snippet matching without closing "@@" Content-Type: text/plain Received-SPF: pass client-ip=66.111.4.29; envelope-from=tom@fizz.buzz; helo=out5-smtp.messagingengine.com X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 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, FROM_SUSPICIOUS_NTLD=0.001, FROM_SUSPICIOUS_NTLD_FP=1.999, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_PDS_OTHER_BAD_TLD=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -1.78 X-Migadu-Queue-Id: B025F4D859 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -1.78 X-TUID: sAJzgR7JVx2X I suspect this is a regression. I am using this test document: ``` @@latex: \documentclass[margin,11pt]{res} % default is 10 pt @@ ``` and dumped the AST with M-x eval-expression (message "%s" (pp-to-string (org-element-parse-buffer))) When using the latest in main (commit b89bc55867d7cb809c379d371d12d409db785154, Org mode version 9.7-pre (release_N/A-N/A-b89bc5 @ /usr/share/emacs/site-lisp/org/)) the "@@latex:" gets parsed as an export snippet despite not having a closing "@@" (because the "@@" is in a different paragraph). When using the version of org-mode that shipped with emacs 29.1 (Org mode version 9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)) the "@@latex:" gets parsed as plaintext. The docs seem to show that a "@@" is required as the end of an export snippet based on the pattern "@@BACKEND:VALUE@@": https://orgmode.org/worg/org-syntax.html#Export_Snippets AST from org-mode in main: ``` (org-data (:standard-properties [1 71 1 71 0 1 nil nil nil 3 71 org-data nil nil nil nil nil #] :path nil :CATEGORY nil) (section (:standard-properties [1 71 1 71 0 1 nil nil nil 1 71 first-section nil nil #0 nil nil #]) (paragraph (:standard-properties [1 13 1 10 3 1 nil nil nil nil nil top-comment nil nil #1 nil nil #]) (export-snippet (:standard-properties [1 9 nil nil 0 nil nil nil nil nil nil nil nil nil #2 nil nil #] :back-end "latex" :value nil)) #("\n" 0 1 (:parent #2))) (paragraph (:standard-properties [13 68 13 65 3 13 nil nil nil nil nil nil nil nil #1 nil nil #]) (latex-fragment (:standard-properties [13 46 nil nil 1 nil nil nil nil nil nil nil nil nil #2 nil nil #] :value "\\documentclass[margin,11pt]{res}")) #("% default is 10 pt\n" 0 19 (:parent #2))) (paragraph (:standard-properties [68 71 68 71 0 68 nil nil nil nil nil nil nil nil #1 nil nil #]) #("@@\n" 0 3 (:parent #2))))) ``` AST from org-mode in emacs 29.1: ``` (org-data (:begin 1 :contents-begin 1 :contents-end 71 :end 71 :robust-begin 3 :robust-end 69 :post-blank 0 :post-affiliated 1 :path nil :mode org-data :CATEGORY nil :granularity nil) (section (:begin 1 :end 71 :contents-begin 1 :contents-end 71 :robust-begin 1 :robust-end 69 :post-blank 0 :post-affiliated 1 :mode first-section :granularity nil :parent #0) (paragraph (:begin 1 :end 13 :contents-begin 1 :contents-end 10 :post-blank 3 :post-affiliated 1 :mode top-comment :granularity nil :parent #1) #("@@latex:\n" 0 9 (:parent #2))) (paragraph (:begin 13 :end 68 :contents-begin 13 :contents-end 65 :post-blank 3 :post-affiliated 13 :mode nil :granularity nil :parent #1) (latex-fragment (:value "\\documentclass[margin,11pt]{res}" :begin 13 :end 46 :post-blank 1 :parent #2)) #("% default is 10 pt\n" 0 19 (:parent #2))) (paragraph (:begin 68 :end 71 :contents-begin 68 :contents-end 71 :post-blank 0 :post-affiliated 68 :mode nil :granularity nil :parent #1) #("@@\n" 0 3 (:parent #2))))) ``` -- Tom Alexander