bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16005: 24.3; function inferior-lisp needs patch to work with certain


From: Steven Litvintchouk
Subject: bug#16005: 24.3; function inferior-lisp needs patch to work with certain filenames in Windows-NT
Date: Fri, 29 Nov 2013 15:27:25 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

Trying to run an inferior lisp program on Windows 7,
with the value of inferior-lisp-program set to
"D:/More Program Files (x86)/clisp-2.49/clisp.exe",

caused an error with error message:
"Spawning child process: invalid argument"

The reason is that the function inferior-lisp (defined in inf-lisp.el)
calls the function split-string, whose arg SEPARATORS defaults to "[ \f\t\n\r\v]+".
But Microsoft Windows allows spaces in filenames (as in the
inferior-lisp-program filename given above).

I patched this to check if we're on Windows-nt, and if so, to call
split-string with SEPARATORS bound to "[\f\t\n\r\v]+".  (no space)


(defun inferior-lisp (cmd)
  "Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'.
If there is a process already running in `*inferior-lisp*', just switch
to that buffer.
With argument, allows you to edit the command line (default is value
of `inferior-lisp-program').  Runs the hooks from
`inferior-lisp-mode-hook' (after the `comint-mode-hook' is run).
\(Type \\[describe-mode] in the process buffer for a list of commands.)"
  (interactive (list (if current-prefix-arg
             (read-string "Run lisp: " inferior-lisp-program)
               inferior-lisp-program)))
  (if (not (comint-check-proc "*inferior-lisp*"))
      (let ((cmdlist (if (equal system-type 'windows-nt)
             (split-string cmd "[\f\t\n\r\v]+") ; SDL: Windows allows spaces in filenames
               (split-string cmd)
               )))
    (set-buffer (apply (function make-comint)
               "inferior-lisp" (car cmdlist) nil (cdr cmdlist)))
    (inferior-lisp-mode)))
  (setq inferior-lisp-buffer "*inferior-lisp*")
  (pop-to-buffer-same-window "*inferior-lisp*"))






In GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601)
 of 2013-03-17 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.7) --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include
 -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
 -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Info

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> C-x
o C-x b i n f - l i s SPC - w i n SPC p a SPC SPC <return>
<down-mouse-1> <mouse-1> i f SPC ( e q u a l SPC s
y s t e m - t y p e SPC " w i n d o w s - n t " <return>
<tab> C-e C-p ) C-n C-a <tab> C-e C-b C-b C-j <tab>
C-p C-f C-f C-f C-b ( C-a <tab> C-n C-a <tab> C-p C-e
C-j ( s p l i t - s t r i n g SPC c m d ) <down-mouse-1>
<mouse-1> <down-mouse-1> <mouse-1> <escape> ; SPC W
i n d o w s SPC a l l o w s SPC b l a n k s SPC i n
SPC f i l e n a m e s <left> <left> <left> <left> <left>
<left> <left> <left> <left> <left> <left> <left> <left>
<left> <backspace> <backspace> <backspace> <backspace>
<backspace> s p a c e C-x s y y <help-echo> <help-echo>
<help-echo> <down-mouse-1> <mouse-1> C-h ? <help-echo>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> C-p <mouse-1> <down-mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <help-echo> <down-mouse-1>
<mouse-1> C-x 1 C-h i m e m a c s <return> SPC SPC
<help-echo> <down-mouse-1> <mouse-2> <help-echo> <help-echo>
<down-mouse-1> <mouse-2> <mouse-1> <help-echo> <help-echo>
<help-echo> <tool-bar> <Back in history> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <down-mouse-1>
<mouse-2> <escape> x r e p o e r <backspace> <backspace>
r t - = e <backspace> <backspace> e m a c s = b i g
<backspace> <backspace> <backspace> <backspace> - b
u g <return>

Recent messages:

Quit
Making completion list...
Type C-x 1 to delete the help window.
Saving file d:/More Program Files/Shareware/emacs-24.3/lisp/progmodes/inf-lisp-windows-patch.el...
Wrote d:/More Program Files/Shareware/emacs-24.3/lisp/progmodes/inf-lisp-windows-patch.el
Saving file d:/More Program Files/Shareware/emacs-24.3/lisp/progmodes/inf-lisp.el...
Wrote d:/More Program Files/Shareware/emacs-24.3/lisp/progmodes/inf-lisp.el
View mode: type C-h for help, h for commands, q to quit.
Composing main Info directory...done

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums info goto-addr thingatpt
noutline outline easy-mmode view mule-util debug apropos pp find-func
help-mode easymenu help-fns misearch multi-isearch dired-aux dired
inf-lisp comint ansi-color ring gnus gnus-ems nnheader gnus-util
mail-utils mm-util mail-prsvr wid-edit cus-start cus-load time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process w32 multi-tty emacs)
 

 

 

 

 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]