[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [h-e-w] emacs - set path for grep - HOWTO?
From: |
Eli Zaretskii |
Subject: |
Re: [h-e-w] emacs - set path for grep - HOWTO? |
Date: |
Sun, 27 Sep 2009 09:34:11 +0200 |
> Date: Sun, 27 Sep 2009 01:08:13 +0200
> From: Erwin Panen <address@hidden>
>
> How do I set the correct variable(s) for my xemacs on a stick (using win
> XP) so that it will find grep and other utils?
> Here's how my dir struct looks:
>
> usb-drive/home/emacs-23.1/
> |-----/gnuwin32/bin/
> |---grep.exe
> |---egrep.exe
> |---
>
> This is what I've been trying to use in my .emacs file:
> (fyi: %pdrive% is a variable proper to me using Pstart (menu on usb drive)
> ------------------------------------------------------
> ;; 26-09-09 setting for grep functionality under XP
> ;;(setq exec-path (append exec-path (list "~/gnuwin32/bin/grep.exe")))
> ;;(when (string-equal system-type "windows-nt")
> ;; (progn
> ;; am not using cygwin
> ;; (setenv "PATH"
> ;; (concat
> ;; "~/gnuwin32/bin" ":"
> ;; )
> ;; )
> ;; (setq exec-path
> ;; '(
> ;; "%pdrive%/gnuwin32/bin"
> ;; )
> ;; )
> ;; ))
> ;;(add-to-list 'load-path "~/gnuwin32/bin")
> ;; (setenv "~/gnuwin32/bin")
>
> ; append
> ; (setq exec-path (append exec-path (list(expand-file-name
> "%pdrive%/home/gnuwin32/bin"))))
> ; prepend
> (setq exec-path (cons (expand-file-name "~/gnuwin32/bin") exec-path))
> -----------------------------------------------------------------------------------
>
> Alas, nothing seems to help emacs to find grep
Try using "$pdrive" instead of "%pdrive%". Emacs uses the Unix
notation for environment variables, not the Windows notation.
Note that I didn't test my suggestion, so it might not work. If it
doesn't, try using (getenv "pdrive") and concat it with the rest.