[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shell-command in Windows 7

From: 42 147
Subject: Re: shell-command in Windows 7
Date: Fri, 14 Apr 2017 19:49:17 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

That's much better! I forgot to mention that even when the earlier code worked, I always got the follow error:

(Shell command failed with code 1 and no output)

Which slightly annoyed me, even if it was only a side-effect of the desired functionality.

But now I get what I want minus the error message.

Am 4/14/2017 um 7:13 PM schrieb John Mastro:
(defun open-buffer-directory (buffer)
        (list (if current-prefix-arg
                  (read-buffer "Open buffer directory: " nil t)
       (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))))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]