Interest in Emacs patched to handle Windows paths?

Kaz Kylheku 920-082-4242@kylheku.com
Sat Jul 27 18:27:00 GMT 2019


On 2019-07-26 13:08, Soegtrop, Michael wrote:
> Dear Kaz,
> 
>> You might be interested in the Cygnal project:
>> http://www.kylheku.com/cygnal/
> 
> from your description I would think this doesn't work for Emacs. Emacs
> has its own functions for path management, e.g. to decide what an
> absolute path is.

Yes, like this:   :)

   C:\Users\kaz>txr
   This is the TXR Lisp interactive listener of TXR 221.
   Quit with :quit or Ctrl-D on empty line. Ctrl-X ? for cheatsheet.
   1> (abs-path-p "C:\\foo")
   t
   2> (abs-path-p "C:foo")
   nil
   3> (abs-path-p "/foo")
   t

Cygnal is not a magic fix for programs that manipulate path; it provides 
a POSIX-like system interface, but which takes Windows paths. If the 
program manipulates paths, that has to be ported/extended to support 
Windows paths.

What it provides is that the open() system call and others understand 
drive letter names and such.

chdir() understands the concept of a per-drive current working 
directory, and the "currently logged drive". Check this out:

   4> (chdir "f:") ;; basically a bare interface to the chdir syscall
   t
   5> (pwd) ;; wrapper for getcwd
   "F:/"
   6> (chdir "c:")
   t
   7> (pwd)
   "C:/Users/kaz"
   8>

If you want a program ported to Windows via Cygwin to understand native 
conventions, Cygnal goes a long way.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list