From: Kay Ulbrich <news_nospam@web.de>
Subject: Emacs-Lisp question about "shell-command"
Date: Thu, 19 Feb 2004 12:32:00 +0100 [thread overview]
Message-ID: <6wsmh7l2z3.fsf@pino.iskp.uni-bonn.de> (raw)
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
next reply other threads:[~2004-02-19 11:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-19 11:32 Kay Ulbrich [this message]
2004-02-19 14:39 ` Emacs-Lisp question about "shell-command" Joakim Hove
2004-02-19 16:01 ` Floyd Davidson
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=6wsmh7l2z3.fsf@pino.iskp.uni-bonn.de \
--to=news_nospam@web.de \
/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.