I got it :) After reading http://orgmode.org/cgit.cgi/org-mode.git/tree/lisp/ob-shell.el#n57, I found I can simply specify the shell name in the block. On Fri, Sep 23, 2016 at 6:50 PM Fabrice Popineau < fabrice.popineau@centralesupelec.fr> wrote: > 2016-09-23 10:32 GMT+02:00 Xi Shen : > >> Hi, >> >> On my Windows system, I have Cygwin setup, with Emacs as part of the >> Cygwin installation. >> > > Cygwin Emacs is not a native Emacs (AFAIK). The difference is in the way > it groks pathnames > and other stuff like the default shell. > > I also setup my Cygwin environment to use zsh. I started my Emacs from >> this zsh environment. I think that's where org inherited this setting. >> >> I think when org execute my block, it some how assumed that it should use >> the same shell at the remote end. >> > > The portion of code I pointed out does not make sense to me and it may be > responsible for your problem. > > Fabrice > -- Thanks, David S.