all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* npm control characters in compilation output
@ 2015-07-06 10:43 Shakthi Kannan
  0 siblings, 0 replies; only message in thread
From: Shakthi Kannan @ 2015-07-06 10:43 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-06 10:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06 10:43 npm control characters in compilation output Shakthi Kannan

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.