From: "John W. Eaton" <jwe@bevo.che.wisc.edu>
Cc: bug@octave.org, bug-gnu-emacs@gnu.org, rms@gnu.org
Subject: Re: CDPATH problem reappears when using octave-2.9.9 from Emacs 23
Date: Thu, 26 Oct 2006 09:54:54 -0400 [thread overview]
Message-ID: <17728.48686.848051.467944@segfault.lan> (raw)
In-Reply-To: <883cfe6d0610260558t616989aby24ac941b0d3fc5e8@mail.gmail.com>
[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 633 bytes --]
On 26-Oct-2006, Michel Salim wrote:
| On 10/26/06, Richard Stallman <rms@gnu.org> wrote:
| > 2. adding that directory to CDPATH does not change the result
| >
| > What _precisely_ did you do to add that directory to CDPATH? Perhaps
| > you did not alter the path in a way that affects this command.
| >
| export CDPATH=".:~:~/Documents"
| emacs
|
| This is using the Bash shell.
I think the bug is actually in octave-inf.el, and is happening because
of some recent changes in Octave. Please try the following patch.
This is relative to the version of octave-inf.el that is currently in
the Emacs CVS archive.
Thanks,
jwe
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 3973 bytes --]
2006-10-26 John W. Eaton <jwe@octave.org>
* progmodes/octave-inf.el (inferior-octave-has-built-in-variables):
New defvar.
(inferior-octave-resync-dirs): Check to see whether Octave has
built-in variables and set inferior-octave-has-built-in-variables.
Check inferior-octave-has-built-in-variables to decide whether to
send commands that set built-in variables or call functions to
change Octave's behavior.
Send "disp (pwd ())" to Octave instead of just "pwd".
(inferior-octave-startup): Send "more off" to Octave instead of
"page_screen_output = 0".
*** octave-inf.el.orig Thu Oct 26 09:48:26 2006
--- octave-inf.el Thu Oct 26 09:50:06 2006
***************
*** 113,118 ****
--- 113,121 ----
(defvar inferior-octave-complete-impossible nil
"Non-nil means that `inferior-octave-complete' is impossible.")
+ (defvar inferior-octave-has-built-in-variables nil
+ "Non-nil means that Octave has built-in variables.")
+
(defvar inferior-octave-dynamic-complete-functions
'(inferior-octave-complete comint-dynamic-complete-filename)
"List of functions called to perform completion for inferior Octave.
***************
*** 218,228 ****
'identity inferior-octave-output-list "\n")
"\n"))))
;; An empty secondary prompt, as e.g. obtained by '--braindead',
;; means trouble.
(inferior-octave-send-list-and-digest (list "PS2\n"))
! (if (string-match "^PS2 = *$" (car inferior-octave-output-list))
! (inferior-octave-send-list-and-digest (list "PS2 = \"> \"\n")))
;; O.k., now we are ready for the Inferior Octave startup commands.
(let* (commands
--- 221,240 ----
'identity inferior-octave-output-list "\n")
"\n"))))
+ ;; Find out whether Octave has built-in variables.
+ (inferior-octave-send-list-and-digest
+ (list "exist \"LOADPATH\"\n"))
+ (setq inferior-octave-has-built-in-variables
+ (string-match "101$" (car inferior-octave-output-list)))
+
;; An empty secondary prompt, as e.g. obtained by '--braindead',
;; means trouble.
(inferior-octave-send-list-and-digest (list "PS2\n"))
! (if (string-match "\\(PS2\\|ans\\) = *$" (car inferior-octave-output-list))
! (inferior-octave-send-list-and-digest
! (list (if inferior-octave-has-built-in-variables
! "PS2 = \"> \"\n"
! "PS2 (\"> \");\n"))))
;; O.k., now we are ready for the Inferior Octave startup commands.
(let* (commands
***************
*** 230,239 ****
(file (or inferior-octave-startup-file
(concat "~/.emacs-" program))))
(setq commands
! (list "page_screen_output = 0;\n"
(if (not (string-equal
inferior-octave-output-string ">> "))
! "PS1=\"\\\\s> \";\n")
(if (file-exists-p file)
(format "source (\"%s\");\n" file))))
(inferior-octave-send-list-and-digest commands))
--- 242,253 ----
(file (or inferior-octave-startup-file
(concat "~/.emacs-" program))))
(setq commands
! (list "more off;\n"
(if (not (string-equal
inferior-octave-output-string ">> "))
! (if inferior-octave-has-built-in-variables
! "PS1=\"\\\\s> \";\n"
! "PS1 (\"\\\\s> \");\n"))
(if (file-exists-p file)
(format "source (\"%s\");\n" file))))
(inferior-octave-send-list-and-digest commands))
***************
*** 383,389 ****
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"))
(cd (car inferior-octave-output-list)))
;;; provide ourself
--- 397,403 ----
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 '("disp (pwd ())\n"))
(cd (car inferior-octave-output-list)))
;;; provide ourself
[-- Attachment #3: Type: text/plain, Size: 147 bytes --]
_______________________________________________
Bug-octave mailing list
Bug-octave@octave.org
https://www.cae.wisc.edu/mailman/listinfo/bug-octave
next prev parent reply other threads:[~2006-10-26 13:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-20 21:09 CDPATH problem reappears when using octave-2.9.9 from Emacs 23 Michel Salim
2006-10-21 14:06 ` John W. Eaton
2006-10-23 5:11 ` Richard Stallman
2006-10-26 5:33 ` Michel Salim
2006-10-26 10:11 ` Richard Stallman
2006-10-26 12:58 ` Michel Salim
2006-10-26 13:54 ` John W. Eaton [this message]
2006-10-26 23:59 ` Michel Salim
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=17728.48686.848051.467944@segfault.lan \
--to=jwe@bevo.che.wisc.edu \
--cc=bug-gnu-emacs@gnu.org \
--cc=bug@octave.org \
--cc=rms@gnu.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.