all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Francesco Potortì" <pot@gnu.org>
To: 21162@debbugs.gnu.org, Kurt.Hornik@wu-wien.ac.at
Cc: "John W. Eaton" <jwe@degreesofgray.org>,
	Mike Miller <mtmiller@octave.org>
Subject: bug#21162: adapting octave-inf.el to Octave 4
Date: Thu, 30 Jul 2015 19:22:45 +0200	[thread overview]
Message-ID: <E1ZKrXZ-0007Io-DV@tucano.isti.cnr.it> (raw)

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





             reply	other threads:[~2015-07-30 17:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 17:22 Francesco Potortì [this message]
2015-07-31  6:47 ` bug#21162: adapting octave-inf.el to Octave 4 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1ZKrXZ-0007Io-DV@tucano.isti.cnr.it \
    --to=pot@gnu.org \
    --cc=21162@debbugs.gnu.org \
    --cc=Kurt.Hornik@wu-wien.ac.at \
    --cc=jwe@degreesofgray.org \
    --cc=mtmiller@octave.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.