From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Angelo Graziosi Newsgroups: gmane.emacs.devel Subject: Re: On prompt in shell mode Date: Thu, 14 Aug 2008 15:21:24 +0200 Message-ID: <48A43154.9020607@alice.it> References: <48A198B6.4080206@alice.it> <48A1F73E.4040504@alice.it> <48A3585C.9010208@alice.it> <48A36803.6020908@alice.it> <48A38952.50400@alice.it> <48A3F1D6.2090409@alice.it> 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: ger.gmane.org 1218720311 8030 80.91.229.12 (14 Aug 2008 13:25:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2008 13:25:11 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: david.hansen@gmx.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 14 15:25:57 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KTcpq-0004XQ-Bh for ged-emacs-devel@m.gmane.org; Thu, 14 Aug 2008 15:25:57 +0200 Original-Received: from localhost ([127.0.0.1]:45863 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTcos-00048T-Vs for ged-emacs-devel@m.gmane.org; Thu, 14 Aug 2008 09:24:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTcms-0003S9-Ss for emacs-devel@gnu.org; Thu, 14 Aug 2008 09:22:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTcmO-0003GX-OF for emacs-devel@gnu.org; Thu, 14 Aug 2008 09:22:46 -0400 Original-Received: from [199.232.76.173] (port=41389 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTcmO-0003GO-FU for emacs-devel@gnu.org; Thu, 14 Aug 2008 09:22:16 -0400 Original-Received: from smtp-out112.alice.it ([85.37.17.112]:1420) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KTcmN-0004I5-Iv for emacs-devel@gnu.org; Thu, 14 Aug 2008 09:22:16 -0400 Original-Received: from FBCMMO02.fbc.local ([192.168.68.196]) by smtp-out112.alice.it with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Aug 2008 15:21:53 +0200 Original-Received: from FBCMCL01B06.fbc.local ([192.168.69.87]) by FBCMMO02.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Aug 2008 15:21:52 +0200 Original-Received: from [82.57.167.9] ([82.57.167.9]) by FBCMCL01B06.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Aug 2008 15:21:52 +0200 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <48A3F1D6.2090409@alice.it> X-OriginalArrivalTime: 14 Aug 2008 13:21:52.0457 (UTC) FILETIME=[B7149390:01C8FE10] X-detected-kernel: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102449 Archived-At: David Hansen wrote: > Angelo Graziosi wrote: > >> On Cygwin, it seems that only the 'else' branch is followed. Indeed using >> >> if [ "x$EMACS" = xt ]; then >> # set up your prompt for M-x shell. >> PS1='OK1> ' >> else >> # fancy prompt for real terminals. >> PS1='OK2> ' >> fi > > What shell do you use? The brackets may be a bash extension. You can > try: if test "x$EMACS" = xt; then ... I think the cause is this: on Cygwin .bashrc is 'executed by bash for login shells', instead on Linux it is 'executed by bash for NON login shells'! and I think M-x shell executes a NON-login shell, i.e. it does not execute .bashrc! This seems to be confirmed by M-x shell OK2> . ~/.bashrc OK1> i.e. the prompt I ask for Emacs M-x shell! Angelo