From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "John W. Eaton" Newsgroups: gmane.comp.gnu.octave.bugs,gmane.emacs.bugs Subject: Re: CDPATH problem reappears when using octave-2.9.9 from Emacs 23 Date: Thu, 26 Oct 2006 09:54:54 -0400 Message-ID: <17728.48686.848051.467944@segfault.lan> References: <883cfe6d0610201409s65d1c0abt8e6d75db7e17ca8c@mail.gmail.com> <17722.10618.676894.295164@segfault.lan> <883cfe6d0610252233p502ab750ge17ba1b13ff170b3@mail.gmail.com> <883cfe6d0610260558t616989aby24ac941b0d3fc5e8@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ePDWu2PaaS" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1161871039 17401 80.91.229.2 (26 Oct 2006 13:57:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Oct 2006 13:57:19 +0000 (UTC) Cc: bug@octave.org, bug-gnu-emacs@gnu.org, rms@gnu.org Original-X-From: bug-octave-bounces@octave.org Thu Oct 26 15:57:14 2006 Return-path: Envelope-to: gcgob-bug-octave@gmane.org Original-Received: from mail.cae.wisc.edu ([144.92.13.31]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gd5jB-0005E3-Az for gcgob-bug-octave@gmane.org; Thu, 26 Oct 2006 15:57:01 +0200 Original-Received: from www.cae.wisc.edu (www.cae.wisc.edu [144.92.13.3]) by mail.cae.wisc.edu (8.13.7+Sun/8.13.3) with ESMTP id k9QDuDbm009178; Thu, 26 Oct 2006 08:56:13 -0500 (CDT) Original-Received: from mail.cae.wisc.edu (mail.cae.wisc.edu [144.92.13.31]) by wwwcaewiscedu (8.13.7+Sun/8.13.7) with ESMTP id k9QDtq6l015308 for ; Thu, 26 Oct 2006 08:55:53 -0500 (CDT) Original-Received: from smtpauth.cae.wisc.edu (smtpauth.cae.wisc.edu [144.92.13.83]) by mail.cae.wisc.edu (8.13.7+Sun/8.13.3) with ESMTP id k9QDt0TD008733; Thu, 26 Oct 2006 08:55:00 -0500 (CDT) Original-Received: from segfault.lan (24-54-182-19.pittpa.adelphia.net [24.54.182.19]) (authenticated bits=0) by smtpauth.cae.wisc.edu (8.13.4/8.13.4/Debian-3sarge2) with ESMTP id k9QDt0Lq002496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 26 Oct 2006 08:55:00 -0500 Original-To: "Michel Salim" In-Reply-To: <883cfe6d0610260558t616989aby24ac941b0d3fc5e8@mail.gmail.com> X-Mailer: VM 7.19 under Emacs 22.0.50.1 X-CAE-MailScanner: Found to be clean (benji), Found to be clean (benji) X-Spam-Flag: NO X-Spam-Level: X-Spam-Reason: ALL_TRUSTED, AWL X-BeenThere: bug-octave@octave.org X-Mailman-Version: 2.1.7 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-octave-bounces@octave.org Errors-To: bug-octave-bounces@octave.org X-CAE-MailScanner-Information: Please contact security@engr.wisc.edu if this message contains a virus or has been corrupted in delivery. Xref: news.gmane.org gmane.comp.gnu.octave.bugs:4034 gmane.emacs.bugs:15393 Archived-At: --ePDWu2PaaS Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit On 26-Oct-2006, Michel Salim wrote: | On 10/26/06, Richard Stallman 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 --ePDWu2PaaS Content-Type: text/plain Content-Disposition: inline; filename="diffs" Content-Transfer-Encoding: 7bit 2006-10-26 John W. Eaton * 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 --ePDWu2PaaS Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-octave mailing list Bug-octave@octave.org https://www.cae.wisc.edu/mailman/listinfo/bug-octave --ePDWu2PaaS--