emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 7466a4d: Cygwin emacsclient handles w32 file na


From: Ken Brown
Subject: Re: [Emacs-diffs] master 7466a4d: Cygwin emacsclient handles w32 file names
Date: Sat, 04 Jul 2015 11:20:27 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 7/2/2015 3:48 PM, Ken Brown wrote:
So I would be much more comfortable with this change if you added a check for a
file name starting with a drive letter.  And it might also be good to add a
comment explaining the intended use, in which Windows passes a full file path to
emacsclient.

Something like the following is what I had in mind:

diff --git a/lisp/server.el b/lisp/server.el
index ce19b3c..46687a3 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1167,8 +1167,11 @@ The following commands are accepted by the client:
                  (let ((file (pop args-left)))
                    (if coding-system
                        (setq file (decode-coding-string file coding-system)))
+                   ;; Allow Cygwin's emacsclient to be used as a file
+                   ;; handler on MS-Windows, in which case FILENAME
+                   ;; might start with a drive letter.
                    (when (and (eq system-type 'cygwin)
-                              (fboundp 'cygwin-convert-file-name-from-windows))
+                              (string-match "^[A-Za-z]:" file))
                      (setq file (cygwin-convert-file-name-from-windows file)))
                    (setq file (expand-file-name file dir))
                    (push (cons file filepos) files)

Ken



reply via email to

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