gimpmode icon indicating copy to clipboard operation
gimpmode copied to clipboard

Floats lead to error in REPL (gimp-cl-connect)

Open thorwil opened this issue 9 years ago • 3 comments

I started GIMP, the script-fu server, connected via gimp-cl-connect. (- 0.5 0.1) in GIMP's Script-Fu console evaluates to 0,4.0. Odd enough. But in gimp-mode's REPL: Error: (/home/thorwil/.gimp-2.8/emacs/emacs-input.scm : 2) eval: unbound variable: 0,5.0.

I came across this issue, because file-jpeg-save has a few floating point arguments.

thorwil avatar Jan 16 '17 20:01 thorwil

Odd stuff this is. Apparently GIMP outputs floats in a way GIMP cannot read them back.

That and that the gimp-cl-connect construction works through intermediate files with written and evaluated forms (which I do not grasp myself so well anymore - it's been years since I looked at the code) leads to the error in Client Mode.

With the inferior mode (GIMP as subprocess) the output is the same as in the Script-Fu console itself.

I guess it'd be better to dig into GIMP's internals than patch this odd output in gimp-mode.el.

pft avatar Feb 06 '17 20:02 pft

As I understand zilch of C, after diving in a bit I decided it'd be better to create an issue at the right place:

https://bugzilla.gnome.org/show_bug.cgi?id=778308

pft avatar Feb 07 '17 20:02 pft

The referenced issue has moved to https://gitlab.gnome.org/GNOME/gimp/-/issues/1049 .

Since it is a locale issue (which it shouldn't be) you may circumvent the issue by running the GIMP in a locale that uses a period as a decimal point separator instead of a comma.

E.g.

$> LC_NUMERIC=en_US.UTF-8
$> gimp

pft avatar Feb 03 '22 10:02 pft