GNU bug report logs - #21163
adapting octave-inf.el to Octave 4

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Francesco Potortì <pot@HIDDEN>; merged with #21150, #21162; dated Thu, 30 Jul 2015 17:27:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 21150 21162 21163. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) moreinfo. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Merged 21162 21163. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 Jul 2015 17:26:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 30 13:26:22 2015
Received: from localhost ([127.0.0.1]:35021 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZKrb4-0006Qa-6Y
	for submit <at> debbugs.gnu.org; Thu, 30 Jul 2015 13:26:22 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59995)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <pot@HIDDEN>) id 1ZKrb2-0006QS-4o
 for submit <at> debbugs.gnu.org; Thu, 30 Jul 2015 13:26:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <pot@HIDDEN>) id 1ZKrb0-0000qu-V6
 for submit <at> debbugs.gnu.org; Thu, 30 Jul 2015 13:26:19 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:49908)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pot@HIDDEN>)
 id 1ZKrb0-0000qn-Sc
 for submit <at> debbugs.gnu.org; Thu, 30 Jul 2015 13:26:18 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45248)
 by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <pot@HIDDEN>)
 id 1ZKraz-0004Pf-KC
 for bug-gnu-emacs@HIDDEN; Thu, 30 Jul 2015 13:26:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <pot@HIDDEN>) id 1ZKraw-0000pt-FR
 for bug-gnu-emacs@HIDDEN; Thu, 30 Jul 2015 13:26:17 -0400
Received: from blade3.isti.cnr.it ([194.119.192.19]:6686)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pot@HIDDEN>)
 id 1ZKraw-0000pg-8N
 for bug-gnu-emacs@HIDDEN; Thu, 30 Jul 2015 13:26:14 -0400
Received: from tucano.isti.cnr.it ([146.48.81.102])
 by mx.isti.cnr.it (PMDF V6.5-x6 #32097)
 with ESMTPSA id <01POYPHRN35O9VUM1B@HIDDEN> for bug-gnu-emacs@HIDDEN; 
 Thu, 30 Jul 2015 19:26:11 +0200 (MEST)
Received: from pot by tucano.isti.cnr.it with local (Exim 4.86_RC5)
 (envelope-from <pot@HIDDEN>)	id 1ZKrat-0007Uw-Ll; Thu,
 30 Jul 2015 19:26:11 +0200
Date: Thu, 30 Jul 2015 19:22:45 +0200
From: Francesco =?us-ascii?Q?=3D=3Futf-8=3FQ=3FPotort=3DC3=3DAC=3F=3D?=
 <pot@HIDDEN>
Subject: adapting octave-inf.el to Octave 4
To: bug-gnu-emacs@HIDDEN
Message-id: <E1ZKrXZ-0007Io-DV@HIDDEN>
Organization: 
Organization: 
X-INSM-ip-source: 146.48.81.102 Auth Done
X-INSM-ip-source: 146.48.81.102 Auth Done
X-fingerprint: 4B02 6187 5C03 D6B1 2E31  7666 09DF 2DC9 BE21 6115
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -6.4 (------)
X-Debbugs-Envelope-To: submit
Cc: Kurt Hornik <Kurt.Hornik@HIDDEN>,
 "John W. Eaton" <jwe@HIDDEN>, Mike Miller <mtmiller@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.4 (------)

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





Acknowledgement sent to Francesco =?utf-8?Q?Potort=C3=AC?= <pot@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#21163; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Jul 2015 15:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.