help-gnu-emacs
[Top][All Lists]
Advanced

[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 21:48:10 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

It's also much faster. Zero launch lag.

Is this better because it is based on newer Emacs, or is it just better? What was wrong with the old code?

Anyway, much thanks.


Am 4/14/2017 um 7:13 PM schrieb John Mastro:
John Mastro <john.b.mastro@gmail.com> 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))))))




reply via email to

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