From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Pascal J. Bourguignon" Newsgroups: gmane.emacs.help Subject: Re: Examining the output of a shell command? Date: Sun, 28 Jun 2015 15:57:21 +0200 Organization: Informatimago Message-ID: <87d20gorzy.fsf@kuiper.lan.informatimago.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1435499880 8974 80.91.229.3 (28 Jun 2015 13:58:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Jun 2015 13:58:00 +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 15:57:51 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 1Z9D5i-00046v-BX for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Jun 2015 15:57:50 +0200 Original-Received: from localhost ([::1]:39068 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9D5h-0000Vb-Qx for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Jun 2015 09:57:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9D5W-0000V0-C9 for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 09:57:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9D5R-0001dX-Hh for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 09:57:38 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:37687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9D5R-0001d2-B8 for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 09:57:33 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z9D5O-0003uV-NY for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 15:57:30 +0200 Original-Received: from amontsouris-654-1-26-238.w90-2.abo.wanadoo.fr ([90.2.217.238]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 28 Jun 2015 15:57:30 +0200 Original-Received: from pjb by amontsouris-654-1-26-238.w90-2.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 28 Jun 2015 15:57:30 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: amontsouris-654-1-26-238.w90-2.abo.wanadoo.fr Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:NzU3YWQ3ZDUxZjZiNjA5OWY1OWNjNzgxZTY1NzYwM2MyNjI5MjE5Yw== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:105244 Archived-At: Raffaele Ricciardi writes: > I would like to analyse the escape sequences emitted by a shell > command. I have tried with `shell-command` and > `shell-command-to-string`, but escape sequences are stripped away. Nope. Try a better lie. (shell-command-to-string "echo $RED hello $NORMAL") --> "[31m hello [0m " -- __Pascal Bourguignon__ http://www.informatimago.com/ “The factory of the future will have only two employees, a man and a dog. The man will be there to feed the dog. The dog will be there to keep the man from touching the equipment.” -- Carl Bass CEO Autodesk