[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: Cygwin environment for w3m



In [emacs-w3m : No.11923] Uday S Reddy wrote:
> 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"))

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).

> 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"))

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.)