[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs 23.3 with Cygwin bash and '\r'.
From: |
Oleksandr Gavenko |
Subject: |
Re: Emacs 23.3 with Cygwin bash and '\r'. |
Date: |
Fri, 11 Mar 2011 10:32:44 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
On 10.03.2011 19:34, Eli Zaretskii wrote:
From: Oleksandr Gavenko<gavenko@bifit.com.ua>
Date: Thu, 10 Mar 2011 18:30:41 +0200
I get latest Emacs 23.3:
http://permalink.gmane.org/gmane.emacs.announce/19
and it loaded successfully, but previously all Emacs after setting:
(setq shell-file-name "bash")
(setenv "SHELL" "/bin/bash")
work fine and now shell say:
$ pwd
bash: $'pwd\r': команда не найдена
Doesn't that \r give a hint?
Sorry, no ))
I write
(defun my-strip-last-cr (str)
(pp str)
(if (> (length str) 0)
(if (equal (substring str -1) "\r")
(progn (message "yyy") (substring str 0 -1))
str)
""
) )
(defun my-shell-input-filter nil (add-to-list
'comint-input-filter-functions 'my-strip-last-cr))
(add-hook 'shell-mode-hook 'my-shell-input-filter)
M-x shell ls RET
bash: $'ls\r': команда не найдена
In *Message* buffer I get:
#("ls\n" 0 2
(fontified t))
So no any \r pass to filter!!
Also I try recent bash specific Cygwin settings: "set -o igncr" without
happiness.
If I type whitespace char after ls/pwd - all OK.
I don't find any relevant settings in shell.el and comint.el by
searching "\r" or "^M"
and don't know how further debug issue.