help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [h-e-w] Plot in Octave under Gnu Emacs on Windows XP doesn't work


From: Lars.Ericson
Subject: RE: [h-e-w] Plot in Octave under Gnu Emacs on Windows XP doesn't work
Date: Mon, 22 Oct 2012 14:35:52 -0400

Actually sorry, it only works if you run octave under with --interactive 
--line-editing ESC-X shell, even with args corrected in run-octave mode, I 
don't get plots, even if the switches are set correctly.  I have verified with 
argv() that both shell and run-octave versions of octave have same arguments:

octave.exe> argv()
argv()
ans = 
{
  [1,1] = --interactive
  [2,1] = --line-editing
}

So it is something about run-octave versus shell windows that is different.

Very confusing!!!


-----Original Message-----
From: Ericson, Lars 
Sent: Monday, October 22, 2012 2:27 PM
To: 'Eli Zaretskii'; 'Michael Goffioul'
Cc: address@hidden; address@hidden
Subject: RE: [h-e-w] Plot in Octave under Gnu Emacs on Windows XP doesn't work

Hi Eli and Michael,

I can get plot window to show if I do ESC-X Shell and then run Octave in the 
shell with --line-editing and --interactive (note Octave 3.6.2 is confused by 
--i alone).  Note with Qt graphics, the plot window is unhappy, it shows the 
expected  graph and then goes into a "not responding" state where it doesn't 
accept mouse input.  Killing the plot window kills Octave in the shell.   If I 
restart Octave in the Shell window and switch graphics package to gnuplot with 
graphics_toolkit('gnuplot'), this problem goes away, so it is a feature of Qt 
graphics, not Emacs or Octave.

If I want to fix "run-octave", it does not work to add the following to my 
~/.emacs file:

        (setq inferior-octave-startup-args '("--line-editing" "-i"))

This is because the run-octave command has "--no-line-editing" buried in the 
code, so what you get is this set of arguments inside of octave:

octave.exe> argv()
ans =
{
  [1,1] = -i
  [2,1] = --no-line-editing
  [3,1] = --line-editing
  [4,1] = -i
}

I then tried changing the code in emacs-24.2/lisp/progmodes/octave-inf.el on 
line 187 from 

               (append (list "-i" "--no-line-editing")

to 

               (append (list "--interactive" "--line-editing")

When I do this in a newly started Emacs, I get error "No such directory via 
CDPATH environment variable" and no Octave.  However if I do "run-octave" again 
in the same Emacs, the *Interior Octave* window comes up, and plots work.   If 
I revert to "--no-line-editing ", the problem goes away.  So that is a mystery 
but at least now I can get my plots.

So the remaining questions are:

1. Why does changing "no-line-editing" to "line-editing" cause me to get "No 
such directory via CDPATH" error?  There is a thread for this:  
https://mailman.cae.wisc.edu/pipermail/help-octave/2005-August/017741.html

2. Why does QT freeze up and gnuplot doesn't?

Thanks,
Lars Ericson
address@hidden

-----Original Message-----
From: Eli Zaretskii [mailto:address@hidden
Sent: Monday, October 22, 2012 12:56 PM
To: Ericson, Lars
Cc: address@hidden
Subject: Re: [h-e-w] Plot in Octave under Gnu Emacs on Windows XP doesn't work

> From: Lars Ericson <address@hidden>
> Date: Mon, 22 Oct 2012 13:43:09 +0000 (UTC)
> 
> The pipes idea is confirmed by Michael Goffioul on address@hidden  He says:
> 
> Yes, that's most probably the problem. FLTK and Qt backend uses the 
> readline event loop to run events and/or interact with the graphics 
> backend. If readline is not used, like when running octave over pipes, 
> those graphics backend won't work. You may force readline usage with 
> the flags: --line- editing -i

So did those switches solve the problem?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]