all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-babel-gnuplot-quote-tsv-field does not work properly (quotes); org-plot-quote-tsv-field does though
@ 2014-01-05  8:50 Miguel Ruiz
  2014-01-05 11:46 ` Miguel Ruiz
  0 siblings, 1 reply; 5+ messages in thread
From: Miguel Ruiz @ 2014-01-05  8:50 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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

Hi,

I cannot get temp data file from org-babel-gnuplot with quoted row labels. I have tried org-plot/gnuplot and it provides a correct temp data file but it freezes so it is no useful by now.

My test table:

| Sede      | Max cites | H-index |
|-----------+-----------+---------|
| Chile     |    257.72 |   21.39 |
| Leeds     |    165.77 |   19.68 |
| Sao Paolo |     71.00 |   11.50 | ; without quotes (in temp data file), gnuplot sees 4 columns
| Stockholm |    134.19 |   14.33 |
| Morelia   |    257.56 |   17.67 |


I would appreciate any hint.

TIA,
Miguel Ruiz.

CYGWIN_NT-6.1-WOW64 usuario-PC 1.7.27(0.271/5/3) 2013-12-09 11:57 i686 Cygwin
GNU Emacs (emacs-w32) 24.3.1 (i686-pc-cygwin) of 2013-08-14 on moufang
Org-mode version 8.2.5a (release_8.2.5a @ /home/usuario/org-mode/maint/lisp/)

[-- Attachment #2: Type: text/html, Size: 1247 bytes --]

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

* Re: org-babel-gnuplot-quote-tsv-field does not work properly (quotes); org-plot-quote-tsv-field does though
  2014-01-05  8:50 org-babel-gnuplot-quote-tsv-field does not work properly (quotes); org-plot-quote-tsv-field does though Miguel Ruiz
@ 2014-01-05 11:46 ` Miguel Ruiz
  2014-01-05 11:50   ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Miguel Ruiz @ 2014-01-05 11:46 UTC (permalink / raw)
  To: Miguel Ruiz, emacs-orgmode@gnu.org

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

Is it *this* enough:

diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el
index cc9186b..426077b 100644
--- a/lisp/ob-gnuplot.el
+++ b/lisp/ob-gnuplot.el
@@ -253,7 +253,7 @@ then create one.  Return the initialized session.  The current
        (org-babel-gnuplot-quote-timestamp-field s)
       (if (zerop (length s))
          (or *org-babel-gnuplot-missing* s)
-       (if (string-match "[ \"]" "?")
+       (if (string-match "[ \"]" s)
            (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"")
                    "\"")
          s)))))


It works for me.




El Domingo 5 de enero de 2014 9:50, Miguel Ruiz <rbenit68@yahoo.es> escribió:
 
Hi,

I cannot get temp data file from org-babel-gnuplot with quoted row labels. I have tried org-plot/gnuplot and it provides a correct temp data file but it freezes so it is no useful by now.

My test table:

| Sede      | Max cites | H-index |
|-----------+-----------+---------|
| Chile     |    257.72 |   21.39 |
| Leeds     |    165.77 |   19.68 |
| Sao Paolo |     71.00 |   11.50 | ; without quotes (in temp data file), gnuplot sees 4 columns
| Stockholm |    134.19 |   14.33 |
| Morelia   |    257.56 |   17.67 |


I would appreciate any
 hint.

TIA,
Miguel Ruiz.

CYGWIN_NT-6.1-WOW64 usuario-PC 1.7.27(0.271/5/3) 2013-12-09 11:57 i686 Cygwin
GNU Emacs (emacs-w32) 24.3.1 (i686-pc-cygwin) of 2013-08-14 on moufang
Org-mode version 8.2.5a (release_8.2.5a @ /home/usuario/org-mode/maint/lisp/)

[-- Attachment #2: Type: text/html, Size: 2946 bytes --]

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

* Re: org-babel-gnuplot-quote-tsv-field does not work properly (quotes); org-plot-quote-tsv-field does though
  2014-01-05 11:46 ` Miguel Ruiz
@ 2014-01-05 11:50   ` Bastien
  2014-01-05 12:27     ` Miguel Ruiz
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2014-01-05 11:50 UTC (permalink / raw)
  To: Miguel Ruiz; +Cc: emacs-orgmode@gnu.org

Hi Miguel,

Miguel Ruiz <rbenit68@yahoo.es> writes:

> Is it *this* enough:
>
> diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el
> index cc9186b..426077b 100644
> --- a/lisp/ob-gnuplot.el
> +++ b/lisp/ob-gnuplot.el

Thanks for the fix -- could you format it with git format-patch
and add a proper ChangeLog?

See http://orgmode.org/worg/org-contribute.html#sec-4-2 for
details on how to submit a patch.  Please add TINYCHANGE at
the end of your commit message if you didn't sign the FSF
papers.

Thanks!

-- 
 Bastien

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

* Re: org-babel-gnuplot-quote-tsv-field does not work properly (quotes); org-plot-quote-tsv-field does though
  2014-01-05 11:50   ` Bastien
@ 2014-01-05 12:27     ` Miguel Ruiz
  2014-01-05 13:15       ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Miguel Ruiz @ 2014-01-05 12:27 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 720 bytes --]

Thank you, Bastien. I'd prefer some of you writes the changelog entry; the patch is attached.





El Domingo 5 de enero de 2014 12:51, Bastien <bzg@gnu.org> escribió:
 
Hi Miguel,

Miguel Ruiz <rbenit68@yahoo.es> writes:

> Is it *this* enough:
>
> diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el
> index cc9186b..426077b 100644
> --- a/lisp/ob-gnuplot.el
> +++ b/lisp/ob-gnuplot.el

Thanks for the fix -- could you format it with git format-patch
and add a proper ChangeLog?

See http://orgmode.org/worg/org-contribute.html#sec-4-2 for
details on how to submit a patch.  Please add TINYCHANGE at
the end of your commit message if you didn't sign the FSF
papers.

Thanks!

-- 
Bastien

[-- Attachment #1.2: Type: text/html, Size: 1940 bytes --]

[-- Attachment #2: 0001-Fix-typo-that-stopped-necessary-quoted-strings-in-gn.patch --]
[-- Type: application/octet-stream, Size: 847 bytes --]

From 1d00a79dbc473e35abc60aeaca8e0cfa7b59fdf0 Mon Sep 17 00:00:00 2001
From: "U-usuario-PC\\usuario" <rbenit68@yahoo.es>
Date: Sun, 5 Jan 2014 13:18:16 +0100
Subject: [PATCH] Fix typo that stopped necessary quoted strings in gnuplot
 temp data file from tables

---
 lisp/ob-gnuplot.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el
index cc9186b..426077b 100644
--- a/lisp/ob-gnuplot.el
+++ b/lisp/ob-gnuplot.el
@@ -253,7 +253,7 @@ then create one.  Return the initialized session.  The current
 	(org-babel-gnuplot-quote-timestamp-field s)
       (if (zerop (length s))
 	  (or *org-babel-gnuplot-missing* s)
-	(if (string-match "[ \"]" "?")
+	(if (string-match "[ \"]" s)
 	    (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"")
 		    "\"")
 	  s)))))
-- 
1.7.9


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

* Re: org-babel-gnuplot-quote-tsv-field does not work properly (quotes); org-plot-quote-tsv-field does though
  2014-01-05 12:27     ` Miguel Ruiz
@ 2014-01-05 13:15       ` Bastien
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2014-01-05 13:15 UTC (permalink / raw)
  To: Miguel Ruiz; +Cc: emacs-orgmode@gnu.org

Miguel Ruiz <rbenit68@yahoo.es> writes:

> Thank you, Bastien. I'd prefer some of you writes the changelog
> entry; the patch is attached.

Applied, thanks.

-- 
 Bastien

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

end of thread, other threads:[~2014-01-05 13:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-05  8:50 org-babel-gnuplot-quote-tsv-field does not work properly (quotes); org-plot-quote-tsv-field does though Miguel Ruiz
2014-01-05 11:46 ` Miguel Ruiz
2014-01-05 11:50   ` Bastien
2014-01-05 12:27     ` Miguel Ruiz
2014-01-05 13:15       ` Bastien

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.