From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kay Ulbrich Newsgroups: gmane.emacs.help Subject: Emacs-Lisp question about "shell-command" Date: Thu, 19 Feb 2004 12:32:00 +0100 Organization: none Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <6wsmh7l2z3.fsf@pino.iskp.uni-bonn.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1077191845 23925 80.91.224.253 (19 Feb 2004 11:57:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Feb 2004 11:57:25 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 19 12:57:20 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Atmnw-0002Lq-00 for ; Thu, 19 Feb 2004 12:57:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Atmg9-0006iC-Jb for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Feb 2004 06:49:17 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: pino.iskp.uni-bonn.de Original-X-Trace: quimby.gnus.org 1077190320 9225 131.220.220.199 (19 Feb 2004 11:32:00 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Thu, 19 Feb 2004 11:32:00 +0000 (UTC) User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/20.7 (gnu/linux) Cancel-Lock: sha1:xKhlBGSXXEliOrBliI1QB+SDbcM= Original-Xref: shelby.stanford.edu gnu.emacs.help:121041 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:16991 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16991 Hello! Under Linux (version information see end of message) I am using a simple emacs-lisp function (the actual function is more complex, but this question is just about "shell-command"): ;; __________________________________________________ (defun my-command () (interactive) (let (command) (setq command ("some-shell-command-generating-output &")) (shell-command command "buffername") )) ;; __________________________________________________ When executing the function from an unsplit emacs-frame, the window is split and the output of the shell is written into the newly appeared window, which containins the buffer "buffername". This obviously is the default behaviour of "shell-command". Is there an easy way to run the command without a new window appearing, i.e., having the buffer created but not shown automatically, so that my visible windows are not changed? I do not want to open a new frame to run the function in. Using (replace-buffer-in-windows "buffername") as the last command in the function just did this, when I had the frame split into two halves right away. Output of "M-x emacs-version": GNU Emacs 21.3.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2004-01-19 on HOSTNAME Thank you for advice! Kay