From: nobu.nokada@... Date: 2002-05-13T00:24:14+09:00 Subject: Re: emacs, inf-ruby, run-load-file removing \ filesep on Windows ? Hi, At Sun, 12 May 2002 21:54:35 +0900, Jean-Hugues ROBERT wrote: > I am uncertain about what you mean. According to what you stated in a > previous message, there should be a way to ask XEmacs to use / instead > of \ (on Windows). I would be glad to know more about this way. Sorry, I meant followings. > In the context I am referring to (using \C-c\C-l to invoke > ruby-load-file), I most of the time simply answer "yes" because the > proposed choice is the Ruby file I want to load in the IRB run by > inf-ruby. By that time, the file-name contains \, not / Once I guessed XEmacs should use /, but noted it may be passed to pure Windows application which doesn't accept / as file separators. So inf-ruby.el should be changed as you claimed. > BTW: Is there a way to avoid the question about the file needing to be > saved first ? I always answer yes. I guess I am looking to bind some > ruby-save-and-load-current-file to some key sequence, so that typing > that key sequence inside some ruby-mode buffer will directly save the > buffer and load the file in IRB, without asking any question. Like: Do you want to load current buffer? (defun ruby-load-buffer (buffer) "Load current Ruby file into the inferior Ruby process. Saving it first if needed." (interactive "bLoad Ruby buffer: ") (setq buffer (get-buffer buffer)) (save-excursion (set-buffer buffer) (or (eq major-mode 'ruby-mode) (error "Not ruby mode")) (save-buffer buffer)) (comint-send-string (ruby-proc) (concat "(load '" (buffer-file-name buffer) "'\)\n"))) -- Nobu Nakada