Discussion:
[VM] Cygwin environment for w3m
Uday S Reddy
2012-11-18 14:12:49 UTC
Permalink
Emacs-w3m is setting the CYGWIN environment variable to "binmode tty".
Unfortunately, the tty option is obsolete. It generates a warning
message like:

"tty" option detected in CYGWIN environment variable.
CYGWIN=tty is no longer supported. Please remove it from your
CYGWIN environment variable and use a terminal emulator like mintty,
xterm, or rxvt.

The setting of w3m-command-environment in w3m.el should be changed.

Temporary work-around for users: Put this in your ~/.emacs-w3m file:

; Fix the CYGWIN environment variable
(when (eq system-type 'windows-nt)
(setcdr (assoc "CYGWIN" w3m-command-environment)
"binmode"))

Cheers,
Uday Reddy
Katsumi Yamaoka
2012-11-19 02:12:28 UTC
Permalink
Post by Uday S Reddy
Emacs-w3m is setting the CYGWIN environment variable to "binmode
tty". Unfortunately, the tty option is obsolete. It generates a
"tty" option detected in CYGWIN environment variable.
CYGWIN=tty is no longer supported. Please remove it from your
CYGWIN environment variable and use a terminal emulator like mintty,
xterm, or rxvt.
The setting of w3m-command-environment in w3m.el should be changed.
; Fix the CYGWIN environment variable
(when (eq system-type 'windows-nt)
(setcdr (assoc "CYGWIN" w3m-command-environment)
"binmode"))
Thanks for the info. But in my Emacs built on Cygwin[1], I've
never seen the value of system-type is windows-nt; that is just
cygwin. So, I've never had a chance the env var CYGWIN is set
(actually CYGWIN is not set in my xterm).
Post by Uday S Reddy
; Fix the CYGWIN environment variable
(when (eq system-type 'windows-nt)
(setcdr (assoc "CYGWIN" w3m-command-environment)
"binmode"))
You can change the value of w3m-command-environment as you like
since it is a user option that only provides a default value,
but it's good to change emacs-w3m so as to provide a valid one,
not an obsolete one, as the default. Could you let us know what
is the best way to change this?

(defcustom w3m-command-environment
[...]
(if (eq system-type 'windows-nt)
(cons "CYGWIN" "binmode tty"))

[1] uname -a
CYGWIN_NT-6.1 localhost 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin
(I'm updating my Cygwin installation almost every day.)
Uday S Reddy
2012-11-19 07:40:40 UTC
Permalink
Greetings, Katsumi-san! It has been a long time since we have seen you on
the VM forum!
Post by Katsumi Yamaoka
Thanks for the info. But in my Emacs built on Cygwin[1], I've
never seen the value of system-type is windows-nt; that is just
cygwin. So, I've never had a chance the env var CYGWIN is set
(actually CYGWIN is not set in my xterm).
Yes, Cygwin Emacs will regard cygwin as its system-type. Windows Emacs
regards windows-nt as its system-type. We can still run Cygwin processes
from inside Windows Emacs, obviously.
Post by Katsumi Yamaoka
You can change the value of w3m-command-environment as you like
since it is a user option that only provides a default value,
but it's good to change emacs-w3m so as to provide a valid one,
not an obsolete one, as the default. Could you let us know what
is the best way to change this?
(defcustom w3m-command-environment
[...]
(if (eq system-type 'windows-nt)
(cons "CYGWIN" "binmode tty"))
The minimal change would be just:

(defcustom w3m-command-environment
[...]
(if (eq system-type 'windows-nt)
(cons "CYGWIN" "binmode"))

I presume that "binmode" is there for a good reason. So, no need to modify
it.

Cheers,
Uday
Katsumi Yamaoka
2012-11-19 08:43:54 UTC
Permalink
Post by Uday S Reddy
Greetings, Katsumi-san! It has been a long time since we have seen you on
the VM forum!
Yeah, I was having fun on the VM code in the past. Kyle Jones
and the successors are all great!

[...]
Post by Uday S Reddy
Yes, Cygwin Emacs will regard cygwin as its system-type. Windows Emacs
regards windows-nt as its system-type. We can still run Cygwin processes
from inside Windows Emacs, obviously.
I see. I've changed the default value of CYGWIN to binmode for
the windows-nt system, in CVS.

Thanks.

Loading...