This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to run GNU Emacs from Windows icon


On 6/4/2009 12:10 PM, David Karr wrote:
On 6/2/2009 7:18 AM, Ken Brown wrote:
On 6/2/2009 5:30 AM, Marc Girod wrote:
I can also start a Cygwin window, and run GNU emacs there (with a -nw
option).
It starts, although doesn't work well. The keyboard bindings are weird
for a
start (e.g. C-x C-c gives in fact C-x C-g, which forces you to exit
with M-x
kill-emacs).
I'm sure this was discussed already.
You need to have 'tty' in your CYGWIN environment variable in order to
prevent this from happening.  But even then, you'll find that many
keystrokes don't work as expected.  If you want to run emacs in a
terminal (rather than under X), you'll get much better results with
mintty or rxvt.
But none of this addresses the OP's original problem:

emacs: Terminal type cygwin is not defined.
My guess is that this is a terminfo issue.  Try installing the terminfo0
package.

Getting back to this, I already have terminfo0 installed.

In that case, I don't know why emacs isn't recognizing the cygwin terminal type. It does for me. But I don't think it's worth investing a lot of time in debugging this, since, as I said before, emacs doesn't work well in the Cygwin console anyway.


A better option would be to make a shortcut that runs mintty or rxvt with a command to start emacs. Even better, since you already have an X server running, you could use something like the following (which is the way I usually start emacs when I have an X server running):

$ cat bin/startemacs.bat
@echo off
SET DISPLAY=127.0.0.1:0.0
SET CYGWIN_ROOT=\cygwin-1.7
SET RUN=%CYGWIN_ROOT%\bin\run
SET PATH=%CYGWIN_ROOT%\bin;%PATH%
%RUN% bash -l -c /usr/bin/emacs&

The target of my windows shortcut is then

D:\cygwin-1.7\bin\run.exe D:\cygwin-1.7\home\kbrown\bin\startemacs.bat

Ken

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]