- Create a shortcut in the taskbar that launches Emacs for Windows
- Have Emacs for Windows obey the Emacs configuration from Cygwin
- Avoid opening extra console windows
Some prerequisites,
- I'm running Emacs for Windows from https://ftp.gnu.org/gnu/emacs/windows/.
- I'm running Cygwin64 in c:/cygwin64, although this works for 32-bit Cygwin as well.
I created a file called c:\cygwin64\emacs.bat with the following contents.
c:\cygwin64\bin\run bash.exe -c ~/dotfiles/bin/emacs.sh
The file ~/dotfiles/bin/emacs.sh is a shell script that sits in my Cygwin directory. It is a wrapper script that calls Emacs for Windows if I'm running Cygwin.
It is assumed that the default Emacs configuration sits in the ~/.emacs file under Cygwin.
Pin the c:\cygwin64\emacs.bat script to your task bar. See below if you do not know how to do this. Clicking on it will open Emacs for Windows without any intervening console windows.
References
Pinning a batch script to the Windows taskbar. https://superuser.com/questions/100249/how-to-pin-either-a-shortcut-or-a-batch-file-to-the-new-windows-7-8-and-10-task
No comments:
Post a Comment