Eli, Thanks for the reply. Actually, M-x shell runs a "DOS" shell. And my PATH environment variable is set to include the Cygwin bin directory, with that entry at the end of the PATH list. Thus the "DOS" shell started from Emacs or started independently both find cygwin diff.
> My crystal ball says that your PATH outside Emacs and exec-path inside Emacs are different, which is probably the consequence of the fact that you mix Cygwin tools with a native Windows port of Emacs. > So "M-x shell" invokes the Cygwin Bash, which finds diff in some fake /usr/bin directory, but Emacs looks for diff on PATH, which doesn't include the directory mounted by Cygwin as /usr/bin (or whatever). > Keep PATH and exec-path identical, and you will keep your sanity.