I set the coding as utf-8, and I got many ^M from eshell on Windows. There's utf-8-dos and utf-8-unix. I would like to use the same configuration file on both unix and Windows. I guess there are many people work on the two system from time to time. How do you handle this?

  • I see you've been asking a few Windows related questions. I too work on Windows a lot. My solution is close to being a non-answer, so I'll post it as a comment: I use Cygwin. It's just so much better there's really no comparison. It eliminates many coding issues (I keep all the Emacs defaults). I use 32-bit because it's compatible with more software. I also use the Emacs package with native Windows GUI (called "emacs-w32"). It makes TRAMP usable with no configuration besides installing Cygwin ssh/gnutls/inetutils packages. And of course you get all the great *nix and GNU software. – nanny Jan 6 '15 at 14:45
  • Hmm. I don't use emacs on windows, but in my experience, emacs auto-detects the line ending conventions with a near 100% success rate. So I am afraid I don't quite understand your problem … oh wait, I just noticed the reference to eshell. That changes things a bit. Hang on, I'll have more to say in a moment … – Harald Hanche-Olsen Jan 6 '15 at 19:19
  • So, you want just one configuration file, which is fine, but then some things need to be different depending on the OS. Two useful variables to use are system-type and window-system (the latter is non-nil only in GUI emacs). Check out their values on the systems you usually run on, then conditionalize your configuration as needed using these variables. – Harald Hanche-Olsen Jan 6 '15 at 19:30
  • For the last month or so I've been "returning to Windows" that that includes Emacs. Like nanny, I'm going the W32 route but with sourceforge.net/projects/ezwinports instead of cygwin. That is the GNU Emacs endorsed approach and I like it because it is 'just a download' instead of asking someone to use cygwin. I will post my updated config within a month because thus far it has worked fine. All of the "on-windows" macro calls make it work right, at least for me. – grettke Jan 6 '15 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.