Just a small tip. I have souced and makefile on remote machine and I’m trying to compile it on my local machine, but I don’t have the compiler and environment. So when I run “M-x compile“, I use a build_remote.sh script with following contents
ssh my_remote_machine "source my_environment_file; cd my_build_directory; make my_target"
ssh command are executed not in your common environment, so you have to import it before execution of main commands (I use source command with some script to configure environment)
*compilation* buffer would receive stdout from remote make and you even would be able to navigate through compiler errors in your local code (if you have correct paths)
I’ve had a quite big C++ source file, copied from Windows with ^M symbol after each line. After any scrolling downside Emacs 24.2 hanged up and the only option was to kill it.
Due to the fact that my .emacs configuration is quite big, I started with binary search, commenting out parts of lisp code. After few minutes I’ve figured out, that the problem lies in .gnu-emacs file, so I moved with binary search to that file.
Within 5 minutes, source of the problem was found:
(setq-default inhibit-eol-conversion t)
After commenting this line, Emacs was resurrected!
Recently I had issue with CEDET 1.1: semantic was not able to parse header files from Visual Studio, when using
(semantic-add-system-include “C:/Program Files/Microsoft Visual Studio 10.0/VS/Include” ‘c++-mode)
But after looking through Visual Stuio headers in Studio itself, I’ve found some headers with defines, which are new to semantic, so you have to add them after this system include in your .el files:
(defun windows-semantic-hook ()
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include")
(concat microsoft-base-dir "/crtdefs.h"))
(concat microsoft-base-dir "/yvals.h"))
(concat microsoft-base-dir "/vadefs.h"))
(concat microsoft-base-dir "/comdefsp.h"))
(semantic-add-system-include microsoft-base-dir 'c++-mode)
(add-to-list 'auto-mode-alist (cons microsoft-base-dir 'c++-mode)))
(add-hook 'semantic-init-hooks 'windows-semantic-hook)
I’ve managed to put together some interesting things with Emacs for Windows. For now we have:
- Emacs 24.2 for Windows
- Auto-Complete 1.3.1
- Custom themes (using tango in current zip)
- Ocaml support (ocaml mode, eval and highlighting)
- Git user interface 1.0 support (with git blame)
- Ropemacs + Pylint + Flymake (Python IDE + static analysis)
- Fixes for Cygwin, gnu and git pathes in Windows
Continue reading Emacs 24.2 with Python and C++ bundle for Windows