[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 23d8d59 1/9: ob-gnuplot: Use org backend when assig
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 23d8d59 1/9: ob-gnuplot: Use org backend when assigning table to variable |
Date: |
Wed, 15 Dec 2021 23:57:28 -0500 (EST) |
branch: externals/org
commit 23d8d59df80a25f36dc35aa94b397ce2b0a75ae0
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
ob-gnuplot: Use org backend when assigning table to variable
* lisp/ob-gnuplot.el (org-babel-gnuplot-table-to-data): Switch to 'org
backend when exporting table data to plain text table. ascii backend
incorrectly handles quote transcoders that change the column width and
sometimes throws an error. (ascii backend simply ignores transcoded
table cells and calculates width based on the initial cell text).
---
lisp/ob-gnuplot.el | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el
index 8c4a595..b72126a 100644
--- a/lisp/ob-gnuplot.el
+++ b/lisp/ob-gnuplot.el
@@ -287,11 +287,21 @@ Pass PARAMS through to `orgtbl-to-generic' when exporting
TABLE."
(with-temp-file data-file
(insert (let ((org-babel-gnuplot-timestamp-fmt
(or (plist-get params :timefmt) "%Y-%m-%d-%H:%M:%S")))
- (orgtbl-to-generic
- table
- (org-combine-plists
- '(:sep "\t" :fmt org-babel-gnuplot-quote-tsv-field :raw t
:backend ascii)
- params)))))
+ (replace-regexp-in-string
+ ;; org export backend adds "|" at the beginning/end of
+ ;; the table lines. Strip those.
+ "^|\\(.+\\)|$"
+ "\\1"
+ (orgtbl-to-generic
+ table
+ (org-combine-plists
+ '( :sep "\t" :fmt org-babel-gnuplot-quote-tsv-field
+ ;; Two setting below are needed to make :fmt work.
+ :raw t
+ ;; Use `org', not `ascii' because `ascii' may
+ ;; sometimes mishandle quoted strings.
+ :backend org)
+ params))))))
data-file)
(provide 'ob-gnuplot)
- [elpa] externals/org updated (8908fba -> f0c474e), ELPA Syncer, 2021/12/15
- [elpa] externals/org 5840e4d 6/9: org-element-cache Do not make headline non-robust after changes at :end, ELPA Syncer, 2021/12/15
- [elpa] externals/org f0c474e 9/9: test-org-element: Add new tests for org-element-cache, ELPA Syncer, 2021/12/15
- [elpa] externals/org 4bad221 8/9: test-org-element: Add new tests, ELPA Syncer, 2021/12/15
- [elpa] externals/org cfe4b17 2/9: org-element-cache: Optimise changed property drawer detection, ELPA Syncer, 2021/12/15
- [elpa] externals/org 6339c62 4/9: org-element-cache: Do not consider BEGIN lines of elements sensitive, ELPA Syncer, 2021/12/15
- [elpa] externals/org 6998536 5/9: org-element-cache: Consider non-PROPERTIES drawers robust, ELPA Syncer, 2021/12/15
- [elpa] externals/org fd93ad6 3/9: org-element-cache: Do not treat inserting newline at :begin sensitive, ELPA Syncer, 2021/12/15
- [elpa] externals/org 23d8d59 1/9: ob-gnuplot: Use org backend when assigning table to variable,
ELPA Syncer <=
- [elpa] externals/org 003968f 7/9: test-org-element: Rename cache-bugs test to cache-table, ELPA Syncer, 2021/12/15