From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "David M. Karr" Newsgroups: gmane.emacs.help Subject: Shell in Cygwin Emacs doesn't source .bashrc Date: Sun, 03 Apr 2011 22:06:30 -0700 Message-ID: <4D9951D6.1090206@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1301893650 14913 80.91.229.12 (4 Apr 2011 05:07:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2011 05:07:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 04 07:07:27 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6c0d-0005Ba-1o for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Apr 2011 07:07:27 +0200 Original-Received: from localhost ([127.0.0.1]:37672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6c0c-0002sL-6O for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Apr 2011 01:07:26 -0400 Original-Received: from [140.186.70.92] (port=41954 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6bzs-0002qH-8H for help-gnu-emacs@gnu.org; Mon, 04 Apr 2011 01:06:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q6bzr-0002J5-Bh for help-gnu-emacs@gnu.org; Mon, 04 Apr 2011 01:06:40 -0400 Original-Received: from mail-pv0-f169.google.com ([74.125.83.169]:46766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q6bzr-0002Ic-6C for help-gnu-emacs@gnu.org; Mon, 04 Apr 2011 01:06:39 -0400 Original-Received: by pvg4 with SMTP id 4so1703187pvg.0 for ; Sun, 03 Apr 2011 22:06:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=AQGcGqG8Fhw7VewgmqzfqhtA0H0pyOgHNWNbyIj2Fc4=; b=AmpEXwQdkzhl0vw3MAaiJaXFeKQE9MlxpLWpJwQad9ykSc7h3HFYsIVAs84FMHutUd 1n2H3fVif5jtUfpAfAihritOu7I6cN5fLGi+CzXEG05Vw8J8Fu935fjd8vTbpfI+yxfY eRBCnFHwk+HoUcsRqbz5FuBX1U92iDH+Z1bxE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=tKHznrL5CcRvmNbcWkf7KupV/q4tgk8BwPaqGI6RARKA2ncgwj1UQnUNMFKoVGjt7L k37kIls0Vp4dL4U9KkbcWtFuzs656g4rjr5nQR40ocjh1ElhMfe1DI0z2vnGEVJL/GH2 KnJhkloL/hS6iLdri1hzvDMAt2xwkaMUyTZz0= Original-Received: by 10.142.248.4 with SMTP id v4mr6421637wfh.145.1301893596866; Sun, 03 Apr 2011 22:06:36 -0700 (PDT) Original-Received: from [192.168.1.103] (c-98-247-30-63.hsd1.wa.comcast.net [98.247.30.63]) by mx.google.com with ESMTPS id 25sm7065170wfb.22.2011.04.03.22.06.33 (version=SSLv3 cipher=OTHER); Sun, 03 Apr 2011 22:06:34 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.83.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80601 Archived-At: I'm on a new Windows Seven box, with the latest released Cygwin and Cygwin Emacs. I copied over my .emacs file from an older Cygwin installation on a Windows XP box. On the old WinXP box, after I start Emacs and execute "shell", it appears to properly execute my .bashrc, setting my PS1 and putting me in my home directory. On the new box, when I execute "shell", the prompt isn't set to my PS1 value, and the current directory is "/usr/bin". If I execute "bash" at that point, and then "cd", I'm where I should be, and with my environment set up. Something obviously changed between the older installation and the latest, which my older .emacs isn't dealing with properly. I don't currently have a "$HOME/.emacs_bash" file. I don't know if I need it. I start Emacs with the following shortcut command line: C:\cygwin\bin\run.exe -p /usr/bin emacs-X11.exe -display 127.0.0.1:0.0 I have a feeling this line might be the problem. Do I have to make this run "bash" instead, and have that run Emacs? If it matters, here is my current shell-mode-hook function, which I set to "shell-mode-hook" in a "custom-set-variables" block: --------------------------- (defun my-shell-mode-hook () (add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt nil t) (setq explicit-shell-file-name "bash") (setq shell-file-name explicit-shell-file-name) (ansi-color-for-comint-mode-on) (setq shell-prompt-pattern "^\[[A-z0-9]+:[A-z0-9/]+\] ") (local-set-key "\C-xs" 'cycle-go-shell) (local-set-key "\C-xS" 'cycle-find-shell-or-shells-buffer-list) (local-set-key "\C-j" 'lfd-send-input) (local-set-key [f5] 'comint-previous-matching-input-from-input) (local-set-key [f12] 'compilation-shell-minor-mode) ) ---------------------------