From: Neil Jerram <neiljerram@gmail.com>
To: oldk1331 <oldk1331@gmail.com>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] ob-scheme: Handle :epilogue params
Date: Wed, 18 Dec 2019 12:46:43 +0000 [thread overview]
Message-ID: <CAKuG=vuhGz_B352o7uFL4Ko=v5YcFxi837fxQ9HEXTZfUSMsdQ@mail.gmail.com> (raw)
In-Reply-To: <e8917a9f-31ec-e1d9-9b75-43d1cc02441c@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1539 bytes --]
On Wed, 18 Dec 2019, 09:25 oldk1331, <oldk1331@gmail.com> wrote:
> Hi all,
>
> This is a simple change that adds support for :epilogue in ob-scheme.
>
> Best wishes,
> Qian
>
> ==========
>
> * lisp/ob-scheme.el (org-babel-expand-body:scheme): Add :epilogue
> param support.
>
> TINYCHANGE
> ---
> lisp/ob-scheme.el | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/lisp/ob-scheme.el b/lisp/ob-scheme.el
> index 21d9fad2b..ee0d93c13 100644
> --- a/lisp/ob-scheme.el
> +++ b/lisp/ob-scheme.el
> @@ -71,7 +71,8 @@
> (defun org-babel-expand-body:scheme (body params)
> "Expand BODY according to PARAMS, return the expanded body."
> (let ((vars (org-babel--get-vars params))
> - (prepends (cdr (assq :prologue params))))
> + (prepends (cdr (assq :prologue params)))
> + (postpends (cdr (assq :epilogue params))))
> (concat (and prepends (concat prepends "\n"))
> (if (null vars) body
> (format "(let (%s)\n%s\n)"
> @@ -80,7 +81,8 @@
> (format "%S" (print `(,(car var) ',(cdr var)))))
> vars
> "\n ")
> - body)))))
> + body))
> + (and postpends (concat "\n" postpends)))))
>
>
> (defvar org-babel-scheme-repl-map (make-hash-table :test #'equal)
> --
> 2.24.0
>
LGTM as another ob-scheme user. I don't think Scheme code should need the
"\n", but it's consistent with the existing handling for prologue.
Best wishes,
Neil
[-- Attachment #2: Type: text/html, Size: 2451 bytes --]
next prev parent reply other threads:[~2019-12-18 12:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 9:08 [PATCH] ob-scheme: Handle :epilogue params oldk1331
2019-12-18 12:46 ` Neil Jerram [this message]
2020-02-03 19:26 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKuG=vuhGz_B352o7uFL4Ko=v5YcFxi837fxQ9HEXTZfUSMsdQ@mail.gmail.com' \
--to=neiljerram@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=oldk1331@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).