From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Alekseyev Newsgroups: gmane.emacs.help Subject: Re: Programatically suppress "Async Shell command" buffer Date: Fri, 10 Jul 2009 07:01:55 -0400 Message-ID: <14cd9a5d0907100401n7e388abcq34e72dc4be6666a3@mail.gmail.com> References: <24355670.post@talk.nabble.com> <2702DED8-7711-42E2-949C-440239CAFB09@Web.DE> <36fa957b-7ba4-4b94-be8c-1ec19822d59c@h31g2000yqd.googlegroups.com> <2e8f281a-216c-4b92-8cc0-b2931541b015@h11g2000yqb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1247223849 10810 80.91.229.12 (10 Jul 2009 11:04:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jul 2009 11:04:09 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Peter Dyballa Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 10 13:04:02 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MPDtZ-0001Qb-IU for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Jul 2009 13:04:01 +0200 Original-Received: from localhost ([127.0.0.1]:49905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPDtX-000314-Fm for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Jul 2009 07:03:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MPDrf-0002VO-91 for help-gnu-emacs@gnu.org; Fri, 10 Jul 2009 07:02:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MPDra-0002NK-Lm for help-gnu-emacs@gnu.org; Fri, 10 Jul 2009 07:02:02 -0400 Original-Received: from [199.232.76.173] (port=49195 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPDra-0002N3-9o for help-gnu-emacs@gnu.org; Fri, 10 Jul 2009 07:01:58 -0400 Original-Received: from mail-bw0-f213.google.com ([209.85.218.213]:62012) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MPDrZ-000114-OA for help-gnu-emacs@gnu.org; Fri, 10 Jul 2009 07:01:57 -0400 Original-Received: by bwz9 with SMTP id 9so821596bwz.42 for ; Fri, 10 Jul 2009 04:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=RpbvqZwJgZ9VSHO94x3tW0ptHt4rvCbnm2qNZQxbTW8=; b=vALimukKNYqmPSs9V22qnNVRAJlEKXyfy+95d/FdyHo1XqdPU50zqFkPPHOq+x1f3L wMNAeQyAPEGrGZMJcUNLVgWXnLifkWlZ+oASZ8oYzmWXZVVXqeQoyymidCig3Y3VPq1w LhKLWbHIkURXh1BFRVXItvs4sd1G3KtURoxrw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=eqmKVT/hOjnGbOGXIElGfkbM+PZnjipJSoNJxaaAddKIm+bpsiIHjZBKupANoPDA+8 DbT5qWYnQHYwHvb0MM33I2YYUuZLnLIF4nnRNL7W1LS91qDP+4qYGmrU66mfaQXgljKb avPH6Dz/mgROcUml5WhSph3ijE/uHZg9Bqi3Y= Original-Received: by 10.204.61.9 with SMTP id r9mr1818210bkh.76.1247223715871; Fri, 10 Jul 2009 04:01:55 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65926 Archived-At: I already solved the problem by simply turning off the read-only property of the dired buffer. I am interested to see if there is a better fix though: (defun terminal-here () "Launch external terminal in the current buffer's directory or current di= red directory. (Works by grabbing the directory name and passing as an argumen= t to a batch file. Note the (toggle-read-only) workaround; the command will not= run in dired mode without it." (interactive) (let ((dir "") (diredp nil)) (cond ((and (local-variable-p 'dired-directory) dired-directory) (setq dir dired-directory) (setq diredp t) (toggle-read-only) ) ((stringp (buffer-file-name)) (setq dir (file-name-directory (buffer-file-name)))) ) (shell-command (concat "~/bin/mrxvt_win.bat \""dir"\" 2>/dev/null &") (universal-argument)) (if diredp (toggle-read-only)) )) On Fri, Jul 10, 2009 at 6:48 AM, Peter Dyballa wrote: > > Am 10.07.2009 um 05:30 schrieb dnquark: > >> To add: I can redirect the command output to /dev/dull, but the >> problem is that I cannot run the command in a dired buffer since it is >> read-only. =A0Is there a way to specify that the command produces no >> output so that it could be possible to run in a read-only buffer,e.g. >> dired? > > > I don't understand what you are trying to express. Can you give a detaile= d > example? With actual shell commands? A picture (ASCII) of the dired buffe= r > before and afterwards? And another example when you launched GNU Emacs wi= th > -Q and applied the same example? > > -- > Greetings > > =A0Pete > > You can learn many things from children. =A0How much patience you have, f= or > instance. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=96 Frankl= in P. Jones > >