all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Spittel <mspittel@kite.ssc.wisc.edu>
Subject: Re: eshell and jobs
Date: 30 Jan 2003 15:03:49 -0600	[thread overview]
Message-ID: <2i3cnaqrii.fsf@kite.ssc.wisc.edu> (raw)
In-Reply-To: 87of5yidod.fsf@alice.dynodns.net

Thank you for your response John.  
Actually, when I inserted Kai's original suggested code in my .emacs
file, (see below), in eshell all I had to do was type

ec program inputfile &

and eshell gave me the fact that the jobs was running in a buffer called
*compilation*.  When it was done, it then told me in that same buffer
that the job was completed.

Kai's suggested code-------snip here-----------

 (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)                          
----------end of snip-------

But when I put in the code you suggested into my .emacs, eshell still
told me the job was done in the command line, and it did not create a
new buffer by the name of *eshell.job.finished*.  In other words, it
behaved as the eshell we all know and love :-)

I know I'm going to show my utter ignorance for elisp in the following
question, but is there anything inherently 'wrong' with using the code
that Kai suggested?

thanks
mike


John Wiegley <johnw@gnu.org> writes:
> You will have to rewrite `eshell-remove-process-entry', so that it
> inserts something into a buffer rather than calling message.  For
> example:
> 
> (defun eshell-remove-process-entry (entry)
>   "Record the process ENTRY as fully completed."
>   (if (and (eshell-processp (car entry))
> 	   (nth 2 entry)
> 	   eshell-done-messages-in-minibuffer)
>       (with-current-buffer (get-buffer-create "*eshell.job.finished*")
>         (insert (format "[%s]+ Done %s" (process-name (car entry))
> 	  	         (process-command (car entry))))))
>   (setq eshell-process-list
> 	(delq entry eshell-process-list)))
> 
> John

-- 
-Mike Spittel

--------------------------------------------------------------------
Michael Ludwig Spittel    O    (=> Center for Demography and Ecology
  Tel: (608) 256-7742   )/\_,_[__] University of Wisconsin-Madison  
  Fax: (608) 262-8400   T>_   |  | 1180 Observatory DR.             
Email: mspittel@ssc.wisc.edu  +  + Madison, WI  53706               
--------------------------------------------------------------------

  reply	other threads:[~2003-01-30 21:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-28 17:27 eshell and jobs Michael Spittel
2003-01-28 17:39 ` David Kastrup
2003-01-28 18:17   ` Michael Spittel
2003-01-29  7:20 ` Kai Großjohann
2003-01-29 13:16   ` eshell and jobs. THANK YOU KAI Michael Spittel
2003-01-29 15:52   ` eshell and jobs Kai Großjohann
2003-01-29 16:20     ` Romain FRANCOISE
2003-01-29 16:41       ` Michael Spittel
2003-01-29 18:54     ` Kevin Rodgers
2003-01-29 19:11   ` Stefan Monnier <foo@acm.com>
2003-01-30 20:28     ` John Wiegley
2003-01-30 20:29 ` John Wiegley
2003-01-30 21:03   ` Michael Spittel [this message]
2003-01-30 21:56     ` John Wiegley
2003-01-30 22:25       ` Michael Spittel
2003-01-31 14:34       ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2i3cnaqrii.fsf@kite.ssc.wisc.edu \
    --to=mspittel@kite.ssc.wisc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.