From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id qF4bBpijI2ah+wAAqHPOHw:P1 (envelope-from ) for ; Sat, 20 Apr 2024 13:14:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id qF4bBpijI2ah+wAAqHPOHw (envelope-from ) for ; Sat, 20 Apr 2024 13:14:32 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=MmxB8dES; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713611672; h=from:from:sender:sender: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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=weblyZAtitScGly8Bi8mHUN0kzqnVLYwytLtJNKGd70=; b=pafFUyu9mzEuykqi8eZ2qIHj+P7QCv310eRloBbO35yZGqDOg7CzjofkcDN/NInoYetA5t 0oVFm4G5+WcWt8VefkzDnDemFm2dG/fl3Ye/RYqmMVcPXsLQ2XjW+6bmJpn1vBwQ7VkQ4h iAD8Oy1flGNOjwWv49BCOyiK4CjV6/2OapscMjnl9QmBFUyTyjq0gIXPwZO0/k4Rav2qMA UVNuirdfyV9ldSSSoNWEvnY2vfbVBY1FH/u4Ddn4HnAph9S8iBfufCik6zqlLDxBdbbKNS PGXBFY3VYWStDE7XYWlqBQWMKN1nS0sWwvHC+Czsot8l5ga4IKfcRjuquL51EA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713611672; a=rsa-sha256; cv=none; b=Vd34/KC/rYrtcoZtwib305hdqfUdGK9MwQ5XqctwA/OIMWNQG6QuV21hVT7mfGW2pUQjhN ScHwXQZ6F79euBsgsQWHsbL1z6iT79wk5l9kw63g11urywe5BarfZBn0IOCIWoqJWkLvPW WAbpcnszKtCa1ObayUD1q0lFb/0ObTEjnr1yidtAR+JvqV1esS1joaM3hu7ma/YwMJUxCM 9rFdXj8n+FqRjEoZZszR5cYAMtQBf+jPh7WKoPp4U0SkYJtFCg3ZqEirheI7sWRcWdcTtg Ot3MU6vfY6nfwOFsNo4BsSInCNyrdTsNj84bDqzNQXk/CIsN1kCeOKiWbr/b5g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=MmxB8dES; 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"; dmarc=pass (policy=none) header.from=posteo.net 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 01DE763E5E for ; Sat, 20 Apr 2024 13:14:31 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ry8fK-0005bI-RQ; Sat, 20 Apr 2024 07:13: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 1ry8fF-0005al-Jl for emacs-orgmode@gnu.org; Sat, 20 Apr 2024 07:13:49 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ry8fD-00082E-FW for emacs-orgmode@gnu.org; Sat, 20 Apr 2024 07:13:49 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 14BB6240027 for ; Sat, 20 Apr 2024 13:13:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1713611625; bh=Nhqt+TIDp/xx3/yey04NjwUCgIRPritCoFtEEPyaDww=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=MmxB8dEShMIs5OY6vPMFNUIpKPrm5W/hnMoNfbDPhwq32PJl8fo6tmbuezbCH2M8l jcaDTMzSGAvae99h1AjmsEM/axeGkFC2iIy8hN8F2bsQNhHPCq0qMmvrdjUs9ikVzT P338f63VR0AjSnIcotCWm+OrIkOcmUk5PeSDhA6aXfSp5BDHU6YIqCVx2FAYyl3FSx zLU5KOSUEAAI8pzFNrk2cSWOnq+UHW6f8MdDhgqzzJMsgajsfUCu60ELTKot5RAsGA Z1G+d8uNk4M30AF/o6Bz/5hAzpUlFlPvXQSphVubbx4eg14gWN4/DBNh1YgU3Ifj/5 ghERttrHm8l3Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VM85h1vvmz9rxG; Sat, 20 Apr 2024 13:13:44 +0200 (CEST) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Trailing whitespace after export snippets without a transcoder (was: [PATCH v2] org-faq.org: Inline comments) In-Reply-To: References: <5210ac1c-ed73-4b82-a296-41cf90b9f0a7@gmail.com> <87jzvmwnmw.fsf@localhost> <87ilauagvy.fsf@localhost> <87y1hqqgiu.fsf@localhost> <87ttk26crq.fsf@localhost> Date: Sat, 20 Apr 2024 11:14:33 +0000 Message-ID: <87h6fwmgkm.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -7.72 X-Spam-Score: -7.72 X-Migadu-Queue-Id: 01DE763E5E X-Migadu-Scanner: mx13.migadu.com X-TUID: 34YHszQt+K75 Max Nikulin writes: >>>>>> +#+begin_src org >>>>>> +The following line may become a patagraph separator. >>>>>> +@@comment: might give unexpected effect @@ >>>>>> +Put some text before @@comment: a better variant >>>>>> +@@ and after instread. >>>>>> +#+end_src >> >> I am no longer able to reproduce the problem with @@comment:...@@ >> splitting paragraph in the above example. > > I see no changes in respect to ox-md on the main branch. Right. Upon debugging further, to my great surprise, I found the following comment in ox.el: ;; Export snippets never return a nil value so ;; that white spaces following them are never ;; ignored. (and (eq type 'export-snippet) "") and then even a test: ;; Ignored export snippets do not remove any blank. (should (equal "begin end\n" (org-test-with-parsed-data "begin @@test:A@@ end" (org-export-data-with-backend tree (org-export-create-backend :transcoders '((paragraph . (lambda (paragraph contents info) contents)) (section . (lambda (section contents info) contents)))) info)))) The test was added in the commit https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a6d9fd82e Back-end developers should pay attention to the fact that white spaces before and after an ignored export snippet now are accumulated in the output. I have no clue about the rationale of this special behaviour - it dates back to the days when Org export was merged. It is also not documented anywhere, AFAIK. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at