* Greek symbol rendering problem in gnuplot
@ 2019-04-29 2:48 Lawrence Bottorff
2019-04-29 5:33 ` Fraga, Eric
0 siblings, 1 reply; 9+ messages in thread
From: Lawrence Bottorff @ 2019-04-29 2:48 UTC (permalink / raw
To: emacs-orgmode Mailinglist
[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]
Maybe take a look at this
<https://stackoverflow.com/questions/55887260/greek-letter-pi-in-gnuplot-not-rendering>
issue,
which describes a tortured trek to find a way to get Gnuplot to properly
render Π (pi) in an output graphic. Apparently, the gnuplot package is from
2014 and doesn't handle Greek symbols. Why it will use latest-greatest
gnuplot 5.2.6 and won't render Greek symbols is mysterious. Also, when
executing an org-mode babel gnuplot block, it reports in the minibuffer
that it is using Gnuplot 3.7. However, C-c C-c in the block does start up a
Gnuplot REPL in Emacs, and output does happen -- just with garbled Greek
letters. Odder is when I put the code in a separate file with the mode
running, I can get it to render pi correctly with gnuplot-run-file -- but
not gnuplot-run-buffer. The latter is garbled, the former good. BTW, a
Gnuplot session started at the command line works with Greek symbols just
fine.
So I uninstalled gnuplot and installed newer gnuplot-mode (last updated
2017). Testing just a stand-alone file with the code with
gnuplot-run-buffer produces good results; however, no REPL in Emacs is
started and the gnuplot codeblock in an org file fails. C-c C-c produces
executing Gnuplot code block...
org-babel-execute:gnuplot: Cannot open load file: No such file or
directory, gnuplot
obviously Gnuplot in org-mode babel is meant to run with the gnuplot
package and not the newer gnuplot-mode package. But now I'm stuck without a
way to render Greek letters in a Gnuplot graphic. Something about the
gnuplot package doesn't do Greek symbols and something about gnuplot-mode
doesn't do org-mode babel gnuplot. Please advise.
LB
[-- Attachment #2: Type: text/html, Size: 1892 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Greek symbol rendering problem in gnuplot
2019-04-29 2:48 Greek symbol rendering problem in gnuplot Lawrence Bottorff
@ 2019-04-29 5:33 ` Fraga, Eric
2019-04-29 14:13 ` Lawrence Bottorff
0 siblings, 1 reply; 9+ messages in thread
From: Fraga, Eric @ 2019-04-29 5:33 UTC (permalink / raw
To: Lawrence Bottorff; +Cc: emacs-orgmode Mailinglist
Emacs (and hence org) will use whichever gnuplot is found in your $PATH,
assuming you're on Linux (you did not specify). You also, for babel,
need the gnuplot mode. I don't understand why you removed the gnuplot
package as it does not have the emacs mode; that is provided by the
separate gnuplot-mode package.
I don't use greek letters so cannot comment on that aspect.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2.3-327-g3375f0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Greek symbol rendering problem in gnuplot
2019-04-29 5:33 ` Fraga, Eric
@ 2019-04-29 14:13 ` Lawrence Bottorff
2019-04-30 6:09 ` Fraga, Eric
0 siblings, 1 reply; 9+ messages in thread
From: Lawrence Bottorff @ 2019-04-29 14:13 UTC (permalink / raw
To: Fraga, Eric; +Cc: emacs-orgmode Mailinglist
[-- Attachment #1: Type: text/plain, Size: 2756 bytes --]
Yes, Ubuntu 19.04. Latest-greatest everything else pertinent as well. Here
is are my subscriptions
(setq package-archives '(("ELPA" . "http://tromey.com/elpa/")
("gnu" . "http://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")))
And so I discover these two when I do list-packages:
gnuplot <https://github.com/bruceravel/gnuplot-mode>
20141231.2137 available melpa drive gnuplot from within emacs
and then this:
gnuplot-mode <https://github.com/mkmcc/gnuplot-mode> 20171013.1616
installed Major mode for editing gnuplot scripts
the former I uninstalled, the latter, as you see, I installed, simply going
on the theory that a later something is more up to date. The babel
languages page lists this:
Gnuplot gnuplot ob-doc-gnuplot gnuplot, gnuplot-mode
which no doubt means gnuplot the actual program, then gnuplot-mode the
Emacs package. So I'm saying the second list-packages offering,
gnuplot-mode- 20171013.1616, is working only as a stand-alone mode and not
working with org-mode babel (It can't find gnuplot when an org gnuplot
block is run.), while the first one, just plain simple
gnuplot-20141231.2137 works in org-mode babel, but gives the long-ago
solved problem of greek symbol display garbling when run in babel code
blocks. (See the links to the github pages.) The confusion is which of the
Emacs packages to use -- both having problems. Both modes seem to know
where gnuplot is (my $PATH has /usr/bin/ and my gnuplot is
/usr/bin/gnuplot), again, they both work fine as stand-alones with gnuplot
code files, but, as I'm saying, gnuplot-mode-20171013.1616 doesn't work
with org-mode.
Having glanced at the older gnuplot-20141231.2137 mode's code, it seems to
guess version 3.7 if it can't establish which version of gnuplot the user
is running. Odd since it does start up an Emacs gnuplot REPL session --
that readily identifies itself as 5.2.6. So I'm guessing
this gnuplot-mode-20171013.1616 is not the intended mode after all, rather,
gnuplot-20141231.2137. Since there have been more than one stackoverflow
efforts on this issue, I thought it worthy of org-mode's attention -- heavy
users of greek letters or no.
On Mon, Apr 29, 2019 at 12:33 AM Fraga, Eric <e.fraga@ucl.ac.uk> wrote:
> Emacs (and hence org) will use whichever gnuplot is found in your $PATH,
> assuming you're on Linux (you did not specify). You also, for babel,
> need the gnuplot mode. I don't understand why you removed the gnuplot
> package as it does not have the emacs mode; that is provided by the
> separate gnuplot-mode package.
>
> I don't use greek letters so cannot comment on that aspect.
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.3-327-g3375f0
>
[-- Attachment #2: Type: text/html, Size: 4118 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Greek symbol rendering problem in gnuplot
2019-04-29 14:13 ` Lawrence Bottorff
@ 2019-04-30 6:09 ` Fraga, Eric
2019-04-30 15:58 ` Lawrence Bottorff
2019-04-30 16:01 ` Lawrence Bottorff
0 siblings, 2 replies; 9+ messages in thread
From: Fraga, Eric @ 2019-04-30 6:09 UTC (permalink / raw
To: Lawrence Bottorff; +Cc: emacs-orgmode Mailinglist
Thanks for the long explanation. I am using the 2014 version of
gnuplot-mode and gnuplot 5.2.
gnuplot-mode has a customizable variable, gnuplot-program, which
specifies which command to execute to start gnuplot. The default value
for this variable, at least in the 2014 version, is simply "gnuplot" so
it will pick up the default gnuplot on Linux (if there is more than one
version installed, I imagine that /etc/alternatives will be used to
identify the default).
If you think the wrong gnuplot is being picked up, maybe customize this
variable? What do you get if you simply invoke "M-x run-gnuplot"?
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2.3-327-g3375f0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Greek symbol rendering problem in gnuplot
2019-04-30 6:09 ` Fraga, Eric
@ 2019-04-30 15:58 ` Lawrence Bottorff
2019-04-30 17:10 ` Fraga, Eric
2019-04-30 16:01 ` Lawrence Bottorff
1 sibling, 1 reply; 9+ messages in thread
From: Lawrence Bottorff @ 2019-04-30 15:58 UTC (permalink / raw
To: emacs-orgmode Mailinglist
[-- Attachment #1: Type: text/plain, Size: 2583 bytes --]
The 2014 "gnuplot-mode" has the problem of not rendering the greek symbols
when asked to by babel, hence, my switch to "gnuplot-mode" 2017.
C-h v gnuplot-program reports
gnuplot-program’s value is "/usr/bin/gnuplot"
This variable may be risky if used as a file-local variable.
Documentation:
Not documented as a variable.
. . . which is correct, and, yes, as a stand-alone mode it works, i.e., it
finds the gnuplot executable and renders the greek letters fine. However,
when I attempt it inside a babel gnuplot code block it gives the error of
not finding the executable. This is behavior I've seen when babel doesn't
see a necessary mode that it requires to work with. This is my
supposition/guess. As I recall, when I first tried a babel gnuplot block,
it made this same complaint. Then I realized I hadn't installed the gnuplot
mode. The problem went away when I installed gnuplot-mode 2014. So again,
my educated guess is that babel doesn't see or want to interact with
gnuplot-mode 2017, rather, it want to see gnuplot-mode 2014.
I feel like I'm beating this to death. I can simply hand-edit in the
diagrams with greek letters done correctly into my org file, i.e., just not
do babel gnuplot. Again, gnuplot-mode 2014 in stand-alone will do a "plot
file" of the code correctly, but not a "plot buffer" strangely enough. (I'm
guessing babel gnuplot wants to do a "plot buffer".) OTOH, this is a bug,
i.e., no sane work-around, and we, an advanced species, shouldn't negotiate
with or accommodate insects.
So what is the process of keeping babel up-to-date AFA modes interacting
with their executables is concerned? Who does this? I can look at the
gnuplot-modes and see if I can find anything. But I'm a total noob with
big-time Elisp code.
On Tue, Apr 30, 2019 at 1:09 AM Fraga, Eric <e.fraga@ucl.ac.uk> wrote:
> Thanks for the long explanation. I am using the 2014 version of
> gnuplot-mode and gnuplot 5.2.
>
> gnuplot-mode has a customizable variable, gnuplot-program, which
> specifies which command to execute to start gnuplot. The default value
> for this variable, at least in the 2014 version, is simply "gnuplot" so
> it will pick up the default gnuplot on Linux (if there is more than one
> version installed, I imagine that /etc/alternatives will be used to
> identify the default).
>
> If you think the wrong gnuplot is being picked up, maybe customize this
> variable? What do you get if you simply invoke "M-x run-gnuplot"?
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.3-327-g3375f0
>
[-- Attachment #2: Type: text/html, Size: 3156 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Greek symbol rendering problem in gnuplot
2019-04-30 6:09 ` Fraga, Eric
2019-04-30 15:58 ` Lawrence Bottorff
@ 2019-04-30 16:01 ` Lawrence Bottorff
1 sibling, 0 replies; 9+ messages in thread
From: Lawrence Bottorff @ 2019-04-30 16:01 UTC (permalink / raw
To: Fraga, Eric; +Cc: emacs-orgmode Mailinglist
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
I've looked at the gnuplot mode 2014 github site
<https://github.com/bruceravel/gnuplot-mode/issues> -- and no issues seem
to have been addressed by the owner in recent years. Will try to debug
myself.
On Tue, Apr 30, 2019 at 1:09 AM Fraga, Eric <e.fraga@ucl.ac.uk> wrote:
> Thanks for the long explanation. I am using the 2014 version of
> gnuplot-mode and gnuplot 5.2.
>
> gnuplot-mode has a customizable variable, gnuplot-program, which
> specifies which command to execute to start gnuplot. The default value
> for this variable, at least in the 2014 version, is simply "gnuplot" so
> it will pick up the default gnuplot on Linux (if there is more than one
> version installed, I imagine that /etc/alternatives will be used to
> identify the default).
>
> If you think the wrong gnuplot is being picked up, maybe customize this
> variable? What do you get if you simply invoke "M-x run-gnuplot"?
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.3-327-g3375f0
>
[-- Attachment #2: Type: text/html, Size: 1344 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Greek symbol rendering problem in gnuplot
2019-04-30 15:58 ` Lawrence Bottorff
@ 2019-04-30 17:10 ` Fraga, Eric
2019-05-01 3:41 ` Lawrence Bottorff
0 siblings, 1 reply; 9+ messages in thread
From: Fraga, Eric @ 2019-04-30 17:10 UTC (permalink / raw
To: Lawrence Bottorff; +Cc: emacs-orgmode Mailinglist
For the list: Lawrence and I have followed this through a bit more. The
solution, for those that have a newer version of gnuplot-mode (2017
version instead of the 2014 version), is to set :session to "none".
I would suggest that there is a bug in ob-gnuplot.el. Specifically,
:session is initialized to nil but all the code that checks for session
assumes that it has to be set to "none" to not use a session.
What hasn't been resolved is how to get sessions to work with the more
up-to-date gnuplot-mode.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2.3-327-g3375f0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Greek symbol rendering problem in gnuplot
2019-04-30 17:10 ` Fraga, Eric
@ 2019-05-01 3:41 ` Lawrence Bottorff
2019-05-01 8:06 ` Fraga, Eric
0 siblings, 1 reply; 9+ messages in thread
From: Lawrence Bottorff @ 2019-05-01 3:41 UTC (permalink / raw
To: emacs-orgmode Mailinglist
[-- Attachment #1: Type: text/plain, Size: 1768 bytes --]
As I understand, the more "up-to-date" 2017 version is not as comprehensive
as the 2014 version. I got in contact with Bruce Ravel (2014 author) and he
says he's standing by, but I told him to wait to see what the org-mode side
can do first about the :session issue. So in general I'm supposing that
when a language's REPL session is not started, babel sometimes goes
straight the executable on the system and comes back with results. But then
others specifically need a :session named and started -- or at least start
a session.
I guess I'm being manic about this due to the overall difficulty of
producing graphs and diagrams in general in the STEM world. If you're good,
you can transcribe JIT, say, a math lecture on your laptop with org-mode --
prose and LaTeX formulae. But if you need diagrams you're blown away. . .
I've got a copy of Martin Weissman's *An Illustrated Theory of Numbers *which
utilizes LaTeX Tufte with diagrams in TikZ/PGF. Quite a beautiful book. In
general, it's just too damned hard to produce diagrams relative to prose
and formulae. . . My two farthings. . . .
On Tue, Apr 30, 2019 at 12:10 PM Fraga, Eric <e.fraga@ucl.ac.uk> wrote:
> For the list: Lawrence and I have followed this through a bit more. The
> solution, for those that have a newer version of gnuplot-mode (2017
> version instead of the 2014 version), is to set :session to "none".
>
> I would suggest that there is a bug in ob-gnuplot.el. Specifically,
> :session is initialized to nil but all the code that checks for session
> assumes that it has to be set to "none" to not use a session.
>
> What hasn't been resolved is how to get sessions to work with the more
> up-to-date gnuplot-mode.
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.3-327-g3375f0
>
[-- Attachment #2: Type: text/html, Size: 2226 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Greek symbol rendering problem in gnuplot
2019-05-01 3:41 ` Lawrence Bottorff
@ 2019-05-01 8:06 ` Fraga, Eric
0 siblings, 0 replies; 9+ messages in thread
From: Fraga, Eric @ 2019-05-01 8:06 UTC (permalink / raw
To: Lawrence Bottorff; +Cc: emacs-orgmode Mailinglist
On Tuesday, 30 Apr 2019 at 22:41, Lawrence Bottorff wrote:
> I guess I'm being manic about this due to the overall difficulty of
> producing graphs and diagrams in general in the STEM world. If you're good,
> you can transcribe JIT, say, a math lecture on your laptop with org-mode --
> prose and LaTeX formulae. But if you need diagrams you're blown away. . .
Yes, generating drawings on the fly is challenging. I bought myself a
reMarkable e-paper tablet for this reason. For LaTeX, I use a number of
tools, some of which are quite easy to use. In particular, ditaa and
graphviz come close to allowing real-time input of some types of
drawings. Tikz is better for quality output but not suitable for quick
input.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2.3-327-g3375f0
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-05-01 8:06 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-29 2:48 Greek symbol rendering problem in gnuplot Lawrence Bottorff
2019-04-29 5:33 ` Fraga, Eric
2019-04-29 14:13 ` Lawrence Bottorff
2019-04-30 6:09 ` Fraga, Eric
2019-04-30 15:58 ` Lawrence Bottorff
2019-04-30 17:10 ` Fraga, Eric
2019-05-01 3:41 ` Lawrence Bottorff
2019-05-01 8:06 ` Fraga, Eric
2019-04-30 16:01 ` Lawrence Bottorff
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.