This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin Emacs and windows paths


On 03/10/2012 01:17 AM, Leo wrote:
Now my normal Windows paths copied from Windows Explorer don't work
anymore in Emacs - and vice versa. I know I can use `cygpath` to
convert /on the command line/, but is there any integration for this
in Cygwin Emacs?
I prefer to wrap everything in a shell script.  This is the one I use,
though I actually use "cygpath -w" because I still use NTemacs
because I don't always start X.

EVAL isn't needed but I make all my shell scripts work with -n or
--dry-run so I can see what would happen.

 #!/bin/sh
 ARGS=();  EVAL=eval;  EMACS=emacs;  AMP='&'
 while [ $# -gt 0 ]; do
     case "$1" in
         -e|--existing)    EMACS='emacsclient --no-wait';  AMP=  ;;
         -n|-nn|--dry-run) EVAL='echo #'                         ;;
         -*|+*)            ARGS[${#ARGS[*]}]="'$1'"              ;;
         *)                ARGS[${#ARGS[*]}]="'$(cygpath "$1")'" ;;
     esac
     shift
 done
 $EVAL $EMACS "${ARGS[@]}" "$AMP"

-Ken Jackson

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]