[Pkg-octave-devel] Bug#416048: octave2.9-emacsen: interface change in pwd => error message in octave-mod

Pascal A. Dupuis Pascal.Dupuis at worldonline.be
Sat Mar 24 12:05:25 CET 2007


Package: octave2.9-emacsen
Severity: normal
Tags: patch

Hello,

I introduced in 2005 the following patch to octave-mod:
--- octave-inf.el.orig  2005-08-22 11:34:57.000000000 +0200
+++ octave-inf.el       2005-08-22 11:38:05.000000000 +0200
@@ -234,7 +234,10 @@
 
     ;; And finally, everything is back to normal.
     (set-process-filter proc 'inferior-octave-output-filter)
-    (run-hooks 'inferior-octave-startup-hook)))
+    (run-hooks 'inferior-octave-startup-hook)
+    ;; just in case, to be sure a cd in the startup file 
+    ;; won't have detrimental effects
+    (inferior-octave-resync-dirs)))
 
 ^L
 (defun inferior-octave-complete ()


The purpose is to made the idea of inferior-octave process and emacs 
buffer about dirs the same in case the initialisation file '.octaverc' 
contains a 'cd' command. 

It started failing some times ago about unknown "CDPATH". The reason is 
that pwd now returns 'ans = /home/user', and cding to 'ans = /home/user' 
is not possible. The workaround is to use disp(pwd) instead:
--- octave-inf.el.orig  2007-03-23 17:16:19.000000000 +0100
+++ octave-inf.el       2007-03-23 17:16:35.000000000 +0100
@@ -386,7 +386,7 @@
 This command queries the inferior Octave process about its current
 directory and makes this the current buffer's default directory."
   (interactive)
-  (inferior-octave-send-list-and-digest '("pwd\n"))
+  (inferior-octave-send-list-and-digest '("disp(pwd)\n"))
   (cd (car inferior-octave-output-list)))
 
 ;;; provide ourself

May I also ask for the use of update-alternatives to use the right 
versions of octave-inf and co ? There are indeed three sources:
emacs21-el_21.4a+1-3_all.deb
octave2.9-emacsen_2.9.9-8etch1_all.deb
octave2.1-emacsen

TIA

Pascal Dupuis


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20.3
Locale: LANG=fr_BE, LC_CTYPE=fr_BE (charmap=ISO-8859-1)
-------------- next part --------------
--- octave-inf.el.orig	2007-03-23 17:16:19.000000000 +0100
+++ octave-inf.el	2007-03-23 17:16:35.000000000 +0100
@@ -386,7 +386,7 @@
 This command queries the inferior Octave process about its current
 directory and makes this the current buffer's default directory."
   (interactive)
-  (inferior-octave-send-list-and-digest '("pwd\n"))
+  (inferior-octave-send-list-and-digest '("disp(pwd)\n"))
   (cd (car inferior-octave-output-list)))
 
 ;;; provide ourself


More information about the Pkg-octave-devel mailing list