From: Per P. <per...@ma...> - 2004-03-04 09:57:52
|
Hi, on Mac OS X edit.m breaks when issuing 'edit' without any parameters. The cause seems to be a difference in how whitespace is treated (on OS X spaces are allowed in file- & pathnames). The [EDITOR %s] part comes out as 'emacs ' (trailing space) instead of 'emacs'. A potentital fix is pasted below. I don't have any other system to test it on so I won't commit it just yet. /Per Index: edit.m =================================================================== RCS file: /cvsroot/octave/octave-forge/main/miscellaneous/edit.m,v retrieving revision 1.12 diff -u -d -b -w -r1.12 edit.m --- edit.m 16 Dec 2003 21:53:46 -0000 1.12 +++ edit.m 1 Mar 2004 10:23:41 -0000 @@ -100,7 +100,7 @@ ## start the editor without a file if no file is given if nargin < 1 - system(['cd "',FUNCTION_HOME,'" ; "',sprintf(FUNCTION_EDITOR,""), '"']); + system(['cd "',FUNCTION_HOME,'" ; "',strtok(FUNCTION_EDITOR, " "),'"']); return endif |