[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 16:52:01 +0100 |
User-agent: |
Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3.50 (i686-pc-linux-gnu) |
kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:
A code explanation was requested. I basically copied from
eshell/make, so I don't fully grok it. Here comes what I know:
> (defun eshell/ec (&rest args)
If you type "foo" at an eshell prompt, eshell will look for the Lisp
function eshell/foo first thing and run that if it exists.
> "Use `compile' to do background makes."
> (if (eshell-interactive-output-p)
It seems the `then' branch here is what is normally invoked. I have
no idea what the `else' branch does. John, are you listening?
> (let ((compilation-process-setup-function
> (list 'lambda nil
> (list 'setq 'process-environment
> (list 'quote (eshell-copy-environment))))))
This copies the current environment so that `compile' will pick it up.
> (compile (eshell-flatten-and-stringify args))
To see what compile does, type M-x compile RET and enter some shell
command. The eshell-flatten-and-stringify just takes the rest of the
command line args and munges them until they are what `compile'
expects. (I think `compile' expects just a single string, so I guess
that eshell-flatten-and-stringify concats all args, separated with
spaces.)
> (pop-to-buffer compilation-last-buffer))
Make sure to display the *compilation* buffer.
> (throw 'eshell-replace-command
> (let ((l (eshell-stringify-list (eshell-flatten-list args))))
> (eshell-parse-command (car l) (cdr l))))))
Can anyone explain what this might mean?
> (put 'eshell/ec 'eshell-no-numeric-conversions t)
It seems that eshell can recognize numbers and do something with
them. But what?
--
Ambibibentists unite!