From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Shakthi Kannan Newsgroups: gmane.emacs.help Subject: npm control characters in compilation output Date: Mon, 6 Jul 2015 16:13:44 +0530 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1436179438 4518 80.91.229.3 (6 Jul 2015 10:43:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Jul 2015 10:43:58 +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 Jul 06 12:43:57 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 1ZC3sT-0006jJ-EA for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Jul 2015 12:43:57 +0200 Original-Received: from localhost ([::1]:50003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC3sS-00073z-V8 for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Jul 2015 06:43:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC3sI-00073m-7P for help-gnu-emacs@gnu.org; Mon, 06 Jul 2015 06:43:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZC3sG-00074A-VT for help-gnu-emacs@gnu.org; Mon, 06 Jul 2015 06:43:46 -0400 Original-Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:36192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC3sG-000744-Pz for help-gnu-emacs@gnu.org; Mon, 06 Jul 2015 06:43:44 -0400 Original-Received: by obdbs4 with SMTP id bs4so104154013obd.3 for ; Mon, 06 Jul 2015 03:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=s1Wcq7IlyWTWiR9aKM361y491Zk0yMG2CvWrnTrqPv8=; b=v8lqVSpz7FcUPTl/KxtfTxwGF6NuGa2jq9bqJ2Y7q4RgZsI4C55inb56Wz/LTVebaj W5MuXXNkXQUJIjXWGcQ34+7619qiw2DEMAEXh9BtD2pNwuebE0Budmz+VAlqnnlkrP9z KgCwTV8y22fd1n9Dbvu5IPrKdTRXg9vLBxD+CoEftE3GEvBx6vveiW31zDE1VX/NXRLp IZW6V5kkSUWmhG2xsWlbtgHZhDSQN8Jh0A6xczA/9d8cwSfySXEhZy9QgOwODjwzdvqV zhKoNnvPH85nvGoSBBzZXv3KHx6cedW+vzecmQq3oFo9MiEOj39e4I8HRLwIA3A9U48w qF5Q== X-Received: by 10.202.180.133 with SMTP id d127mr45081599oif.104.1436179424061; Mon, 06 Jul 2015 03:43:44 -0700 (PDT) Original-Received: by 10.202.108.18 with HTTP; Mon, 6 Jul 2015 03:43:44 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::231 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:105484 Archived-At: Hi, I am currently testing the following code snippet: === ~/.emacs === (setq inferior-js-mode-hook (lambda () ;; We like nice colors (ansi-color-for-comint-mode-on) ;; Deal with some prompt nonsense (add-to-list 'comint-preoutput-filter-functions (lambda (output) (replace-regexp-in-string "\033\\[[0-9]+[GK]" "" output))))) ;; for displaying ANSI escape sequences correctly (eval-after-load 'compile '(add-hook 'compilation-filter-hook (lambda () (ansi-color-process-output nil)))) (defun npm-test () (interactive) (let ((root (locate-dominating-file default-directory "package.json"))) (unless root (error "Here is not npm package")) (let ((default-directory root)) (compile "npm run test")))) === END === After evaluating the above functions, and running 'npm-test', I still see control characters in the *Compilation* buffer. What could I be missing? The detailed issue is available at: https://github.com/defunkt/coffee-mode/issues/306 Appreciate any help in this regard, Thanks! SK -- Shakthi Kannan http://www.shakthimaan.com