emacs-devel
[Top][All Lists]
Advanced

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

Re: Cygwin patches


From: Davis Herring
Subject: Re: Cygwin patches
Date: Sat, 21 Nov 2009 21:25:18 -0800 (PST)
User-agent: SquirrelMail/1.4.8-5.7.lanl7

> +  (if (eq system-type 'cygwin)
> +      (let ((winfile (shell-command-to-string (concat
> +                       "cygpath -m " (shell-quote-argument file)))))
> +     (setq file (concat "file://" (substring winfile 0 -1)))))

I would instead bind winfile to

(with-output-to-string
  (call-process "cygpath" nil standard-output nil "-m" file))

(using, like `shell-command-to-string' does, the undocumented feature that
`with-output-to-string' causes `standard-output' to be a temporary
buffer).  Then you don't have to worry with `shell-quote-argument'.

> When I try to test this in emacs 23.1, I get an error
>
>    if: Wrong number of arguments: called-interactively-p, 1
> [...]
> I don't know what's going on.  Can you help?

That version of browse-url.el is incompatible with (newer than) 23.1.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.




reply via email to

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