all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#21162: adapting octave-inf.el to Octave 4
@ 2015-07-30 17:22 Francesco Potortì
  2015-07-31  6:47 ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Francesco Potortì @ 2015-07-30 17:22 UTC (permalink / raw)
  To: 21162, Kurt.Hornik; +Cc: John W. Eaton, Mike Miller

The following patch does two things:

1) it removes the --no-line-editing option when calling the Octave
   process, for reasons that I explained in my previous bug report about
   octave-inf.el

2) it adds the --no-gui option when calling Octave if its version is
   different from 3: this is needed because the last (and future,
   probably) Octave versions launch a GUI by default

--- /dev/fd/63	2015-07-30 19:21:16.227231663 +0200
+++ octave-inf.el	2015-07-30 19:13:13.678557317 +0200
@@ -193,12 +193,16 @@
 
 (defun inferior-octave-startup ()
   "Start an inferior Octave process."
-  (let ((proc (comint-exec-1
-	       (substring inferior-octave-buffer 1 -1)
-	       inferior-octave-buffer
-	       inferior-octave-program
-	       (append (list "-i" "--no-line-editing")
-		       inferior-octave-startup-args))))
+  (let* ((octave-version-string (shell-command-to-string
+				 (concat inferior-octave-program " --version")))
+	 (octave-gui (not (string-match "version 3" octave-version-string)))
+	 (proc (comint-exec-1
+		(substring inferior-octave-buffer 1 -1)
+		inferior-octave-buffer
+		inferior-octave-program
+		(append (list "-i")
+			(when octave-gui (list "--no-gui"))
+			inferior-octave-startup-args))))
     (set-process-filter proc 'inferior-octave-output-digest)
     (setq comint-ptyp process-connection-type
 	  inferior-octave-process proc





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

end of thread, other threads:[~2021-06-09  9:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30 17:22 bug#21162: adapting octave-inf.el to Octave 4 Francesco Potortì
2015-07-31  6:47 ` Glenn Morris
2015-07-31  9:26   ` Francesco Potortì
2015-07-31 15:39     ` Glenn Morris
2015-08-06 13:15       ` Francesco Potortì
2021-05-26 22:58     ` bug#21150: 24.5; octave-inf mode does not need --no-line-editing Lars Ingebrigtsen
2021-06-08 13:09       ` bug#21162: " Francesco Potortì
2021-06-09  9:35         ` Lars Ingebrigtsen

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.