emacs-devel
[Top][All Lists]
Advanced

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

Re: problems with emacsclient started by cygwin programs (mswindows)


From: layer
Subject: Re: problems with emacsclient started by cygwin programs (mswindows)
Date: Mon, 27 Jun 2011 13:43:57 -0700

OK, changes below for my proposed hook.  Comments welcome.

If I've not submitted this correctly and there's a FAQ about
submitting, please point me to it and I'll gladly do it some other
way.

Thanks.

Kevin

$ diff -u /usr/share/emacs/23.2/lisp/server.el server.el
--- /usr/share/emacs/23.2/lisp/server.el        2010-04-10 12:31:19.000000000 
-0700
+++ server.el   2011-06-27 13:36:14.000000000 -0700
@@ -145,6 +145,14 @@
   :group 'server
   :type 'hook)
 
+(defcustom server-filename-frob-function nil
+  "Hook run on filename passed by client (using the -file in the protocol)
+used to possibly transform the filename in a form better suited for use
+by the Emacs server.  This might include transforming Cygwin paths on
+Windows into something the Emacs server can use."
+  :group 'server
+  :type 'hook)
+
 (defvar server-process nil
   "The current server process.")
 
@@ -988,6 +996,8 @@
                  (let ((file (pop command-line-args-left)))
                    (if coding-system
                        (setq file (decode-coding-string file coding-system)))
+                   (when server-filename-frob-function
+                     (setq file (funcall server-filename-frob-function file)))
                     (setq file (expand-file-name file dir))
                    (push (cons file filepos) files)
                    (server-log (format "New file: %s %s"
$ 



reply via email to

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