emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-plot.el bugfix/patch
@ 2017-09-28 21:53 Joe Bloggs
  2017-09-30  7:46 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Bloggs @ 2017-09-28 21:53 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

The grid examples in org-plot.el don't work for me
because the org-plot sets datafile separator to "\t",
so gnuplot can't read the data file properly.
Leaving datafile separator at its default value
(whitespace) fixes the problem.


Regards,

Joe


-- 
 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-set-datafile-separator-to-default-whitespace-value.patch --]
[-- Type: text/x-diff, Size: 1203 bytes --]

From fafb16f2409a049861fbdd5be8ca95304da01359 Mon Sep 17 00:00:00 2001
From: Joe Bloggs <vapniks@yahoo.com>
Date: Thu, 28 Sep 2017 22:30:31 +0100
Subject: [PATCH] set datafile separator to default (whitespace) value

* lisp/org-plot.el (org-plot/gnuplot-script): Set datafile separator
  to default (whitespace) value instead of "\t" so that it works with
  grid example.

Using "\t" for datafile separator doesn't work with the grid example
in org-plot.org. Using the default whitespace value works.

TINYCHANGE
---
 lisp/org-plot.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index a8028324b..2818b88df 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -219,7 +219,7 @@ manner suitable for prepending to a user-specified script."
     (dolist (el sets) (funcall ats (format "set %s" el)))      ; set
     ;; Unless specified otherwise, values are TAB separated.
     (unless (string-match-p "^set datafile separator" script)
-      (funcall ats "set datafile separator \"\\t\""))
+      (funcall ats "set datafile separator"))
     (when x-labels			; x labels (xtics)
       (funcall ats
 	       (format "set xtics (%s)"
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: org-plot.el bugfix/patch
  2017-09-28 21:53 org-plot.el bugfix/patch Joe Bloggs
@ 2017-09-30  7:46 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-09-30  7:46 UTC (permalink / raw)
  To: Joe Bloggs; +Cc: emacs-orgmode

Hello,

"Joe Bloggs" <vapniks@yahoo.com> writes:

> The grid examples in org-plot.el

I assume you mean grid examples in "org-plot.org" from Worg?

> don't work for me
> because the org-plot sets datafile separator to "\t",
> so gnuplot can't read the data file properly.
> Leaving datafile separator at its default value
> (whitespace) fixes the problem.

Why not fixing Worg file instead?

>      ;; Unless specified otherwise, values are TAB separated.
>      (unless (string-match-p "^set datafile separator" script)
> -      (funcall ats "set datafile separator \"\\t\""))
> +      (funcall ats "set datafile separator"))

This seems to contradict the comment above, hence my question about
where the fix should happen.

WDYT?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-30  7:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-28 21:53 org-plot.el bugfix/patch Joe Bloggs
2017-09-30  7:46 ` 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).