From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Examining the output of a shell command? Date: Sun, 28 Jun 2015 18:43:04 +0300 Message-ID: <83r3ov6dpz.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1435506213 3130 80.91.229.3 (28 Jun 2015 15:43:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Jun 2015 15:43:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 28 17:43:24 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z9Ejs-0005mb-23 for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Jun 2015 17:43:24 +0200 Original-Received: from localhost ([::1]:39247 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9Ejr-0005TJ-1I for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Jun 2015 11:43:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9Ejg-0005Sl-Dc for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 11:43:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9Ejb-0003yx-6Y for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 11:43:12 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:44502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9Eja-0003yd-Vx for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 11:43:07 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NQN00I00VIE1M00@mtaout29.012.net.il> for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 18:42:34 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQN00HGNVMY2K10@mtaout29.012.net.il> for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 18:42:34 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.185 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105254 Archived-At: > From: Raffaele Ricciardi > Date: Sun, 28 Jun 2015 17:03:52 +0200 > > On 28/06/15 16:55, Eli Zaretskii wrote: > >> (shell-command-to-string "echo $RED hello $NORMAL") > >> --> "hello > >> " > > > > Check your shell init files. > > I did that already: > > $ echo $RED > \[\e[1;31m > > Another puzzling behaviour: > > $ echo $RED > \[\e[1;31m > $ emacs -nw -Q > M-: (getenv "RED") RET > --> nil Did you "export RED"? Anyway, what I wanted to point out was that when you invoke the shell from Emacs, it is a non-interactive session, which might get different settings.