This is the mail archive of the cygwin@sourceware.cygnus.com 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]

Emacs, NT & cygwin bash


Hi,

I am not sure if my question is more cygwin than emacs, but some of you might
have faced (and solved) the same problem.

I am using GNU Emacs 20.5.1 and wanted to use Cygwin 20.1 bash (which works fine
in its
MS-DOS window) in the emacs shell window.

So I did put the following lines (coming form the cygwin FAQ) in my ~/.emacs
file

        ; to allow the use of Cygwin bash
        (load "comint")
        (fset 'original-comint-exec-1 (symbol-function 'comint-exec-1))
        (defun comint-exec-1 (name buffer command switches)
          (let ((binary-process-input t)
                (binary-process-output nil))
            (original-comint-exec-1 name buffer command switches)))

and everything worked fine.

Then I wanted to use the 'grep', 'find-grep-dired', 'grep-find' and all ediff
emacs commands.
As the ediff commands did not work fine with the diff and diff3 cygwin commands,
I imported the
win32gnu diff and diff3 commands and again, it did the trick.

But the other commands ('grep', 'find-grep-dired', 'grep-find') where not
working as the 'grep' and
'find' executed by emacs were not cygwins' but those form MS-DOS ;-(
To correct this, I added my cygwin bin path as the first path in the emacs
execution path
(setq exec-path ...) but it did not work.

Then I added the following lines to my .emacs

        ; to allow bash to be found
        (setq exec-path (cons "c:/Progra~1/Cygnus/B20/cygwin~1/H-i586~1/bin"
        exec-path))

and so the additional file .emacs_bash was sourced by the emacs shell (I could
see that
the first path in the emacs shell PATH variable was the cygwin bin path) but it
did not worked neither.

So then as a last test, I added the cygwin path as the first path in the NT
system variable path (which is
something that I don't want so as to prevent MS-DOS scripts to erroneously
execute cygwin
commands) and again the 'grep', 'find-grep-dired', 'grep-find' emacs commands
did not work
properly.

Is there something I can do to prevent emacs to use MS-DOS 'grep' and MS-DOS
'find'
except deleting GREP.EXE and FIND.EXE ?

(Because I know that the cygwin commands 'find' and 'grep' would work find with
the emacs commands)

thanks

Stephane



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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