help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eshell and jobs


From: Kai Großjohann
Subject: Re: eshell and jobs
Date: Wed, 29 Jan 2003 08:20:24 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3.50 (i686-pc-linux-gnu)

Michael Spittel <mspittel@kite.ssc.wisc.edu> writes:

> (nudge nudge Kai) :-)

I'm listening, but I'm afraid I can't help.  I don't know how to
redirect the output of a command to a buffer.

Hm.  But I have this:

(defun eshell/ec (&rest args)
  "Use `compile' to do background makes."
  (if (eshell-interactive-output-p)
      (let ((compilation-process-setup-function
             (list 'lambda nil
                   (list 'setq 'process-environment
                         (list 'quote (eshell-copy-environment))))))
        (compile (eshell-flatten-and-stringify args))
        (pop-to-buffer compilation-last-buffer))
    (throw 'eshell-replace-command
           (let ((l (eshell-stringify-list (eshell-flatten-list args))))
             (eshell-parse-command (car l) (cdr l))))))
(put 'eshell/ec 'eshell-no-numeric-conversions t)

This this code, you can do 

    ec ls -l

and the output of ls -l will go to a separate buffer.  It's not the
same as redirection, but maybe it's good enough?
-- 
Ambibibentists unite!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]