* Patch: strip (unneeded) quotes from singular value results
@ 2019-09-07 18:26 Mike Ivanov
2019-09-16 16:39 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Mike Ivanov @ 2019-09-07 18:26 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
Hi there,
Here's a TINYCHANGE patch that fixes an issue in ob-lisp.el.
Before:
#+BEGIN_SRC lisp :results file
"plot.png"
#+END_SRC
#+RESULTS:
[[file:"plot.png"]] <-- which is wrong
After:
#+BEGIN_SRC lisp :results file
"plot.png"
#+END_SRC
#+RESULTS:
[[file:plot.png]]
Mike
[-- Attachment #2: 0001-ob-lisp.el-Strip-quotes-from-result-value.patch --]
[-- Type: text/x-patch, Size: 1292 bytes --]
From 414af442fed1ef1b94613638330071cef4250645 Mon Sep 17 00:00:00 2001
From: Mike Ivanov <mike@daatsys.com>
Date: Sat, 7 Sep 2019 11:03:46 -0700
Subject: [PATCH] ob-lisp.el: Strip quotes from result value
* lisp/ob-lisp.el (org-babel-execute:lisp): Make sure that when a
singular string value is returned, it has no quotation marks around
it.
Before this change, the code below would produce an incorrect result:
#+BEGIN_SRC lisp :results file
"plot.png"
#+END_SRC
#+RESULTS:
[[file:"plot.png"]]
After the change:
#+BEGIN_SRC lisp :results file
"plot.png"
#+END_SRC
#+RESULTS:
[[file:plot.png]]
TINYCHANGE
---
lisp/ob-lisp.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/ob-lisp.el b/lisp/ob-lisp.el
index e717fc34e..0afb8c053 100644
--- a/lisp/ob-lisp.el
+++ b/lisp/ob-lisp.el
@@ -107,7 +107,7 @@ a property list containing the parameters of the block."
(point-min) (point-max)))))
(cdr (assq :package params)))))))
(org-babel-result-cond (cdr (assq :result-params params))
- result
+ (org-babel-strip-quotes result)
(condition-case nil
(read (org-babel-lisp-vector-to-list result))
(error result))))
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Patch: strip (unneeded) quotes from singular value results
2019-09-07 18:26 Patch: strip (unneeded) quotes from singular value results Mike Ivanov
@ 2019-09-16 16:39 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2019-09-16 16:39 UTC (permalink / raw)
To: Mike Ivanov; +Cc: emacs-orgmode
Hello,
Mike Ivanov <mike@daatsys.com> writes:
> lisp/ob-lisp.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/ob-lisp.el b/lisp/ob-lisp.el
> index e717fc34e..0afb8c053 100644
> --- a/lisp/ob-lisp.el
> +++ b/lisp/ob-lisp.el
> @@ -107,7 +107,7 @@ a property list containing the parameters of the block."
> (point-min) (point-max)))))
> (cdr (assq :package params)))))))
> (org-babel-result-cond (cdr (assq :result-params params))
> - result
> + (org-babel-strip-quotes result)
Applied, after changing `org-babel-strip-quotes' to `org-strip-quotes'.
Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-16 16:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-07 18:26 Patch: strip (unneeded) quotes from singular value results Mike Ivanov
2019-09-16 16:39 ` Nicolas Goaziou
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).