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 ms13.migadu.com with LMTPS id kENYFe52t2YSUAEAqHPOHw:P1 (envelope-from ) for ; Sat, 10 Aug 2024 14:19:26 +0000 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 kENYFe52t2YSUAEAqHPOHw (envelope-from ) for ; Sat, 10 Aug 2024 16:19:26 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=k8SCF+4+; 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=1723299566; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=sdND1723TK8a8zzCPDgrIfZDSuQjnrx/DzB8LjkJtY0=; b=AeYZyvkESxVPM5A7jPcBfRyPokWEEsOIAeKp6fhkmffk4kop867h6uLiS6n6VmT8ETsatz 38PiDgETfRqJz1GiZPvxy+eLM37T7o/jMDrxCSMZpUZ7osP9QSn+Lxg+5YAQ0jBoPZZpCd dyo+kj8YdeiHWi3/OGF/DxrnwjOq+VPcxpItFKkwaVPxg+19BA75SGtwqleuEXQIpF4IWY bS/vBrVqiFQEYOuXR3c+cQjJ018mBKf868LA+zzE95dLiMs6+AoafKA7NW++9jDcvcXiS2 PhLZJmOMKH4/qmdpo/uUW0MIu6a9hIo7Lf9jt9KNIk5onTa9/dlHDTlv81ZTGQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=k8SCF+4+; 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-Seal: i=1; s=key1; d=yhetil.org; t=1723299566; a=rsa-sha256; cv=none; b=cu5bxK5XZHQ2/SxbcGO9iSeJBFLzmt4NdRznSAJHnQNPTBRM22sMP/cSlFpd5hFSsqlz9b 0mB5U3hlvAx8Fs+HW+PlwC7qN/3QWlHhvr11vJ/btikkpbVi9bpDQUBeRoUyRer9TWzMCP qbewwWjYz3IRqJZEcL2nhpYX8Qbe6mot9u2oAApl/L53jiT08k6dU8d7RPZjQiyviwdzXz HgRr42RwoRJMRrBofiUctVnAhjNzk3QUTbF9ClSDn1/j4I8FLi8YQO7o4ZDbMPGiF5xokP yxQ/5Bs7SRFNrQ5Z9WkKcrh6TKox5e0yiKmkWpKFG5dBmffUzyEBWMtaDBJ0tg== 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 0C2656076A for ; Sat, 10 Aug 2024 16:19:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scmvS-0000Iv-2w; Sat, 10 Aug 2024 10:18:34 -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 1scmvO-0000GS-P1 for emacs-orgmode@gnu.org; Sat, 10 Aug 2024 10:18:31 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scmvM-0002cn-Ng for emacs-orgmode@gnu.org; Sat, 10 Aug 2024 10:18:30 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6E880240101 for ; Sat, 10 Aug 2024 16:18:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1723299506; bh=Zs8PKupFAvffAjOUE+M5LYsTE4zDxTmHN/VsM0UjTb4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=k8SCF+4+o5IyRId6ccNML4hhM/LTTnTSMprmMFQiHB0Y09ztUP4UgPO13P05ZtY/g frI/9cI3nvpyhiSE4a4n9gfFu4nQ6hllzJvWESJNJfauNz2jD9HAQMXI2fQ19uP2zL vxWXxZV88+sSjVFt4GS+3Cs6Pa2pyeMCQIWRfFG2QLTSHd6koMzA4nAVC285eTZuBi xqwHSxMm5nHSOwxSTnJEDdhj86oVkgbd3hyAqENESBtcDrM/8+eIIT//GUnXmXQr4V /x6AOJNzfZepuU6KHm3FK+gDoEEIZcn+Qka4WZpC837kDLDsUPgpudQza2+gZEzPny X0YJs3j9IBiBA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Wh2v56DpJz6tw4; Sat, 10 Aug 2024 16:18:25 +0200 (CEST) From: Ihor Radchenko To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Cc: emacs-orgmode@gnu.org Subject: Re: Is raw output from Common Lisp and Scheme broken? In-Reply-To: References: Date: Sat, 10 Aug 2024 14:19:37 +0000 Message-ID: <875xs831fq.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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-Queue-Id: 0C2656076A X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -8.67 X-Spam-Score: -8.67 X-TUID: iWeOp5kZeIHn Rudolf Adamkovi=C4=8D writes: > I would like to output > > raw Org/LaTeX from Common Lisp and Scheme > > but it does not seem to work: > > EMACS LISP - ALL OK: > ... > LUA - ALL OK: > ... > COMMON LISP - *NOT* OK: > > (1) DOUBLE BACKSLASHES You can "print" it to format to make things work. Currently, ob-lisp simply does (org-strip-quotes result) in contrast to (if (or (member "scalar" result-params) (member "verbatim" result-params)) (format "%S" result) (format "%s" result)) in ob-emacs-lisp. However, I am not sure if Elisp version of `format' can correctly unquote Lisp strings. > (2) RESULTS GROW That's expected for raw output - Org is unable to know the result boundaries in such scenario. > SCHEME - *NOT* OK: > > (1) SUPERFLUOUS QUOTES > (2) DOUBLE BACKSLASHES > (3) RESULTS GROW > > #+BEGIN_SRC scheme :results raw > "\\begin{array}{cc|cc} 1 & 2 & 3 & 4\\end{array}" > #+END_SRC >=20=20=20 > #+RESULTS: > "\\begin{array}{cc|cc} 1 & 2 & 3 & 4\\end{array}" This is technically the actual value returned by scheme, but we indeed do format the returned strings for Lua and Elisp. You can try #+begin_src scheme :results raw output (display "\\begin{array}{cc|cc} 1 & 2 & 3 & 4\\end{array}") #+end_src #+RESULTS: \begin{array}{cc|cc} 1 & 2 & 3 & 4\end{array} > Is escaping and quoting broken for Common Lisp and Scheme, ... > > ... or am I using something incorrectly? It is broken. We should use Lisp/Scheme equivalents of `format' to solve the problem. Something akin `org-babel-lua-wrapper-method'. Patches welcome! --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at