From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jerry Asher Newsgroups: gmane.emacs.bugs Subject: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) Date: Sat, 2 Apr 2016 10:50:14 -0700 Message-ID: References: <831t6nsyzy.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113da7f4d6fcc0052f8421f2 X-Trace: ger.gmane.org 1459619482 20725 80.91.229.3 (2 Apr 2016 17:51:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Apr 2016 17:51:22 +0000 (UTC) To: 23186@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 02 19:51:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1amPhX-0004Ke-PO for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Apr 2016 19:51:12 +0200 Original-Received: from localhost ([::1]:50471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amPhX-00046N-75 for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Apr 2016 13:51:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amPhR-00046C-Cw for bug-gnu-emacs@gnu.org; Sat, 02 Apr 2016 13:51:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amPhO-0004hi-3M for bug-gnu-emacs@gnu.org; Sat, 02 Apr 2016 13:51:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amPhN-0004he-UP for bug-gnu-emacs@gnu.org; Sat, 02 Apr 2016 13:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1amPhN-0005Db-NP for bug-gnu-emacs@gnu.org; Sat, 02 Apr 2016 13:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jerry Asher Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Apr 2016 17:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23186 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23186-submit@debbugs.gnu.org id=B23186.145961944220032 (code B ref 23186); Sat, 02 Apr 2016 17:51:01 +0000 Original-Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 17:50:42 +0000 Original-Received: from localhost ([127.0.0.1]:49083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amPh3-0005D1-De for submit@debbugs.gnu.org; Sat, 02 Apr 2016 13:50:42 -0400 Original-Received: from mail-vk0-f48.google.com ([209.85.213.48]:36666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amPh1-0005Cl-1C for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 13:50:39 -0400 Original-Received: by mail-vk0-f48.google.com with SMTP id c4so12321747vkb.3 for <23186@debbugs.gnu.org>; Sat, 02 Apr 2016 10:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=gO+AkMuaf+fdOUsZlDeno81tGxNWFKTk/WX4Ck460lY=; b=pbVrxjZ0C2heqtIJesbMOymF9Xgv1DCVLo1bPw1Kb6XhSZ2+oJ2JVlXjM+t6QNp5y3 OK9pEDZ+hxRmdxVGH5YDn3Q4MZcSxOxTxhDA349+AilnzNHKgR4daRFTh2GddcoPUq40 DXXN5lkYaQpHROhwTC5jhP37odoOI+befj+wGCeyFDVatTBaMzb97MVJxiuve4n38KEH J24AJ5zAf/T6ZTZOO/h0T1tO4N1a21TOaeexYe7DWwcpFUGWURBbUBUfhZA1hGDXU2cs DJDeb28Fb38cHVz1+4MiyRl8/J6ba+CxD67caGYJSlkregi27ps5r+otJqNQmQgXMx4F REhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=gO+AkMuaf+fdOUsZlDeno81tGxNWFKTk/WX4Ck460lY=; b=TSwsA06HJQO+XqLFVaxg7XFW5+iOrk8525F/cFjqVXqLgrEJhfmPzeu6d3OTyoPP+0 PYpqQkdCFlpyAVWt40BASVKWmRJjESxuC3oi6t6NUVpYqyQV+qTBOfnLxDHgmj6wAvcq jbSLhB9NyEhvxCNeq66VFkrkPPp1mJKWPNF/01ecK0JDKAZgWWx7c/ZY2uGWft7S3NZZ /2MAUEMLZstQSfTkmjuZf1vJMPQDG9QX/LIfUH8e8v+m6PE2rXYQ8uDUV9QmbaLC9/hh jlCVdSyhiav/QjqPNK+KGdsYzhGnA6acLY0xTvsqAVx1zzbvU2owHS2jeFmGJxA921sd 2uZA== X-Gm-Message-State: AD7BkJKJena34LngJW0Cco0Rdl7UleWRsuaNg6vHFB3vasI5TX6l7ni3O+gf2oVTOA4Divvjh8t6dXcR9d3nWg== X-Received: by 10.31.2.204 with SMTP id 195mr1455479vkc.18.1459619433477; Sat, 02 Apr 2016 10:50:33 -0700 (PDT) Original-Received: by 10.103.45.74 with HTTP; Sat, 2 Apr 2016 10:50:14 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115883 Archived-At: --001a113da7f4d6fcc0052f8421f2 Content-Type: text/plain; charset=UTF-8 > Tramp is designed to work with Emacs as released by the Emacs development team. That Emacs doesn't have this problem. I think it would be unreasonable for anyone to expect the Tramp maintainers to cater to arbitrary changes in the Emacs code or in how it is configured on Windows, let alone if you poke some addresses in the PE headers of the produced binary. We are ALREADY talking about a very specific setting IN emacs FOR Windows. God forbid we should ask the maintainers to discuss how emacs is configured on Windows in that context. > Your fix is AFAIK incorrect because the directory where cmd.exe lives is not necessarily C:\Windows\system32. It just happens to be there on the particular system where you tried that. And I agree, setting the variable to nil where it is guaranteed to blow up, and is reported to do so as my search shows is FAR FAR better than finding a reasonable default that will work most of the time. On Sat, Apr 2, 2016 at 10:37 AM, Jerry Asher wrote: > Your bug closing excuse is defamatory, there were no personal attacks on > you. > > There was criticism of your behavior and how you examine and respond to > bug reports. None of that constitutes a personal attack on you. > > Your closing a bug report that describes a valid bug because you dislike > how the conversation you initiated went, is support for my criticism of how > you respond to bug reports. > > > > > > > > On Sat, Apr 2, 2016 at 10:32 AM, Jerry Asher wrote: > >> Heh, a bug report is a bug report REGARDLESS of how you felt you were >> treated. >> >> Since you started off your response to me >> >> + disparaging my bug report >> + misrepresenting what I said >> + summarizing it inaccurately >> + dismissing the evidence >> >> You received in kind a report filled with frustration. >> >> I can just see other people closing bug reports that discuss a clearly >> documented and widely reported bug as seen by google searches with >> responses like "I felt reporter was mean to me so I closed this bug report." >> >> Jerry >> >> On Sat, Apr 2, 2016 at 10:28 AM, GNU bug Tracking System < >> help-debbugs@gnu.org> wrote: >> >>> Your bug report >>> >>> #23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows >>> up in a string-match >>> >>> which was filed against the emacs package, has been closed. >>> >>> The explanation is attached below, along with your original report. >>> If you require more details, please reply to 23186@debbugs.gnu.org. >>> >>> -- >>> 23186: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23186 >>> GNU Bug Tracking System >>> Contact help-debbugs@gnu.org with problems >>> >>> >>> ---------- Forwarded message ---------- >>> From: Eli Zaretskii >>> To: 23186-done@debbugs.gnu.org >>> Cc: >>> Date: Sat, 02 Apr 2016 20:26:41 +0300 >>> Subject: Re: bug#23186: 25.0.92; Tramp: Windows does not always set >>> COMSPEC, tramp blows up in a string-match >>> > Date: Sat, 02 Apr 2016 19:44:18 +0300 >>> > From: Eli Zaretskii >>> > Cc: 23186@debbugs.gnu.org >>> > >>> > What is the full contents of the environment of the Emacs process when >>> > you run that zapped binary? >>> >>> Since the OP refused to answer even the above simplest question, and >>> instead sent off-list a hostile email with personal attacks on me, I'm >>> closing this bug report. >>> >>> >>> >>> ---------- Forwarded message ---------- >>> From: Jerry Asher >>> To: bug-gnu-emacs@gnu.org >>> Cc: >>> Date: Sat, 2 Apr 2016 09:06:57 -0700 >>> Subject: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp >>> blows up in a string-match >>> >>> --text follows this line-- >>> >>> I started the 64 bit version of windows emacs from a shortcut on my >>> taskbar. I >>> created the shortcut a few minutes ago by running emacs from the command >>> line, then pinning the shortcut. (There is a big caveat and I'll discuss >>> that at the end.) >>> >>> Starting emacs up in restoring my desktop it loaded a python file. That >>> python file triggered python mode. Somewhere in there, ... >>> >>> Debugger entered--Lisp error: (wrong-type-argument stringp nil) >>> string-match("cmd\\.exe" nil) >>> (if (string-match "cmd\\.exe" tramp-encoding-shell) "/c" "-c") >>> eval((if (string-match "cmd\\.exe" tramp-encoding-shell) "/c" "-c")) >>> custom-initialize-reset(tramp-encoding-command-switch (if >>> (string-match "cmd\\.exe" tramp-encoding-shell) "/c" "-c")) >>> custom-declare-variable(tramp-encoding-command-switch (if >>> (string-match "cmd\\.exe" tramp-encoding-shell) "/c" "-c") "Use this switch >>> together with `tramp-encoding-shell' for local commands.\nSee the variable >>> `tramp-encoding-shell' for more information." :group tramp :type string) >>> >>> byte-code("\300\301!\210\302\303\304\305\306\307\306\310\311\312\313\314& >>> \210\315\316\317\320\306\303\321\322& \210\315\323\324\325\306\303\321\326& >>> \210\327\330!\203: >>> >>> I believe the problem is in tramp.el which assumes that COMSPEC has been >>> set. >>> >>> (defcustom tramp-encoding-shell >>> (if (memq system-type '(windows-nt)) >>> (getenv "COMSPEC") >>> "/bin/sh") >>> >>> The problem is that Windows can sometimes (see caveat below) start emacs >>> such that COMSPEC is not defined. >>> >>> I think perhaps a fix would be something along the lines of: >>> >>> (defcustom tramp-encoding-shell >>> (if (memq system-type '(windows-nt)) >>> (or (getenv "COMSPEC") >>> (concat (getenv "systemroot") "\\system32\\cmd.exe")) >>> "/bin/sh") >>> >>> I'm not a windows developer, but it seems that modulo the systemroot, >>> the system32\cmd.exe path is always (?) the right path. >>> >>> So here's the caveat, I have poked the emacs.exe image so that it does >>> not start as a console app, but so that it starts as a windows app. Now, I >>> am not a windows developer, I do not know that this is why COMSPEC has not >>> been set, but boy, it's got to be, right? ? >>> >>> For more on how to poke the emacs.exe image to start as a windows app, >>> see here https://github.com/jerryasher/consoleAppToWin basically, doing >>> so seems to make both ntemacs and cygwin emacs run a bit nicer, and so far, >>> this is the only issue I've seen crop up. >>> >>> Now, you might reasonably claim that since I am starting up emacs in a >>> very non-standard unsupported manner, the issue is totally mine and no fix >>> is necessary. And there is some logic to that. >>> >>> Regardless, I would say the assumption that COMSPEC is always set and so >>> therefore if it fails it is okay to assign nil to tramp-encoding-shell >>> knowing that later on it will be in a string-match is problematic in and of >>> itself. >>> >>> But I've seen other users report the basic cmd.exe tramp-encoding-shell >>> string match problem, see: >>> >>> https://www.google.com/search?q=string-match%28 >>> "cmd%5C%5C.exe"+nil%29+tramp-encoding-shell >>> >>> I don't know that my fix would fix those issues as well, but those >>> issues point to a basic problem where tramp-encoding-shell is set to nil >>> and then later compared in string-match. >>> >>> So why not assign tramp-encoding-shell a default that will probably work >>> instead? >>> >>> Thanks, >>> >>> Jerry Asher >>> >>> In GNU Emacs 25.0.92.1 (x86_64-w64-mingw32) >>> of 2016-03-03 built on KAEL >>> Windowing system distributor 'Microsoft Corp.', version 6.1.7601 >>> Configured using: >>> 'configure --prefix=/tmp/emacs --without-imagemagick 'CFLAGS=-O2 >>> -fomit-frame-pointer -g0'' >>> >>> Configured features: >>> XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB >>> TOOLKIT_SCROLL_BARS >>> >>> Important settings: >>> value of $LANG: ENU >>> locale-coding-system: cp1252 >>> >>> Major mode: Emacs-Lisp >>> >>> Minor modes in effect: >>> diff-auto-refine-mode: t >>> shell-dirtrack-mode: t >>> display-time-mode: t >>> tooltip-mode: t >>> global-eldoc-mode: t >>> electric-indent-mode: t >>> mouse-wheel-mode: t >>> menu-bar-mode: t >>> file-name-shadow-mode: t >>> global-font-lock-mode: t >>> font-lock-mode: t >>> auto-composition-mode: t >>> auto-encryption-mode: t >>> auto-compression-mode: t >>> column-number-mode: t >>> line-number-mode: t >>> transient-mark-mode: t >>> >>> Recent messages: >>> Mark saved where search started >>> Mark set >>> nil >>> Auto-saving... >>> Unable to load color "peach" >>> Mark set [3 times] >>> Quit >>> Mark saved where search started [2 times] >>> Auto-saving...done >>> Unable to load color "peach" [2 times] >>> >>> Load-path shadows: >>> c:/Users/Jerry/.emacs.d/user-library/loaddefs hides >>> c:/gnu/emacs-bin-w64-25.0.92-O2/emacs/share/emacs/25.0.92/lisp/loaddefs >>> c:/Users/Jerry/Dropbox/elpa/seq-2.15/seq hides >>> c:/gnu/emacs-bin-w64-25.0.92-O2/emacs/share/emacs/25.0.92/lisp/emacs-lisp/seq >>> c:/gnu/emacs-bin-w64-25.0.92-O2/emacs/share/emacs/25.0.92/lisp/emacs-lisp/cl-generic >>> hides c:/Users/Jerry/Dropbox/elpa/cl-generic-0.2/cl-generic >>> >>> Features: >>> (shadow sort mail-extr emacsbug message rfc822 mml mml-sec epg mm-decode >>> mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader >>> sendmail rfc2047 rfc2045 ietf-drums mail-utils thingatpt find-or-tag >>> find-func dired-aux dired misearch multi-isearch vc vc-dispatcher vc-git >>> diff-mode easy-mmode warnings tramp-compat auth-source gnus-util mm-util >>> help-fns mail-prsvr password-cache tramp-loaddefs trampver ucs-normalize >>> shell pcomplete format-spec advice json map ido seq seq-25 grep compile >>> files-x etags xref project eieio byte-opt bytecomp byte-compile cl-extra >>> help-mode cconv eieio-core cus-edit wid-edit projectile-init >>> paredit-init package-sync-init nssh-mode-init neotree-init >>> multiple-cursor-init modeline-tweaks markdown-init magit-init >>> javascript-init find-or-tag-init expand-region-init edmacro kmacro >>> eldoc-init dired-init dev-requires desktop-init cygwin-init cygwin-mount >>> ange-ftp comint ansi-color ring basic-defuns.el cl-seq cl-macs gv >>> cl-loaddefs pcase cl-lib amazon-tweaks update-auto-loads utf-coding >>> required-libraries print-list key-bindings finder-inf slime-autoloads >>> info package easymenu epg-config time cus-start cus-load time-date >>> mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks >>> lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars >>> term/common-win tool-bar dnd fontset image regexp-opt fringe >>> tabulated-list newcomment elisp-mode lisp-mode prog-mode register page >>> menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock >>> syntax facemenu font-core frame cl-generic cham georgian utf-8-lang >>> misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms >>> cp51932 hebrew greek romanian slovak czech european ethiopic indian >>> cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help >>> simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces >>> cus-face macroexp files text-properties overlay sha1 md5 base64 format >>> env code-pages mule custom widget hashtable-print-readable backquote >>> w32notify dbusbind w32 multi-tty make-network-process emacs) >>> >>> Memory information: >>> ((conses 16 369391 18287) >>> (symbols 56 30368 0) >>> (miscs 48 160 430) >>> (strings 32 54134 10687) >>> (string-bytes 1 1555262) >>> (vectors 16 45846) >>> (vector-slots 8 806255 5532) >>> (floats 8 306 365) >>> (intervals 56 11467 2656) >>> (buffers 976 28)) >>> >>> >> > --001a113da7f4d6fcc0052f8421f2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
>=C2= =A0Tramp is designed to work with Emacs as= released by the Emacs
develop= ment team.=C2=A0 That Emacs doesn't have this problem.=C2=A0 I think it=
woul= d be unreasonable for anyone to expect the Tramp maintainers to
cater to arbitra= ry changes in the Emacs code or in how it is
configured on Windows, let alone if= you poke some addresses in the PE
headers of the produced binary.

We are ALREADY talking about a= very specific setting IN emacs FOR Windows. God forbid we should ask the m= aintainers to discuss how emacs is configured on Windows in that context.

>=C2=A0Your fix is AFAIK incor= rect because the directory where cmd.exe lives
is not necessarily C:\Windows\system32.=C2=A0 It just happ= ens to be there
on the particular system where you tried that.

And I agree, setting the variable = to nil where it is guaranteed to blow up, and is reported to do so as my se= arch shows is FAR FAR better than finding a reasonable default that will wo= rk most of the time.

On Sat, Apr 2, 2016 at 10:37 AM, Jerry Asher <ja2038@gmail= .com> wrote:
Your bug closing excuse is defamatory, there were no personal attacks on= you.=C2=A0

There was criticism of your behavior and how= you examine and respond to bug reports. None of that constitutes a persona= l attack on you.

Your closing a bug report that de= scribes a valid bug because you dislike how the conversation you initiated = went, is support for my criticism of how you respond to bug reports.
<= div>





On Sat, Apr 2, 2016 a= t 10:32 AM, Jerry Asher <ja2038@gmail.com> wrote:
Heh, a bug report is a bug report R= EGARDLESS of how you felt you were treated.

Since you st= arted off your response to me=C2=A0

+ disparaging = my bug report
+ misrepresenting what I said
+ summarizi= ng it inaccurately
+ dismissing the evidence

=
You received in kind a report filled with frustration.

<= /div>
I can just see other people closing bug reports that discuss a cl= early documented and widely reported bug as seen by google searches with re= sponses like "I felt reporter was mean to me so I closed this bug repo= rt."

Jerry

On Sat, Apr 2, 2016 at 10:28 A= M, GNU bug Tracking System <help-debbugs@gnu.org> wrote:<= br>
Your bug report

#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up= in a string-match

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 23186@debbugs.gnu.org.

--
23186: http://debbugs.gnu.org/cgi/bugreport.cgi?= bug=3D23186
GNU Bug Tracking System
Contact help-debb= ugs@gnu.org with problems


---------- Forwarded message ----------From:=C2=A0Eli Zaretskii <eliz@gnu.org>
To:=C2=A023186-done@debbugs.gnu.org
Cc:=C2=A0
= Date:=C2=A0Sat, 02 Apr 2016 20:26:41 +0300
Subject:=C2=A0Re: bug#23186: = 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a st= ring-match
> Date: Sat, 02 Apr 2016 19:44:18 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 23186@d= ebbugs.gnu.org
>
> What is the full contents of the environment of the Emacs process when=
> you run that zapped binary?

Since the OP refused to answer even the above simplest question, and
instead sent off-list a hostile email with personal attacks on me, I'm<= br> closing this bug report.



---------- Forwarded message ----------
From:=C2=A0Jerry Asher &= lt;ja2038@gmail.com>
To:=C2=A0
bug-gnu-emacs@gnu.org
Cc:=C2=A0
Date:=C2=A0Sat, 2 Apr 2016 09:= 06:57 -0700
Subject:=C2=A025.0.92; Tramp: Windows does not always set CO= MSPEC, tramp blows up in a string-match

--text follows this line--

I started the 64= bit version of windows emacs from a shortcut on my taskbar. I
created t= he shortcut a few minutes ago by running emacs from the command
line, th= en pinning the shortcut. (There is a big caveat and I'll discuss
tha= t at the end.)

Starting emacs up in restoring my desktop it loaded a= python file. That
python file triggered python mode. Somewhere in there= , ...

Debugger entered--Lisp error: (wrong-type-argument stringp nil= )
=C2=A0 string-match("cmd\\.exe" nil)
=C2=A0 (if (string-m= atch "cmd\\.exe" tramp-encoding-shell) "/c" "-c&qu= ot;)
=C2=A0 eval((if (string-match "cmd\\.exe" tramp-encoding-= shell) "/c" "-c"))
=C2=A0 custom-initialize-reset(tr= amp-encoding-command-switch (if (string-match "cmd\\.exe" tramp-e= ncoding-shell) "/c" "-c"))
=C2=A0 custom-declare-var= iable(tramp-encoding-command-switch (if (string-match "cmd\\.exe"= tramp-encoding-shell) "/c" "-c") "Use this switch= together with `tramp-encoding-shell' for local commands.\nSee the vari= able `tramp-encoding-shell' for more information." :group tramp :t= ype string)
=C2=A0 byte-code("\300\301!\210\302\303\304\305\306\307= \306\310\311\312\313\314& \210\315\316\317\320\306\303\321\322& \21= 0\315\323\324\325\306\303\321\326& \210\327\330!\203:

I believe = the problem is in tramp.el which assumes that COMSPEC has been set.

= (defcustom tramp-encoding-shell
=C2=A0 (if (memq system-type '(windo= ws-nt))
=C2=A0 =C2=A0 =C2=A0 (getenv "COMSPEC")
=C2=A0 =C2= =A0 "/bin/sh")

The problem is that Windows can sometimes (= see caveat below) start emacs such that COMSPEC is not defined.

I th= ink perhaps a fix would be something along the lines of:

(defcustom = tramp-encoding-shell
=C2=A0 (if (memq system-type '(windows-nt))
= =C2=A0 =C2=A0 =C2=A0 (or (getenv "COMSPEC")
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (concat (getenv "systemroot") "\\system32\= \cmd.exe"))
=C2=A0 =C2=A0 "/bin/sh")

I'm not a= windows developer, but it seems that modulo the systemroot, the system32\c= md.exe path is always (?) the right path.

So here's the caveat, = I have poked the emacs.exe image so that it does not start as a console app= , but so that it starts as a windows app. Now, I am not a windows developer= , I do not know that this is why COMSPEC has not been set, but boy, it'= s got to be, right? ?

For more on how to poke the emacs.exe image to= start as a windows app, see here=C2=A0https://github.com/jerryasher/conso= leAppToWin=C2=A0basically, doing so seems to make both ntemacs and cygw= in emacs run a bit nicer, and so far, this is the only issue I've seen = crop up.

Now, you might reasonably claim that since I am starting up= emacs in a very non-standard unsupported manner, the issue is totally mine= and no fix is necessary. And there is some logic to that.

Regardless, I would say the assumption that COMSPEC is always= set and so therefore if it fails it is okay to assign nil to tramp-encodin= g-shell knowing that later on it will be in a string-match is problematic i= n and of itself.=C2=A0

But = I've seen other users report the basic cmd.exe tramp-encoding-shell str= ing match problem, see:

https:= //www.google.com/search?q=3Dstring-match%28"cmd%5C%5C.exe"+ni= l%29+tramp-encoding-shell

I don't know that my fix would fix those issues as well, but those i= ssues point to a basic problem where tramp-encoding-shell is set to nil and= then later compared in string-match.

So why not assign tramp-encoding-shell a default that w= ill probably work instead?

Thanks,

Jerry= Asher

= In GNU Emacs 25.0.92.1 (x86_64-w64-mingw32)
=C2=A0of 2016-03-03 built on= KAEL
Windowing system distributor 'Microsoft Corp.', version 6.= 1.7601
Configured using:
=C2=A0'configure --prefix=3D/tmp/emacs -= -without-imagemagick 'CFLAGS=3D-O2
=C2=A0-fomit-frame-pointer -g0= 9;'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND DBU= S NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

Important se= ttings:
=C2=A0 value of $LANG: ENU
=C2=A0 locale-coding-system: cp125= 2

Major mode: Emacs-Lisp

Minor modes in effect:
=C2=A0 dif= f-auto-refine-mode: t
=C2=A0 shell-dirtrack-mode: t
=C2=A0 display-ti= me-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2= =A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 menu-ba= r-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mod= e: t
=C2=A0 font-lock-mode: t
=C2=A0 auto-composition-mode: t
=C2= =A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 co= lumn-number-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-= mode: t

Recent messages:
Mark saved where search started
Mark = set
nil
Auto-saving...
Unable to load color "peach"
M= ark set [3 times]
Quit
Mark saved where search started [2 times]
A= uto-saving...done
Unable to load color "peach" [2 times]
Load-path shadows:
c:/Users/Jerry/.emacs.d/user-library/loaddefs hides= c:/gnu/emacs-bin-w64-25.0.92-O2/emacs/share/emacs/25.0.92/lisp/loaddefsc:/Users/Jerry/Dropbox/elpa/seq-2.15/seq hides c:/gnu/emacs-bin-w64-25.0.9= 2-O2/emacs/share/emacs/25.0.92/lisp/emacs-lisp/seq
c:/gnu/emacs-bin-w64-= 25.0.92-O2/emacs/share/emacs/25.0.92/lisp/emacs-lisp/cl-generic hides c:/Us= ers/Jerry/Dropbox/elpa/cl-generic-0.2/cl-generic

Features:
(shado= w sort mail-extr emacsbug message rfc822 mml mml-sec epg mm-decode
mm-bo= dies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendma= il rfc2047 rfc2045 ietf-drums mail-utils thingatpt find-or-tag
find-func= dired-aux dired misearch multi-isearch vc vc-dispatcher vc-git
diff-mod= e easy-mmode warnings tramp-compat auth-source gnus-util mm-util
help-fn= s mail-prsvr password-cache tramp-loaddefs trampver ucs-normalize
shell = pcomplete format-spec advice json map ido seq seq-25 grep compile
files-= x etags xref project eieio byte-opt bytecomp byte-compile cl-extra
help-= mode cconv eieio-core cus-edit wid-edit projectile-init
paredit-init pac= kage-sync-init nssh-mode-init neotree-init
multiple-cursor-init modeline= -tweaks markdown-init magit-init
javascript-init find-or-tag-init expand= -region-init edmacro kmacro
eldoc-init dired-init dev-requires desktop-i= nit cygwin-init cygwin-mount
ange-ftp comint ansi-color ring basic-defun= s.el cl-seq cl-macs gv
cl-loaddefs pcase cl-lib amazon-tweaks update-aut= o-loads utf-coding
required-libraries print-list key-bindings finder-inf= slime-autoloads
info package easymenu epg-config time cus-start cus-loa= d time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hook= s
lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars
= term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-l= ist newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn= -eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemen= u font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietname= se tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew gre= ek romanian slovak czech european ethiopic indian
cyrillic chinese chars= cript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl= -preloaded nadvice loaddefs button faces
cus-face macroexp files text-pr= operties overlay sha1 md5 base64 format
env code-pages mule custom widge= t hashtable-print-readable backquote
w32notify dbusbind w32 multi-tty ma= ke-network-process emacs)

Memory information:
((conses 16 369391 = 18287)
=C2=A0(symbols 56 30368 0)
=C2=A0(miscs 48 160 430)
=C2=A0(= strings 32 54134 10687)
=C2=A0(string-bytes 1 1555262)
=C2=A0(vectors= 16 45846)
=C2=A0(vector-slots 8 806255 5532)
=C2=A0(floats 8 306 365= )
=C2=A0(intervals 56 11467 2656)
=C2=A0(buffers 976 28))




--001a113da7f4d6fcc0052f8421f2--