From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wKhVDzA/22FrgwEAgWs5BA (envelope-from ) for ; Sun, 09 Jan 2022 21:01:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 8GIeDDA/22HAAAEAauVa8A (envelope-from ) for ; Sun, 09 Jan 2022 21:01:52 +0100 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 D4FD83ED0D for ; Sun, 9 Jan 2022 21:01:51 +0100 (CET) Received: from localhost ([::1]:59930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6eNz-00034G-1M for larch@yhetil.org; Sun, 09 Jan 2022 15:01:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6eNZ-00033t-58 for emacs-orgmode@gnu.org; Sun, 09 Jan 2022 15:01:25 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:60971) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6eNW-0004mT-KD for emacs-orgmode@gnu.org; Sun, 09 Jan 2022 15:01:24 -0500 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id C066C1BF205; Sun, 9 Jan 2022 20:01:14 +0000 (UTC) From: Nicolas Goaziou To: "Berry, Charles" Subject: Re: Way to mark contents of an Org special block as verbatim? References: <87ee5kwwht.fsf@posteo.net> <877dbcwtf7.fsf@posteo.net> <561D83E2-47BF-4AC2-B2AD-24B08D614845@health.ucsd.edu> Date: Sun, 09 Jan 2022 21:01:14 +0100 In-Reply-To: (Charles Berry's message of "Sun, 9 Jan 2022 19:57:14 +0000") Message-ID: <87zgo41xx1.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.201; envelope-from=mail@nicolasgoaziou.fr; helo=relay8-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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: , Cc: Juan Manuel =?utf-8?Q?Mac?= =?utf-8?Q?=C3=ADas?= , orgmode , Kaushal Modi Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641758511; 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; bh=sJER4cpxjPe+bDOtNvw8j+uXEU1W4XB0MrS7JwMVRkM=; b=fh+Tln27cuGYUwd8ARulpJ5y+O8qJ1E7RgAHipt4KQ9ZNjsqvNFvTqxxK6gN1EGh5qymWs mzcz/Y3FaI2PNctzYi+K8smcZOFU6GR4r+df3fD/5YLfWdUzwOyA5k3eX2u/4GemJk77Db KtGz3I/hlKXJmsKZuo3tb0ZVaaPPErck7RGAFVbE9T6Jw4AfvyuE/Oc7Qp0X8JLHxRZ6nu DHO2S+fmG1XzOyBmaHebx8+aw5lLwiQwu4jro2jecTw4CQk4/V9xOpTmRDX2vqkkaqVb/D eaJksugOZ5iaqXLnnLDPiRjdTWMeYZ/AEjda4fOkivu6OZe28Gx5gp9iDDPzSQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641758511; a=rsa-sha256; cv=none; b=AZhx0jZH1XcbGbawPsgWvd5eb+dJx5eFcgCFqTknXKhJ+VN70kG9GwTyq6VB9cepdmU7lc C1udBAOIKRZMGjDGHJvhQoPxkIdslbCjOryFwN5o3cv2RSpapDh5Zu5P5cK2FQjaB/8swj qt85PbxvRHKqsnEs281RdEztzoCKOTq2o31bVUxL9KfwoTsuxd0DhdjLTmzNWDZJhKOZjR aTAkw7ZrVNtIgbAVaFDdf6CeUACKsKT2Ld8ax+DR9gGfYo9f4xC8o4gRzuKAEcIgIxyUEb 3R3cqz8gozYdDh9P1Kkl/LwFCh6y9+49I+xiCBBxVcaUKme2y6YMxGZo6AxYTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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" X-Migadu-Spam-Score: -0.71 Authentication-Results: aspmx1.migadu.com; dkim=none; 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" X-Migadu-Queue-Id: D4FD83ED0D X-Spam-Score: -0.71 X-Migadu-Scanner: scn0.migadu.com X-TUID: bmbyXmd3AiAX Hello, "Berry, Charles" writes: > So, > : (format "{{<%s>}}\n%s{{}}\n" type contents type) > > has the contents already parsed and transcoded which you do not want. So use something like: > > #+begin_src emacs-lisp > > (let ((raw-contents > (buffer-substring-no-properties > (org-element-property :contents-begin special-block) > (org-element-property :contents-end special-block)))) > (format "{{<%s>}}\n%s{{}}\n" type raw-contents type)) I suggest to use (org-element-interpret-data (org-element-contents special-block)) Regards, -- Nicolas Goaziou