From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8AvyNFyJZGNspgAAbAwnHQ (envelope-from ) for ; Fri, 04 Nov 2022 04:39:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ODv9NFyJZGPJNwEA9RJhRA (envelope-from ) for ; Fri, 04 Nov 2022 04:39:08 +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 6BC6A39610 for ; Fri, 4 Nov 2022 04:39:08 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqnX9-0005UI-MZ; Thu, 03 Nov 2022 23:38:19 -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 1oqnX8-0005UA-8Y for emacs-orgmode@gnu.org; Thu, 03 Nov 2022 23:38:18 -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 1oqnX5-0006xx-LH for emacs-orgmode@gnu.org; Thu, 03 Nov 2022 23:38:18 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 2A33B240026 for ; Fri, 4 Nov 2022 04:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667533093; bh=Y/JNfXmUjQwchvJCE8OEpyrOD/GajZWOpOgbhSv5D5E=; h=From:To:Cc:Subject:Date:From; b=ej51tOHlbpTfN3pnPrQRE2KtBIm6jbaehAYg6AGd98HnxvWtTol9PuE7J5Zl5RXOB mbRCXa9CUJZQSzfE4hZlrI2+RBJXvmlK475XceUvfznAAzloA0QwGvOPBBdozx+2nj 9NeLhV0rF2FCxPgE2EUnlVgOhJnqmMZ4Vzv2LeC9UWtAu0JR/wGih3dmF1zaQe3qbd TSZolMXjCbKT6gILXcLf3fAXxXq4jr9k6ygjzH37UfWfCHRyvOyzh4IlIuxN+y2h5Y QkoduEjnynpd50KXj/hWRDiM47qgH/uivFlsmMUk9bUIl4J8vvfY+D+w0wmxbc3WPi VCEjEc/SuQj6w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N3RD064ZFz9rxG; Fri, 4 Nov 2022 04:38:08 +0100 (CET) From: Ihor Radchenko To: Leo Butler Cc: Org Mode Mailing List Subject: Re: [BUG] ob-doc-maxima.org and ob-maxima.el In-Reply-To: <87edujkiq2.fsf@t14.reltub.ca> References: <87edulm9hk.fsf@t14.reltub.ca> <87wn8c7cpn.fsf@localhost> <87edujkiq2.fsf@t14.reltub.ca> Date: Fri, 04 Nov 2022 03:38:48 +0000 Message-ID: <87k04b5qyf.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: -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, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org 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=1667533148; 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=dWH7vh8BfXg9qFfX3sUlbPUQHUoT1Ibu0zFjQfoQq1w=; b=EQwwXCY63I321MWDg21cvx/s+QGQdozlZGFg7SVThOZXOjjL2KgmVg7Lmn9rYBVzW8NC6U cSdMvHW1JRoqN9m5WRlrrOyTwShjGyYpY0NmKa/X1cXeGo86boQSSxlw8PqjnmBJG4QfjO tsnhP6IzfXuERAJBtws7WlYl6AA/y9w+cnGYinYxNcUBR+hgKQgSGql+hrvitp6tnNcnPZ IpzOlqpmsUz67sm6159OWWIyp8kyLU/ng4taLyLTzoM5h9JM6iNd3XJy2xKrzpSUM2H6+I hYdbqTqv1UtAW0Ew73sjxpxw2Junp7kmOeGC9xiA5ytu1J53jS7AaKFJM1GmDA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667533148; a=rsa-sha256; cv=none; b=h/+5v/H/FGvo0AteLlCU2lvDeJU2UtijpbfmdxrfxCRq361BunX7lHi/8Roz9UtSF9CdqE eBz5cb1fgTtCLGhFYS5TrIG4eB6JBezN7aM/CbohH7+jvCaBHH3rsArhI7hnle19qO2Bqu 1i+f6k1aYOn5tCdvu6GmCbCfe/Kjj5wpM/IFmQfAkZGb4UYZfeJZBBIdBgtOCuOAM2IuOc pTp9X/5G5yuCU4vhTB2oFxs6sKZbLceudLVxDeCqmshOSHkVMaLqF5bqh03K3yQ5GiWsaJ QTBcXUschs9O57Teh2IwWyfahJ9PnJb2qZJ2fAwwTO3kuz7wD+vb6z9Y5uMjCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ej51tOHl; dmarc=pass (policy=none) header.from=posteo.net; 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: -3.50 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ej51tOHl; dmarc=pass (policy=none) header.from=posteo.net; 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: 6BC6A39610 X-Spam-Score: -3.50 X-Migadu-Scanner: scn1.migadu.com X-TUID: aALEboEdPLOl Leo Butler writes: >> You basically need to evaluate the code block manually to have it >> present in the original file without a need to evaluate during export. >> >> I do not have maxima on my system. It would be welcome if you evaluate >> the code blocks with missing results manually and submit a patch with. > > Attached. There is no need to wrap the results into example blocks. They will better be as is. Org export will take care about choosing what to export: code, results, or both. >> Using graphics together with file does not make sense. > > Ok. But I am not sure the code agrees with you. In ob-core.el, > `org-babel-graphical-output-file' is defined as: Let's discuss it in a separate thread. I will need to study the code a bit more to understand what we promise in the manual vs. actual state of the code. > #+name: 3d-maxima > #+header: :file images/maxima-3d.png > -#+header: :results graphics > #+header: :exports results > +#+header: :results file > #+begin_src maxima > programmode: false; > plot3d(atan(-x^2+y^3/4),[x,-4,4],[y,-4,4],[grid,50,50],[gnuplot_pm3d,true]); > #+end_src > > -#+results: 3d-maxima > +Which produces the code: > + > +#+begin_example > +,#+RESULTS: 3d-maxima > [[file:images/maxima-3d.png]] > +#+end_example > + > +and the image: > + > +#+RESULTS: 3d-maxima > +[[https://orgmode.org/worg/org-contrib/babel/languages/images/maxima-3d.png]] > + I am a bit confused here. Did you hand-craft the results? > -#+NAME: solve-maxima > +#+NAME: tex-maxima > #+HEADER: :exports results > #+BEGIN_SRC maxima :results raw > tex(exp(-x)/x); > #+END_SRC > > +Which produces the code: > +#+begin_example > +,#+RESULTS: tex-maxima > +$${{e^ {- x }}\over{x}}$$ > +#+end_example > +that is rendered as: > +#+RESULTS: tex-maxima > +$${{e^ {- x }}\over{x}}$$ Please make #+RESULTS a separate paragraph. It may otherwise not be correctly recognized. > --- a/lisp/ob-maxima.el > +++ b/lisp/ob-maxima.el > @@ -77,6 +77,9 @@ > "Execute a block of Maxima entries with org-babel. > This function is called by `org-babel-execute-src-block'." > (message "Executing Maxima source code block") > + ;; Make `:results file' imply `:results graphics file' > + (when (member "file" (assq :result-params params)) > + (push "graphics" (alist-get :result-params params))) > (let ((result-params (split-string (or (cdr (assq :results params)) ""))) > (result > (let* ((cmdline (or (cdr (assq :cmdline params)) "")) Let's move the ob-maxima changes and discussion about graphics to a separate thread. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at