From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: shell-command in Windows 7 Date: Fri, 14 Apr 2017 10:13:22 -0700 Message-ID: References: <40b3fe49-18cb-c7bc-5792-98e0a7c7c8e6@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1492190053 23878 195.159.176.226 (14 Apr 2017 17:14:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Apr 2017 17:14:13 +0000 (UTC) Cc: 42 147 To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 14 19:14:10 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cz4nP-00062m-Il for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Apr 2017 19:14:07 +0200 Original-Received: from localhost ([::1]:54021 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cz4nV-0008Un-G6 for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Apr 2017 13:14:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cz4n3-0008Ui-8x for help-gnu-emacs@gnu.org; Fri, 14 Apr 2017 13:13:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cz4n1-00024b-W1 for help-gnu-emacs@gnu.org; Fri, 14 Apr 2017 13:13:45 -0400 Original-Received: from mail-qt0-x235.google.com ([2607:f8b0:400d:c0d::235]:34057) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cz4n1-00024P-RJ for help-gnu-emacs@gnu.org; Fri, 14 Apr 2017 13:13:43 -0400 Original-Received: by mail-qt0-x235.google.com with SMTP id c45so68453567qtb.1 for ; Fri, 14 Apr 2017 10:13:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=M/Upkj4LRGqYgvgNMEjoq6EX2DZJvWMWTiHjxtg7BwA=; b=rDnXfDCY0FfrmW6T6UYYXTQl1Lx5GZ+TnkMRtv6sawLgsL82EObMuc8sebFAbZNno7 b06QV/KVyWkiMM6miLVSGqlh03z6pVLUYn9fepSgH92VHlRwi+BQhvnAjj16Gqk+J7eR O5aCbqFnPom84VgiUxouXnuFsCeajlQCqyQp9JtC5FKHaYxyB5N7E73dLBM0NuV50Gh1 ph7TdnIPDOR4swoG7ejUFkvpn5ha9Aa7cfMyNuhye6bUmywT42Zq2nJRCVLY64GuKfWo hNFXReq001S+i0wVLnvfEm4eSS7NoIFDONrk82UG0Ziipy5xRC4HWxUzlr1kqrMPS/LN D3Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=M/Upkj4LRGqYgvgNMEjoq6EX2DZJvWMWTiHjxtg7BwA=; b=A4HU2419VjWaSdWLb2inxFj1dzu8iQIgtHozK2Z3Yg0dIq7ylS7w/JzzMo8jJ4Xpp5 m/4881KraG2apuFVahDZ4WeGYxUkggIxb/w9PeiWh3HeQ+bCaYQBLhhBxH9ceXa+uuLJ XA43WzvwYbVZKmRkzkDH+CqgkK7SiolDx0AW/XiZYxzbgrwuUx56Utm/YPX5kfWBz+JC NT0Fr+gnUFXkVOOCwaGXx9ST383TFUwTDTYpb/QRdFirMm2StmVDZXn+pHEVoSvdbNg2 ePrB4e8PDe2OAMtu9+As6XtdzyiKj2IU75rUOr3ypOVKdGiypfF9N/t56dfKE33MsQb/ rMPw== X-Gm-Message-State: AN3rC/47zXiIEltW7NlAT074pTlJOGbfb4NjqJt9sdpg02D4+o5wcpcm ODT2bKoaNTvTtIQicXlhSO1iMfM8BgjURaY= X-Received: by 10.237.62.46 with SMTP id l43mr7788152qtf.88.1492190023017; Fri, 14 Apr 2017 10:13:43 -0700 (PDT) Original-Received: by 10.237.32.9 with HTTP; Fri, 14 Apr 2017 10:13:22 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::235 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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 Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112764 Archived-At: John Mastro wrote: > (defun open-buffer-directory (buffer) > (interactive > (if current-prefix-arg > (read-buffer "Open buffer directory: " nil t) > (list (current-buffer)))) > (with-current-buffer buffer > (let ((file (buffer-file-name))) > (if file > (w32-open-file (file-name-directory file)) > (user-error "Buffer `%s' is not visiting a file" (buffer-name)))))) Oops, bad `interactive' spec. That should be: (defun open-buffer-directory (buffer) (interactive (list (if current-prefix-arg (read-buffer "Open buffer directory: " nil t) (current-buffer)))) (with-current-buffer buffer (let ((file (buffer-file-name))) (if file (w32-open-file (file-name-directory file)) (user-error "Buffer `%s' is not visiting a file" (buffer-name))))))