From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 12:07:32 2016 Received: (at submit) by debbugs.gnu.org; 2 Apr 2016 16:07:32 +0000 Received: from localhost ([127.0.0.1]:49029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amO5D-0002gD-83 for submit@debbugs.gnu.org; Sat, 02 Apr 2016 12:07:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amO5B-0002fy-N4 for submit@debbugs.gnu.org; Sat, 02 Apr 2016 12:07:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amO54-0007QE-8G for submit@debbugs.gnu.org; Sat, 02 Apr 2016 12:07:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amO54-0007Q9-4J for submit@debbugs.gnu.org; Sat, 02 Apr 2016 12:07:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amO52-0000ri-3e for bug-gnu-emacs@gnu.org; Sat, 02 Apr 2016 12:07:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amO4z-0007Na-Pj for bug-gnu-emacs@gnu.org; Sat, 02 Apr 2016 12:07:20 -0400 Received: from mail-vk0-x233.google.com ([2607:f8b0:400c:c05::233]:35462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amO4z-0007NE-Ic for bug-gnu-emacs@gnu.org; Sat, 02 Apr 2016 12:07:17 -0400 Received: by mail-vk0-x233.google.com with SMTP id e6so136226537vkh.2 for ; Sat, 02 Apr 2016 09:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=iD0FPyQjXfpxBfggtx9xj254FTLVH4RVqKpBArDLHnk=; b=LmACci0iVUXJziRJwlhv1d3PN4epuFex99B8aFz2+zFuDfKkmBAPZdGNiQXh0JcAjX xkXJE1u+nKCGLvbRrSxf22Q9lkeig135rLD+XmbPvgt8qR1kDfIiB/QPSQFUjABKZLzh VxBq6ky232Ud8XGtsVME7JcLLvF1WCTz911XYguUwmlh3u0iokMTNcPKWOJsVA9qJ2Gu 3x/uHRvYEsHsE2PvRYZegRd0Kzx6Mh8v2CI+3KyUA8ei7XaUQLLJm1P1lZqmdWYNZwDG wXDEAfIGGe7eOq7CNXb0qkhclBs/paayr597VNnanQEL5XavZ5DfhejHzTx8b/HftVhu Ymaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=iD0FPyQjXfpxBfggtx9xj254FTLVH4RVqKpBArDLHnk=; b=NAfLCFS4MrD7hwV8yaCXbMu31RkNM2qvda/PEeipjorplZiVNuAG7Bv9sEAbf/4T2B zsCAfGToyCldg6l/nlV0IyxMXDciaMhGIAvhp7A3L3SBeZFdFnONuE7Ts1pXhh4SM/BR vxGw/ZNmOVfE8vVef1ciAz5cIaSVUm5aHNBcn/ko/zwMAAvzznNGMLQGedMpRJW67Q+m DN39vT0DvqdK5/FJQu36YnvA87yFGorhrhJNzjja2jL/JPczKqPjQACiPEwfp2i8sKT6 /cU7MHu75F+gE7vTtvffrV/RoEsmy2idYT8W4i+sWRkU8geNOOZHNboqo8os3rMemLQG SaWA== X-Gm-Message-State: AD7BkJJCfhjp3YAiMRCHda5VkBQEu7DrJqykz4tHmITAYUJGLqIuaxMxlPKpRHNY1o9UA4ZRQr8TlU9TB5HSJA== X-Received: by 10.31.8.202 with SMTP id 193mr4939150vki.93.1459613236896; Sat, 02 Apr 2016 09:07:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.45.74 with HTTP; Sat, 2 Apr 2016 09:06:57 -0700 (PDT) From: Jerry Asher Date: Sat, 2 Apr 2016 09:06:57 -0700 Message-ID: Subject: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=001a1142dbfc7ea844052f82b08c X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --001a1142dbfc7ea844052f82b08c Content-Type: text/plain; charset=UTF-8 --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)) --001a1142dbfc7ea844052f82b08c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

--text follows thi= s line--

I started the 64 bit version of windows emacs from a shortc= ut on my taskbar. I
created the shortcut a few minutes ago by running em= acs from the command
line, then pinning the shortcut. (There is a big ca= veat 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)
=C2=A0 string-match("cmd\\.exe&qu= ot; nil)
=C2=A0 (if (string-match "cmd\\.exe" tramp-encoding-s= hell) "/c" "-c")
=C2=A0 eval((if (string-match "= ;cmd\\.exe" tramp-encoding-shell) "/c" "-c"))
= =C2=A0 custom-initialize-reset(tramp-encoding-command-switch (if (string-ma= tch "cmd\\.exe" tramp-encoding-shell) "/c" "-c&quo= t;))
=C2=A0 custom-declare-variable(tramp-encoding-command-switch (if (s= tring-match "cmd\\.exe" tramp-encoding-shell) "/c" &quo= t;-c") "Use this switch together with `tramp-encoding-shell' = for local commands.\nSee the variable `tramp-encoding-shell' for more i= nformation." :group tramp :type 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& \210\315\323\324\325\306\303\321\326& \21= 0\327\330!\203:

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

(defcustom tramp-encoding-shell
=C2=A0 = (if (memq system-type '(windows-nt))
=C2=A0 =C2=A0 =C2=A0 (getenv &q= uot;COMSPEC")
=C2=A0 =C2=A0 "/bin/sh")

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

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

(defcustom tramp-encoding-shell
=C2=A0 (if (memq sy= stem-type '(windows-nt))
=C2=A0 =C2=A0 =C2=A0 (or (getenv "COMS= PEC")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (concat (getenv "syst= emroot") "\\system32\\cmd.exe"))
=C2=A0 =C2=A0 "/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. No= w, 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/jer= ryasher/consoleAppToWin=C2=A0basically, doing so seems to make both nte= macs 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 a= m 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 COMS= PEC 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.=C2=A0

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

https://www= .google.com/search?q=3Dstring-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 p= robably work instead?

Thanks,

Jerry Ashe= r

In GN= U 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.760= 1
Configured using:
=C2=A0'configure --prefix=3D/tmp/emacs --with= out-imagemagick 'CFLAGS=3D-O2
=C2=A0-fomit-frame-pointer -g0'= 9;

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOT= IFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

Important setting= s:
=C2=A0 value of $LANG: ENU
=C2=A0 locale-coding-system: cp1252
=
Major mode: Emacs-Lisp

Minor modes in effect:
=C2=A0 diff-aut= o-refine-mode: t
=C2=A0 shell-dirtrack-mode: t
=C2=A0 display-time-mo= de: t
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 el= ectric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 menu-bar-mode= : t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t=C2=A0 font-lock-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 aut= o-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 column-nu= mber-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"
Mark set= [3 times]
Quit
Mark saved where search started [2 times]
Auto-sav= ing...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:/Use= rs/Jerry/Dropbox/elpa/seq-2.15/seq hides c:/gnu/emacs-bin-w64-25.0.92-O2/em= acs/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/Jer= ry/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 rfc2= 047 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 pcomple= te 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 cc= onv eieio-core cus-edit wid-edit projectile-init
paredit-init package-sy= nc-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 cyg= win-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
li= sp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars
term/co= mmon-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list new= comment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshado= w timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-= core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibe= tan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek roma= nian slovak czech european ethiopic indian
cyrillic chinese charscript c= ase-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloa= ded nadvice loaddefs button faces
cus-face macroexp files text-propertie= s overlay sha1 md5 base64 format
env code-pages mule custom widget hasht= able-print-readable backquote
w32notify dbusbind w32 multi-tty make-netw= ork-process emacs)

Memory information:
((conses 16 369391 18287)<= br>=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 458= 46)
=C2=A0(vector-slots 8 806255 5532)
=C2=A0(floats 8 306 365)
= =C2=A0(intervals 56 11467 2656)
=C2=A0(buffers 976 28))
--001a1142dbfc7ea844052f82b08c-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 12:45:00 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 16:45:00 +0000 Received: from localhost ([127.0.0.1]:49040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amOfU-0003b8-3N for submit@debbugs.gnu.org; Sat, 02 Apr 2016 12:45:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amOfS-0003av-B5 for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 12:44:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amOfJ-0007Te-U8 for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 12:44:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amOfJ-0007Ta-QM; Sat, 02 Apr 2016 12:44:49 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1425 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1amOfJ-00027l-4g; Sat, 02 Apr 2016 12:44:49 -0400 Date: Sat, 02 Apr 2016 19:44:18 +0300 Message-Id: <8337r4rme5.fsf@gnu.org> From: Eli Zaretskii To: Jerry Asher In-reply-to: (message from Jerry Asher on Sat, 2 Apr 2016 09:06:57 -0700) Subject: Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23186 Cc: 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Jerry Asher > Date: Sat, 2 Apr 2016 09:06:57 -0700 > > 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. 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. > 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. 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. What is the full contents of the environment of the Emacs process when you run that zapped binary? From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 13:27:21 2016 Received: (at 23186-done) by debbugs.gnu.org; 2 Apr 2016 17:27:21 +0000 Received: from localhost ([127.0.0.1]:49045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amPKT-0004d8-Gl for submit@debbugs.gnu.org; Sat, 02 Apr 2016 13:27:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amPKS-0004cs-4t for 23186-done@debbugs.gnu.org; Sat, 02 Apr 2016 13:27:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amPKJ-0007Tf-Lw for 23186-done@debbugs.gnu.org; Sat, 02 Apr 2016 13:27:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amPKJ-0007Tb-IK for 23186-done@debbugs.gnu.org; Sat, 02 Apr 2016 13:27:11 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1476 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1amPKJ-00075D-1S for 23186-done@debbugs.gnu.org; Sat, 02 Apr 2016 13:27:11 -0400 Date: Sat, 02 Apr 2016 20:26:41 +0300 Message-Id: <831t6nsyzy.fsf@gnu.org> From: Eli Zaretskii To: 23186-done@debbugs.gnu.org In-reply-to: <8337r4rme5.fsf@gnu.org> (message from Eli Zaretskii on Sat, 02 Apr 2016 19:44:18 +0300) Subject: Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match References: <8337r4rme5.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23186-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 13:32:37 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 17:32:37 +0000 Received: from localhost ([127.0.0.1]:49063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amPPY-0004mp-Ei for submit@debbugs.gnu.org; Sat, 02 Apr 2016 13:32:37 -0400 Received: from mail-vk0-f48.google.com ([209.85.213.48]:34767) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amPPW-0004mc-0E for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 13:32:34 -0400 Received: by mail-vk0-f48.google.com with SMTP id e185so137357776vkb.1 for <23186@debbugs.gnu.org>; Sat, 02 Apr 2016 10:32:33 -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=T97ufn9KTfwQ8vq0sng18dgKJVoD3mSvbDrPZpgZq+E=; b=QTqmEZqir34YQP11YGpe1qZExrrzvzGFOWNxBAmpctXMTqveOyf2P4XzEoLqDkWtBw h1n6FGz/38jIX2KYhnEd5FhfiNyhZi8nXZfCsQNCyeqgM9vvWv2AKZ1VC0+5A3GBF6nP Z7vlcMxch4/gLWgyr5xADNvCy1E3NEraYnuRfKmte/uaJR1NzJAfiof5RC4o9/dq2+qq DXoEt/egXohGrhdXqBU7wM/PZWigtHx6BqsZVjZvmwp4s/HyRSEPVOSZoQSq8sZKb1nS a+IZ3vfw4URTaH3/g33SIcxXJG7j72mAG+G/QOmR9x8da9Yf7h3MK/d7oBVGfDDmKOmH u1xw== 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=T97ufn9KTfwQ8vq0sng18dgKJVoD3mSvbDrPZpgZq+E=; b=g1yVoEgT+9iyhTrGGFQv4baANZ13HyaOFZLP2VWLS9Suf00oeBuNn+yVeMW67ZMEP4 5BSz41CCqbnjPAm3kH+PLBVcupXDi80MFaZc/6CbAbap9W8UKv0IblrGTa0Vapeqqa8p 9fhV8LXkeJKcmviTQ9oqW7cZ12XFp9H9uu7qsGbpK8jfhJPJI3PeKnc3rYMSmv7NQ92R 8V2kq2aqOylhaQV9ae2rj7SM5kiCghxSd+zzdEJF+BJogYEwDUCJUXvqwG9i+ORd1X9s wSB6BWSZJMZVwl2gcaBPQKlhL1hC/PjRE3SHb7RbwriDehyxsy9Sjrx2iQBTeydaSbNV UvwQ== X-Gm-Message-State: AD7BkJKIKmXH5bsoQeoq9ax3GCaRx9k5IPZmKdnh2zZ5YT7eTDZ3ev8NqKzFwsk4gXELjq7QGBl+xw6+0emSCg== X-Received: by 10.176.6.102 with SMTP id f93mr5094462uaf.86.1459618348521; Sat, 02 Apr 2016 10:32:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.45.74 with HTTP; Sat, 2 Apr 2016 10:32:09 -0700 (PDT) In-Reply-To: References: <831t6nsyzy.fsf@gnu.org> From: Jerry Asher Date: Sat, 2 Apr 2016 10:32:09 -0700 Message-ID: Subject: Re: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) To: 23186@debbugs.gnu.org Content-Type: multipart/alternative; boundary=94eb2c122e5c2be277052f83e1d7 X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 23186 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --94eb2c122e5c2be277052f83e1d7 Content-Type: text/plain; charset=UTF-8 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)) > > --94eb2c122e5c2be277052f83e1d7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Heh, a bug report is a bug report REGARDLESS of how you fe= lt you were treated.

Since you started off your response= to me=C2=A0

+ disparaging my bug report
+ misrepresenting what I said
+ summarizing it inaccurately
+ dismissing the evidence

You received in ki= nd a report filled with frustration.

I can just se= e other people closing bug reports that discuss a clearly documented and wi= dely reported bug as seen by google searches with responses like "I fe= lt 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 <h= elp-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=3D23186
GNU Bug Tracking System
Contact help-debbugs@gnu.org wi= th 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 CO= MSPEC, tramp blows up in a string-match
> Date: Sat, 02 Apr 2016 19:4= 4:18 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 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<= br> closing this bug report.



---------- Forwarded message ----------
From:=C2=A0Jerry Asher &= lt;ja2038@gmail.com>
To:=C2= =A0bug-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 COMSPEC, tramp blows up in a string-= match

--text fo= llows 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 r= unning emacs from the command
line, then pinning the shortcut. (There is= a big caveat and I'll discuss
that at the end.)

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

Debugger entered--Lis= p error: (wrong-type-argument stringp nil)
=C2=A0 string-match("cmd= \\.exe" nil)
=C2=A0 (if (string-match "cmd\\.exe" tramp-e= ncoding-shell) "/c" "-c")
=C2=A0 eval((if (string-ma= tch "cmd\\.exe" tramp-encoding-shell) "/c" "-c&quo= t;))
=C2=A0 custom-initialize-reset(tramp-encoding-command-switch (if (s= tring-match "cmd\\.exe" tramp-encoding-shell) "/c" &quo= t;-c"))
=C2=A0 custom-declare-variable(tramp-encoding-command-switc= h (if (string-match "cmd\\.exe" tramp-encoding-shell) "/c&qu= ot; "-c") "Use this switch together with `tramp-encoding-she= ll' for local commands.\nSee the variable `tramp-encoding-shell' fo= r more information." :group tramp :type string)
=C2=A0 byte-code(&q= uot;\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&= amp; \210\327\330!\203:

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

(defcustom tramp-encoding-shell=C2=A0 (if (memq system-type '(windows-nt))
=C2=A0 =C2=A0 =C2=A0 (g= etenv "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 think perhaps a fix would be somethin= g along the lines of:

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

I'm not a windows developer, but it seems tha= t 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 COM= SPEC has not been set, but boy, it's got to be, right? ?

For mor= e on how to poke the emacs.exe image to start as a windows app, see here=C2= =A0https://github.com/jerryasher/consoleAppToWin=C2=A0basically, 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 reaso= nably claim that since I am starting up emacs in a very non-standard unsupp= orted manner, the issue is totally mine and no fix is necessary. And there = is some logic to that.

<= /font>
Regardless, I would sa= y 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 wil= l be in a string-match is problematic in and of itself.=C2=A0
<= div>
But I've seen other users report t= he basic cmd.exe tramp-encoding-shell string match problem, see:
=

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

I don't know that my fix wo= uld fix those issues as well, but those issues point to a basic problem whe= re tramp-encoding-shell is set to nil and then later compared in string-mat= ch.

So why not ass= ign tramp-encoding-shell a default that will probably work instead?<= /div>

Thanks,<= /font>

= Jerry Asher

=
In GNU Emacs 25.0.92.1 (x86_64-w64= -mingw32)
=C2=A0of 2016-03-03 built on KAEL
Windowing system distribu= tor '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''

Configured featur= es:
XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB=
TOOLKIT_SCROLL_BARS

Important settings:
=C2=A0 value of $LANG= : ENU
=C2=A0 locale-coding-system: cp1252

Major mode: Emacs-Lisp<= br>
Minor modes in effect:
=C2=A0 diff-auto-refine-mode: t
=C2=A0 = shell-dirtrack-mode: t
=C2=A0 display-time-mode: t
=C2=A0 tooltip-mod= e: t
=C2=A0 global-eldoc-mode: t
=C2=A0 electric-indent-mode: t
= =C2=A0 mouse-wheel-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-s= hadow-mode: t
=C2=A0 global-font-lock-mode: 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 column-number-mode: t
=C2=A0 l= ine-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"
Mark set [3 times]
Quit
Ma= rk saved where search started [2 times]
Auto-saving...done
Unable to = load color "peach" [2 times]

Load-path shadows:
c:/User= s/Jerry/.emacs.d/user-library/loaddefs hides c:/gnu/emacs-bin-w64-25.0.92-O= 2/emacs/share/emacs/25.0.92/lisp/loaddefs
c:/Users/Jerry/Dropbox/elpa/se= q-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-gener= ic-0.2/cl-generic

Features:
(shadow sort mail-extr emacsbug messa= ge rfc822 mml mml-sec epg mm-decode
mm-bodies mm-encode mail-parse rfc22= 31 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums m= ail-utils thingatpt find-or-tag
find-func dired-aux dired misearch multi= -isearch vc vc-dispatcher vc-git
diff-mode easy-mmode warnings tramp-com= pat auth-source gnus-util mm-util
help-fns mail-prsvr password-cache tra= mp-loaddefs trampver ucs-normalize
shell pcomplete format-spec advice js= on 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 n= eotree-init
multiple-cursor-init modeline-tweaks markdown-init magit-ini= t
javascript-init find-or-tag-init expand-region-init edmacro kmacro
= eldoc-init dired-init dev-requires desktop-init cygwin-init cygwin-mountange-ftp comint ansi-color ring basic-defuns.el cl-seq cl-macs gv
cl-lo= addefs pcase cl-lib amazon-tweaks update-auto-loads utf-coding
required-= libraries print-list key-bindings finder-inf slime-autoloads
info packag= e easymenu epg-config time cus-start cus-load time-date
mule-util toolti= p 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 fo= ntset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-= mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-ba= r mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic ch= am georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao ko= rean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech europe= an ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-c= mpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs but= ton faces
cus-face macroexp files text-properties overlay sha1 md5 base6= 4 format
env code-pages mule custom widget hashtable-print-readable back= quote
w32notify dbusbind w32 multi-tty make-network-process emacs)
Memory information:
((conses 16 369391 18287)
=C2=A0(symbols 56 303= 68 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-sl= ots 8 806255 5532)
=C2=A0(floats 8 306 365)
=C2=A0(intervals 56 11467= 2656)
=C2=A0(buffers 976 28))


--94eb2c122e5c2be277052f83e1d7-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 13:38:26 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 17:38:26 +0000 Received: from localhost ([127.0.0.1]:49071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amPVA-0004v5-U5 for submit@debbugs.gnu.org; Sat, 02 Apr 2016 13:38:25 -0400 Received: from mail-vk0-f54.google.com ([209.85.213.54]:33358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amPV8-0004us-Qw for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 13:38:23 -0400 Received: by mail-vk0-f54.google.com with SMTP id k1so137641750vkb.0 for <23186@debbugs.gnu.org>; Sat, 02 Apr 2016 10:38:22 -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 :cc; bh=7ekhRpIUnk3ed3IwtHFW1eoDPGE7qXuRCqfns3GVb6Y=; b=K/YQpUMm+JQVVEb2vcuSNIIg6LHyG1UPl2X07TtZKI5p6vdxGUxM4P0wv+hLjl5fdz YMHOvkrIWv1F4XXPcxBANF3bMb7lTbxhrOHL2D7ezf8B2UDb4VnbtBpNh4UyvwB3I0fp siCVjsaMd4ZztmiPMxW0Essetny0yH8kOpzeNa/WL3+eFWXEBHAxc4QZO6OXWnk5YBmt zo0saq1QxFw0equaBa7e3LFHtcH+0lYbWuaPeOe0FutaCX6ViOrr8SpFJG7i5+SLI0Y4 B4mdBrN9ZlKrjaylwUo4H8YWmCwpOnt7PwCuR1e+CCubf3wHwUQn20W0egs0y4yHDA93 k71Q== 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:cc; bh=7ekhRpIUnk3ed3IwtHFW1eoDPGE7qXuRCqfns3GVb6Y=; b=RRlDtHPbF3LsNPV4HSF3Pcf4BUYMesiaRvUJOOpNI6go7ftdj3FYkSZ76tlBwvesvK Xpmia5Xu0RpHNpuzNh2NaykdbST3rxY5d/1ucrEQKEk27UvcCq1/3SC/1Ac2HjQMRdAr I+H7898SNKrEgtqwtHCWt64fFXaHV/6hT7YMfohr3ZJYblL5NUqqMKC2bhMR69b9q23+ 4orrKGEIxSTOZjVZXLV3U5dLPSuRCPZ/XuenGZjJ+nV8dKr6IByvMZuOLNHQh6EsKdyF eGbmQj+ss3QvHE0E1hErVK2bZQIxHUfwED4AwZDcBXx053AotbGRxuLFBDf5f2wgcZwr oBiA== X-Gm-Message-State: AD7BkJIAmavgvkLBDScN/eoKN/2CFqUrig+eWIDfMiUg1EOz1J6hoCthmmNxQsPNOwGdUvlMaH8Wzrb8CKy+pQ== X-Received: by 10.176.1.240 with SMTP id 103mr4862612ual.54.1459618697234; Sat, 02 Apr 2016 10:38:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.45.74 with HTTP; Sat, 2 Apr 2016 10:37:57 -0700 (PDT) In-Reply-To: References: <831t6nsyzy.fsf@gnu.org> From: Jerry Asher Date: Sat, 2 Apr 2016 10:37:57 -0700 Message-ID: Subject: Re: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) To: 23186@debbugs.gnu.org Content-Type: multipart/alternative; boundary=001a113cfa50f4dd90052f83f5f8 X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 23186 Cc: Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --001a113cfa50f4dd90052f83f5f8 Content-Type: text/plain; charset=UTF-8 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)) >> >> > --001a113cfa50f4dd90052f83f5f8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Your bug closing excuse is defamatory, there were no perso= nal attacks on you.=C2=A0

There was criticism of your be= havior and how you examine and respond to bug reports. None of that constit= utes 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 r= eports.





=

On Sat, Apr 2, 2016 at 10:32 AM, Jerry Asher <j= a2038@gmail.com> 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=C2=A0

+ 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 o= ther people closing bug reports that discuss a clearly documented and widel= y 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 Tr= acking 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=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))



--001a113cfa50f4dd90052f83f5f8-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 13:50:42 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 17:50:42 +0000 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 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 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) MIME-Version: 1.0 Received: by 10.103.45.74 with HTTP; Sat, 2 Apr 2016 10:50:14 -0700 (PDT) In-Reply-To: References: <831t6nsyzy.fsf@gnu.org> From: Jerry Asher Date: Sat, 2 Apr 2016 10:50:14 -0700 Message-ID: Subject: Re: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) To: 23186@debbugs.gnu.org Content-Type: multipart/alternative; boundary=001a113da7f4d6fcc0052f8421f2 X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 23186 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --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-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 15:38:03 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 19:38:03 +0000 Received: from localhost ([127.0.0.1]:49127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amRMw-0007nE-Vd for submit@debbugs.gnu.org; Sat, 02 Apr 2016 15:38:03 -0400 Received: from mout.gmx.net ([212.227.17.20]:64198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amRMv-0007mj-D2 for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 15:38:01 -0400 Received: from detlef.gmx.de ([93.209.89.206]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MLi1v-1anGJW0tsJ-000q0D; Sat, 02 Apr 2016 21:37:53 +0200 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match References: <8337r4rme5.fsf@gnu.org> Date: Sat, 02 Apr 2016 21:37:51 +0200 In-Reply-To: <8337r4rme5.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 02 Apr 2016 19:44:18 +0300") Message-ID: <87eganpzsg.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:r8IGnT1E+7zOJEEfO/VCaOPwTqyc31bxcAaYBukPXHHWa5Hv6hy hUwx5smRHgut4xRCy2f2FUiJMdg8yInQ2W1S8BPGBfRF+5LespE9b7/0X7JLII2jnrSpWJj shh+IRTMLVbk9ZgSSv4IPj/x6+Bget7L30Df2TwgP7R2kBqgzkC1wqMjqu7XHNHpl3eTU9e yBTstaoNSPV8/hAPfL8Jg== X-UI-Out-Filterresults: notjunk:1;V01:K0:/aWkx7GaNd0=:Wra5qTT5q3f/ae3faQAWNp ZkwqO6sIwBNkiaqP9ehymhURIzdrt/yaYoSjno7+b8lA4GDyjJ6Z8JpJBO8K3ZSqGHcyjLtDG wu8YeNQPqpdgMD4Av4+grJFb+xb5vk/rk01N/5+HaQCCVkjfmn1yEgDbbEdX25wgHKju/QiBn NUNgnDosDZehxL4rAc5vEQKlp2nM9Dvfkgi9uzcyaAOLk43L6P3qudx/+QUFq0c4tGj835zeK 3WGOj0exXfp88fHOqpw+63qDKanZi01mdNsvYt/V7jz/UofqPEn0qtnHPma1YYIyeQQf2+dhX 5PuDlF4aWql9UhKs4RyugU1QfwFSVXSEMmeOBMaJxXQjf9p+FZyGQFwmGkHYEoxUI4RpnZ3Fx ycUrTE9vRHZwAMW36M3z5HZX9MR2TXddJinnfFuWqsyXFu7kSxvNVbWolMCeNN9bv5CobQoKK zfWDyNahbVRUsj2pPa1Yg61g+GBYNfJtl5uto/OwSNXx7MsESAKjamf/ukUgfgs0SnEdV2tA4 TT7MzC775os0Cx1uiuYdE8g3s/AwG1FFND8gPOqInfz21sH1BRAgx+V4SS19qUJyyEQ4lHE5L P3UKuyhhyHTPKUvl8405Udkqtv5MSB3PDMUPjL/dh1FLAdu+uT49NQkSXrRyUuTB7ItAInGxF kWT37+p75gn5sIEQJOKtmggS/BMXiq4acPgzazLA4u5W5dNOEXAjVKkYI2Vt0FuPRuJMFVbkH Wtvg7wv7nQIVJ3/3y0VCJXtVygXCpTP36eMXRLbnYjmLb6glgLZUIUSlfTwzIFpecnp+/FThL fSBeOX/ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23186 Cc: Jerry Asher , 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: >> 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. > > 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. The Tramp maintainers could check, whether COMSPEC is set, and raise a verbose warning in case it isn't. Refusing further work. Shall I commit this to the emacs-25 branch, or to master? Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 15:47:57 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 19:47:57 +0000 Received: from localhost ([127.0.0.1]:49145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amRWX-0001Da-Ka for submit@debbugs.gnu.org; Sat, 02 Apr 2016 15:47:57 -0400 Received: from mout.gmx.net ([212.227.17.21]:63358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amRWW-0001DN-1l for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 15:47:56 -0400 Received: from detlef.gmx.de ([93.209.89.206]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MdoR7-1bC77Q2NfZ-00Perh; Sat, 02 Apr 2016 21:47:49 +0200 From: Michael Albinus To: Jerry Asher Subject: Re: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) References: <831t6nsyzy.fsf@gnu.org> Date: Sat, 02 Apr 2016 21:47:48 +0200 In-Reply-To: (Jerry Asher's message of "Sat, 2 Apr 2016 10:50:14 -0700") Message-ID: <87a8lbpzbv.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:xuLLsXMizyWz33jL5doZZG5fVMV3C/5NdIn0Mx17q/xsXmbHwG5 scDre46Qf8bGB5AOe4y0ykNfGsjP9xrL4s1PWW6mj/febU7XnEFnRtu7b9Z8d9TmzRIBb5Z pUCGxkOsVw7KukAz99F/RsmRhPGhs5H01qFnnO912IyF4sOcVsXZpY4DZQSy9cR1YtyexU/ Thlb5dagr+CgFiiKQqVtw== X-UI-Out-Filterresults: notjunk:1;V01:K0:xX6Bcy0BpHs=:TzZRYyCn2SrAKahRYHDNIB 8HQ3TSaYZ9jOkiNmDPEEu2BPpPhkthAPacorFY7MaUES76xKgCgRS/Zs8dzWK/r5h15fhkq9L xhYChPEQri+fNcM+icEVnaFbydKfmeU4SLEq8ub73a/FUvv2A4u5f3LTS1MVxQKwFoWx200M9 OpwfZXIcAVfpyw5kOHYehp6Dchz0f/tv997Ko9/s9XGhhYi88VNvyr56gLySsvyhWPqXZj/tf j46FOfGX75JmxTj+6rQ7VRONarYdf6IMslBuXqx18S0cFVI1h4dpTcD5DtvmQ9XVYkNmBJy/M loW+CKUfoOoXF0ufqGVytRLTG7Z3vbL9IH7egTidd3m16SbLKvIvwZVTf3DXNsZCCUgHZe9rT /g0h2r0BRBqx8FrQs0Pd4J0nfEAW87EFoe0VvnT4y+vTe0cxWZiXZvJqlL4/9Y0Ah/SGan5MD y4TnA7eZoGizejgxzkNXRmVFIgzm3v6J4lgkqqfN+E9kSSpGlZo1+BI+5pAiQvxRNOAyPPwoV SL48eYVFfiI5awFvdQqacCXJS2AwXF/TjrLZ57UmRhuWBEk+DeIw3s5qSJviQo8jQPvOSWjta B2utCsopwJeVMZI3jIjtbOlpbzeC20uWLXSkypi3+keGKAD9jh7n/xS8EL+0XkjS4vBDNpexP 0jBfy0ADPiNwUYuAOS4yjrXuqOer7i5vfSHdaNiL/+aWQN1K1uxbaN5pIs19enyinlGiKaWf5 vyFGyc2wkoqV49snS8gZy5sK4CdQGMsNjgTUt843lJfSCClB5QM2u8eSfXxulKh58i6J2Y8jw iaDDurT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23186 Cc: 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Jerry Asher writes: Hi Jerry, >> 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. I'm not interested in any flamewar. Pls stop. I haven't too much knowledge about MS Windows, and many years of experience let me trust Eli. If you are interested in changing Tramp according to your needs, pls be cooperative. Make a proposal about a config option which could be used instead of the COMSPEC env which doesn't exist in your environment. Make a proposal how to avoid calling cmd.exe at all, it seems not be mandatory, I believe. Propose something else what is possible. Your first proposal, trusting C:\Windows\system32\cmd.exe, hasn't been accepted, by reasons Eli has given. And indeed, it looks too me like too much heuristic, so I'm with Eli. Best regards, Michael. PS: I am the Tramp maintainer. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 16:03:38 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 20:03:38 +0000 Received: from localhost ([127.0.0.1]:49157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amRli-0001aG-Fa for submit@debbugs.gnu.org; Sat, 02 Apr 2016 16:03:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amRlg-0001a3-Rl for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:03:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amRlY-00065o-Nn for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:03:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amRlY-00065k-Kk; Sat, 02 Apr 2016 16:03:28 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1665 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1amRlX-0006tz-Vl; Sat, 02 Apr 2016 16:03:28 -0400 Date: Sat, 02 Apr 2016 23:02:57 +0300 Message-Id: <83r3enrd72.fsf@gnu.org> From: Eli Zaretskii To: Michael Albinus In-reply-to: <87a8lbpzbv.fsf@gmx.de> (message from Michael Albinus on Sat, 02 Apr 2016 21:47:48 +0200) Subject: Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) References: <831t6nsyzy.fsf@gnu.org> <87a8lbpzbv.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23186 Cc: ja2038@gmail.com, 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Michael Albinus > Date: Sat, 02 Apr 2016 21:47:48 +0200 > Cc: 23186@debbugs.gnu.org > > If you are interested in changing Tramp according to your needs, pls be > cooperative. Make a proposal about a config option which could be used > instead of the COMSPEC env which doesn't exist in your environment. Make > a proposal how to avoid calling cmd.exe at all, it seems not be > mandatory, I believe. Propose something else what is possible. > > Your first proposal, trusting C:\Windows\system32\cmd.exe, hasn't been > accepted, by reasons Eli has given. And indeed, it looks too me like too > much heuristic, so I'm with Eli. I asked a question which might suggest a solution. The idea is that if we cannot trust COMSPEC, then we had better made sure what can we trust in the environment, because Emacs uses the environment variable for many other important needs, and one way of finding cmd.exe is through other environment variables. If the OP answers the question, we might be on a more constructive path. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 16:04:20 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 20:04:21 +0000 Received: from localhost ([127.0.0.1]:49161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amRmO-0001bW-Oz for submit@debbugs.gnu.org; Sat, 02 Apr 2016 16:04:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amRmN-0001bK-8O for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:04:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amRmG-0006Ha-GP for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:04:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amRmG-0006HU-Do; Sat, 02 Apr 2016 16:04:12 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1666 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1amRmF-00076j-MR; Sat, 02 Apr 2016 16:04:12 -0400 Date: Sat, 02 Apr 2016 23:03:42 +0300 Message-Id: <83pou7rd5t.fsf@gnu.org> From: Eli Zaretskii To: Michael Albinus In-reply-to: <87eganpzsg.fsf@gmx.de> (message from Michael Albinus on Sat, 02 Apr 2016 21:37:51 +0200) Subject: Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match References: <8337r4rme5.fsf@gnu.org> <87eganpzsg.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23186 Cc: ja2038@gmail.com, 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Michael Albinus > Cc: Jerry Asher , 23186@debbugs.gnu.org > Date: Sat, 02 Apr 2016 21:37:51 +0200 > > The Tramp maintainers could check, whether COMSPEC is set, and raise a > verbose warning in case it isn't. Refusing further work. That'd be fine with me. > Shall I commit this to the emacs-25 branch, or to master? emacs-25, I guess. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 16:11:28 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 20:11:28 +0000 Received: from localhost ([127.0.0.1]:49168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amRtH-0001lN-R1 for submit@debbugs.gnu.org; Sat, 02 Apr 2016 16:11:28 -0400 Received: from mail-vk0-f44.google.com ([209.85.213.44]:34875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amRtG-0001lA-8W for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:11:26 -0400 Received: by mail-vk0-f44.google.com with SMTP id e6so139746834vkh.2 for <23186@debbugs.gnu.org>; Sat, 02 Apr 2016 13:11:26 -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 :cc; bh=nz9kMhIo+MvODbRSO/mCBI5Z7HToBYpsRyOqG3Y+DOM=; b=gbPBWIk08hAuYJogkey9HQXrDFrOvIwIOA2czVGwFWRcA7HUu80CRTCjJWBqxnV6ze /g3bQ2EmrUn9CI89G475ixp3bcpyiPEXGW4b2n7+ODq3g98fxtuD22PwSmK/7rhFl1wE ljKftNu37Dj15cZaBOnb3dV9+kl/7u+O7BBZGESIeJsxWvyg1u08X/eqEQtGIinqFsFO fRAs/mjsmDpOqBnPgJg4Zun+jR3j4bQa/oaBYUzp2pm55a1y9aj2Y708RcNKMEGq0Upm ZoYlbODzL6gQ6oeyYaDD4IkVNjrIiAsLnbQmxJU56rcYy6Wjsqfy4Ds4VyvlbXmC/pKJ oeGA== 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:cc; bh=nz9kMhIo+MvODbRSO/mCBI5Z7HToBYpsRyOqG3Y+DOM=; b=U4vXnPKipMpUcdoDBUFyblJEcPCd+qgBECcV4o4+fo3tSuozxQdO3KBvGTTC1+/YND fM7PHOySf8fUkyW+eCYXHfaBtN8rp9hvAsj5P8Ow52QbnE62iTZOjOvdh77finnAQTfM jBPSNk0th728zrp1TXD3Pr7f44Nm4Qxq1LlJMMiBYiKqcErsqLZrITIOZurUHz11H86g OSjGOtq/V1z7flIPuaPML4HwMqmF7bfZ9h0ZKJCQAih3O69A/OzSG7MLzBbgJA9HCzx0 8os/RaXDMnZXJS/Vt+QlMafEcR/oIeJt0o/8u6i7+PH25Fw+6E9wXZtmZgrrnDVb7A5G uREQ== X-Gm-Message-State: AD7BkJKqcZZFHadqCaelQe8wW5TKWI6dbIqvpPanQP6EHBS9OXAO3pT1la6aCE0FFhHWc5CPUwbqVd3RGjtY2Q== X-Received: by 10.31.131.14 with SMTP id f14mr4194852vkd.148.1459627880868; Sat, 02 Apr 2016 13:11:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.45.74 with HTTP; Sat, 2 Apr 2016 13:11:01 -0700 (PDT) In-Reply-To: <87a8lbpzbv.fsf@gmx.de> References: <831t6nsyzy.fsf@gnu.org> <87a8lbpzbv.fsf@gmx.de> From: Jerry Asher Date: Sat, 2 Apr 2016 13:11:01 -0700 Message-ID: Subject: Re: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) To: Michael Albinus Content-Type: multipart/alternative; boundary=001a114587da57f05b052f8619e4 X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 23186 Cc: 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --001a114587da57f05b052f8619e4 Content-Type: text/plain; charset=UTF-8 Thanks for the response Michael. Clearly I wasn't interested in a flamewar either. + I submitted a relatively complete bug report + I explained how I got there + I explained its relative importance + I provided evidence that others were seeing this issue in different areas + I explained I was not a windows developer + I proposed an initial suggested fix None of these are activities someone looking for a flamewar would do Imagine my horror to be met on the very first response from Gnu + What I wanted the maintainers to do was unreasonable + My particular configuration invalidated the need to look at the bug entirely + A misrepresentation of my fix making it look much more fragile + Being given a vague demand to produce more evidence and no instructions on what was needed or how to supply it *What is the full contents of the environment of the Emacs process whenyou run that zapped binary?* And then to have a defamatory slur placed in the bug report. Michael, I am not interested in a flamewar, regardless, your trust in him aside, I was abused by Eli this morning. > Your first proposal, trusting C:\Windows\system32\cmd.exe, hasn't been accepted, by reasons Eli has given. And indeed, it looks too me like too much heuristic, so I'm with Eli. I don't even know what that means. As I said: + *"**C:\Windows\system32\cmd.exe"* THIS WAS LITERALLY NOT WHAT I PROPOSED + Regardless, when COMSPEC is not defined, assigning NIL to tramp-encoding-shell CERTAINLY IS WRONG. + Other people are seeing this problem too, google it as I showed you. Since you are the maintainer, I would never deign to claim I know more than you do about TRAMP So please Michael, + bug reporters are often NOT the best person to analyse or propose a solution. + When COMSPEC is not defined, assigning NIL to tramp-encoding-shell CERTAINLY IS WRONG. + Other people see this problem too., WHAT DO YOU THE MAINTAINER PROPOSE as a solution? Since I am not a windows developer, I think my actual proposal setting the value to "%SYSTEMROOT%\system32\cmd.exe" is a reasonable first start. I note it seems to work up to and including Windows 10 64. I don't know where cmd.exe is supposed to live, or how it's supposed to be found, but I do know the path I suggested, which misrepresented as you and Eli have done, actually works and would work FAR better than setting it to NIL. Once more, I am not a windows developer, you are the maintainer, I have reported a bug, a bug felt not just by me but by many others, the current code, which sets it to NIL is 10,000% guaranteed to be wrong, since you REJECTED my proposed suggestion which would seem to work in most cases and be a great place to start, Here are a list of many other people who see this bug: https://www.google.com/search?q=emacs+cmd.exe+tramp-encoding-shell+string-match AS THE TRAMP MAINTAINER, WHAT DO YOU SUGGEST TO FIX THIS BUG? Thank you for your attention, Jerry On Sat, Apr 2, 2016 at 12:47 PM, Michael Albinus wrote: > Jerry Asher writes: > > Hi Jerry, > > >> 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. > > I'm not interested in any flamewar. Pls stop. > > I haven't too much knowledge about MS Windows, and many years of > experience let me trust Eli. > > If you are interested in changing Tramp according to your needs, pls be > cooperative. Make a proposal about a config option which could be used > instead of the COMSPEC env which doesn't exist in your environment. Make > a proposal how to avoid calling cmd.exe at all, it seems not be > mandatory, I believe. Propose something else what is possible. > > Your first proposal, trusting C:\Windows\system32\cmd.exe, hasn't been > accepted, by reasons Eli has given. And indeed, it looks too me like too > much heuristic, so I'm with Eli. > > Best regards, Michael. > > PS: I am the Tramp maintainer. > --001a114587da57f05b052f8619e4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for the response Michael.

Clearl= y I wasn't interested in a flamewar either.

+ = I submitted a relatively complete bug report
+ I explained how I = got there
+ I explained its relative importance
+ I= provided evidence that others were seeing this issue in different areas
+ I explained I was not a windows developer
+ I propo= sed an initial suggested fix

None of these are= activities someone looking for a flamewar would do

Imagine my horror to be met on the very first response from Gnu

+ What I wanted the maintainers to do was unreasonable
+ My particular configuration invalidated the need to look at the bug= entirely
+ A misrepresentation of my fix making it look much mor= e fragile
+ Being given a vague demand to produce more evidence a= nd no instructions on what was needed or how to supply it
What is the full contents of the enviro= nment of the Emacs process when
you run that zapped binary?

=

And then to have a defamatory slur placed in the bug repo= rt.

Michael, I am not interested in a flamewa= r, regardless, your trust in him aside, I was abused by Eli this morning.

>=C2=A0Your first proposal, trusting C:\Windows\system32\cmd.exe, hasn't b= een
accepted, by reasons Eli h= as given. And indeed, it looks too me like too
much heuristic, so I'm with E= li.

I don't even know what that means.=C2=A0

As I said:

+ &= quot;C:\Windows\system32\cmd= .exe"=C2=A0 THIS WAS LITERALLY NOT WHAT I PROPOSED
+ Regardless, when COMSPEC is not defined, assigning NIL to tramp-encodin= g-shell CERTAINLY IS WRONG.
+ Other people are seeing this proble= m too, google it as I showed you.

Since you are th= e maintainer, I would never deign to claim I know more than you do about TR= AMP

So please Michael,=C2=A0

<= div>+ bug reporters are often NOT the best person to analyse or propose a s= olution.
+ When COMSPEC is not defined, assigning NIL to tramp-en= coding-shell CERTAINLY IS WRONG.
+ Other people see this prob= lem too.,

WHAT DO YOU THE MAINTAINER PROPOSE as a = solution?

Since I am not a windows developer, I th= ink my actual proposal setting the value to "%SYSTEMROOT%\system32\cmd= .exe" is a reasonable first start.

I note= it seems to work up to and including Windows 10 64.

I don't know where cmd.exe is supposed to live, or how it's supp= osed to be found, but I do know the path I suggested, which misrepresented = as you and Eli have done, actually works and would work FAR better than set= ting it to NIL.

Once more, I am not a windows deve= loper, you are the maintainer, I have reported a bug, a bug felt not just b= y me but by many others, the current code, which sets it to NIL is 10,000% = guaranteed to be wrong, since you REJECTED my proposed suggestion which wou= ld seem to work in most cases and be a great place to start,
=
Here are a list of many other people who see this bug:
=

AS THE TRAM= P MAINTAINER, WHAT DO YOU SUGGEST TO FIX THIS BUG?

Thank you for your attention,

Jerry


On Sat, Apr 2, 2016 at 12:4= 7 PM, Michael Albinus <michael.albinus@gmx.de> wrote:
Jerry Asher <ja2038@gmail.com> writes:

Hi Jerry,

>> Tramp is designed to work with Emacs as released by the Emacs
>> development team. That Emacs doesn't have this problem. I thin= k it
>> would be unreasonable for anyone to expect the Tramp maintainers t= o
>> 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 ther= e
>> 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.

I'm not interested in any flamewar. Pls stop.

I haven't too much knowledge about MS Windows, and many years of
experience let me trust Eli.

If you are interested in changing Tramp according to your needs, pls be
cooperative. Make a proposal about a config option which could be used
instead of the COMSPEC env which doesn't exist in your environment. Mak= e
a proposal how to avoid calling cmd.exe at all, it seems not be
mandatory, I believe. Propose something else what is possible.

Your first proposal, trusting C:\Windows\system32\cmd.exe, hasn't been<= br> accepted, by reasons Eli has given. And indeed, it looks too me like too much heuristic, so I'm with Eli.

Best regards, Michael.

PS: I am the Tramp maintainer.

--001a114587da57f05b052f8619e4-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 16:19:28 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 20:19:28 +0000 Received: from localhost ([127.0.0.1]:49173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amS11-0001wr-SW for submit@debbugs.gnu.org; Sat, 02 Apr 2016 16:19:28 -0400 Received: from mail-vk0-f48.google.com ([209.85.213.48]:32852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amS10-0001we-Jo for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:19:26 -0400 Received: by mail-vk0-f48.google.com with SMTP id k1so139858773vkb.0 for <23186@debbugs.gnu.org>; Sat, 02 Apr 2016 13:19:26 -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 :cc; bh=S2ZFC9uMe8yNmiNFFuN6yzrfM/4Kb0ptharVYdeIx2A=; b=zbyyDHBgZz9DnZDfDfi/Ct6a4QDajPlyzjcKvBg0PNFfxOUiRuStYfugvjeloLsmZd 4upWjLddxRgJ+QYPRULpSBlsZBVDCK8szXdqHaxga7hYrjeQuOQ7ZnNhDkGWdhKTb5iP Wr0IXqHY0dm6TaRov3pRnw3nSY3CbmTbnn/O3XqWFFLUTQUeoAjpTYINEIRzz/SiaeUe rERMisK+OxtfnKwM3U9tOkb/pWqVoOp4C+5TFRFEV2qfhpgEHa7ehkwH0abhC2Jj+5wA hzWvtGzpGnnWsDAAK19r/bmKMsA7RwpLCDFv7wPzcUighXTbVv1CzhErtq6URGLrSM4T Zt4A== 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:cc; bh=S2ZFC9uMe8yNmiNFFuN6yzrfM/4Kb0ptharVYdeIx2A=; b=JR6JEMCD6idASm7Mom4lqsL9OVJp1R8Z6JJglpV/jtVFQzVqJCYEJEiKRd+NwRk9zR QD/qW1MrFmuPaq5Mmq8j5O4/KUCqfRTq7o1n0lsKh1VQ0jBt8PnvBT20jLSE9Ej8Q6/o PfkLmPjXvLkR6xdmZKhlsK5E+RbMCpMgjcgBYkxF/twxuSUfJoAKSfF1kT5lpZcoKrfJ XZ79F6SMZL1Ghyy+EJwBjVGYXMYSTTGS9cFl+ujzTo3ccwfZ5DzJgIj1adtGxdnlcm3x O+OBfhW5LGmRamC7YB+ifNq9AlfYFDK6zqTniVwfC7OqPZcXr+WMd2+S7pJcPQe+YJoO ghGw== X-Gm-Message-State: AD7BkJI5U78GZRh9bcydktwUGbq/PsK6sDjGYfkDpUDXh2rhXr38jRg0OrauYz7aDN1CS7tric001dVKUoXnrA== X-Received: by 10.31.134.71 with SMTP id i68mr2907809vkd.46.1459628361220; Sat, 02 Apr 2016 13:19:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.45.74 with HTTP; Sat, 2 Apr 2016 13:19:01 -0700 (PDT) In-Reply-To: <83r3enrd72.fsf@gnu.org> References: <831t6nsyzy.fsf@gnu.org> <87a8lbpzbv.fsf@gmx.de> <83r3enrd72.fsf@gnu.org> From: Jerry Asher Date: Sat, 2 Apr 2016 13:19:01 -0700 Message-ID: Subject: Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a11458eb4f988b8052f86351e X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 23186 Cc: Michael Albinus , 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --001a11458eb4f988b8052f86351e Content-Type: text/plain; charset=UTF-8 > If the OP answers the question, we might be on a more constructive path. You asked for: > What is the full contents of the environment of the Emacs process when you run that zapped binary? My full environment contains a lot of internal information with private data with security implications + current directories + current projects + complete pathnames to various executables + firefox plugins + firefox plugin directory paths + windows directory paths + paths to ssh keys + complete specification of the windows image I am running You do not need my full environment, nor would more than a few people give it. And my full environment is not sufficient either. You need a knowledge of windows programming. I cannot supply that. If you cannot, say so. Jerry On Sat, Apr 2, 2016 at 1:02 PM, Eli Zaretskii wrote: > > From: Michael Albinus > > Date: Sat, 02 Apr 2016 21:47:48 +0200 > > Cc: 23186@debbugs.gnu.org > > > > If you are interested in changing Tramp according to your needs, pls be > > cooperative. Make a proposal about a config option which could be used > > instead of the COMSPEC env which doesn't exist in your environment. Make > > a proposal how to avoid calling cmd.exe at all, it seems not be > > mandatory, I believe. Propose something else what is possible. > > > > Your first proposal, trusting C:\Windows\system32\cmd.exe, hasn't been > > accepted, by reasons Eli has given. And indeed, it looks too me like too > > much heuristic, so I'm with Eli. > > I asked a question which might suggest a solution. The idea is that > if we cannot trust COMSPEC, then we had better made sure what can we > trust in the environment, because Emacs uses the environment variable > for many other important needs, and one way of finding cmd.exe is > through other environment variables. > > If the OP answers the question, we might be on a more constructive > path. > --001a11458eb4f988b8052f86351e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
>=C2=A0If the OP = answers the question, we might be on a more constructive
path.

You asked for:
=

>=C2=A0What = is the full contents of the environment of the Emacs process whenyou run that zapped binary?

My full environment contains a lot of internal informati= on with private data with security implications

+ current directories
= + current projects
+ comp= lete pathnames to various executables
+ firefox plugins
+ firefox plugin directory paths
+ windows directory paths
+ paths to ssh keys
+ complete specification of the windows image I am running=

You do not need my full environment, nor would more= than a few people give it.

And my full envir= onment is not sufficient either. =C2=A0You need a knowledge of windows programming.
I cannot supply that. If you cannot, say so.=

Jerry


On Sat, Apr 2, 2016 at 1:02 PM, Eli Zaretskii = <eliz@gnu.org><= /span> wrote:
> From: Michael Albinus = <michael.albinus@gmx.de>= ;
> Date: Sat, 02 Apr 2016 21:47:48 +0200
> Cc: 23186@debbugs.gnu.org=
>
> If you are interested in changing Tramp according to your needs, pls b= e
> cooperative. Make a proposal about a config option which could be used=
> instead of the COMSPEC env which doesn't exist in your environment= . Make
> a proposal how to avoid calling cmd.exe at all, it seems not be
> mandatory, I believe. Propose something else what is possible.
>
> Your first proposal, trusting C:\Windows\system32\cmd.exe, hasn't = been
> accepted, by reasons Eli has given. And indeed, it looks too me like t= oo
> much heuristic, so I'm with Eli.

I asked a question which might suggest a solution.=C2=A0 The idea is that if we cannot trust COMSPEC, then we had better made sure what can we
trust in the environment, because Emacs uses the environment variable
for many other important needs, and one way of finding cmd.exe is
through other environment variables.

If the OP answers the question, we might be on a more constructive
path.

--001a11458eb4f988b8052f86351e-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 16:21:56 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 20:21:56 +0000 Received: from localhost ([127.0.0.1]:49177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amS3Q-00020a-Cf for submit@debbugs.gnu.org; Sat, 02 Apr 2016 16:21:56 -0400 Received: from mail-vk0-f45.google.com ([209.85.213.45]:35417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amS3O-00020N-N2 for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:21:55 -0400 Received: by mail-vk0-f45.google.com with SMTP id e6so139882452vkh.2 for <23186@debbugs.gnu.org>; Sat, 02 Apr 2016 13:21:54 -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 :cc; bh=/Tfp/FTBq07cVRy2azoUzekAJQnJiOh0GxxNbGk7dEk=; b=PhJeJXr4TM1kw3gsRd7Io1k4LbkE6O9HMBhiE0dXa20VYUrSTeXwfGgSVDPxwZPxJ0 ptCdScFaCkonyeqdxZrk2taf1x+GN4j+DYBoNgSjDeP8loPgmrpFEDSemi8iHM6E4sc4 jW9HWTr/tUUTjNVUM0mQEmMJMHIgpi6lMIVcuJyhxFwOkaWiruRiwyqzT+S3zHLkIvEy JS7/cvRXKAPKO9C7BwzkoWL4o+nl07wLJNyR9Cl4lIehBh5p87KHUewOq7hxAgIVLqyS R0fHZ6TXIEvE0rdEIvc4Oi27qUlgm7sgO+WV1v1BtuTy0CMXhev2qJPhKFN5rEBmvLCj U3yg== 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:cc; bh=/Tfp/FTBq07cVRy2azoUzekAJQnJiOh0GxxNbGk7dEk=; b=W6IFyjfnUoj24UM3YAyI8gz7uCmmsTTuCviVyy+50dwrq/l50TjReLweV4B4/h+uDT oGgZGJ0HHvR7gDrfNRkSW4DRCtxrKrhw3/3GFVANYMxKypJBEIoZCHwKkqoLXyVFCcvv PMnPdIbpYK7ydz/ymiLMuEhqh+wul1m02KLWnSZut+SNPYsSSTr92YVGvIpwxcZOsqK6 9wBLidFaEDkDnsDwFv50AgcidpazX0MRCynTWzQVZIH0fvjl8Kn2ie2mi6trKtWLhUyP SWON8MDybq2oHFatHz1/SIjcOBVLZrKGp+R+Axf7yvo+daijRmo1RRK/cg9yGgP2Br7q Gs8Q== X-Gm-Message-State: AD7BkJIeSJD2HqXPfvRWnXx6JDJFnmCREJH/xs6DlZn8Jgh7F7Ap98yGlnhR472Nv+Vlya5vLImycLrVQlVHrQ== X-Received: by 10.159.34.50 with SMTP id 47mr1129320uad.75.1459628509427; Sat, 02 Apr 2016 13:21:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.45.74 with HTTP; Sat, 2 Apr 2016 13:21:30 -0700 (PDT) In-Reply-To: <83pou7rd5t.fsf@gnu.org> References: <8337r4rme5.fsf@gnu.org> <87eganpzsg.fsf@gmx.de> <83pou7rd5t.fsf@gnu.org> From: Jerry Asher Date: Sat, 2 Apr 2016 13:21:30 -0700 Message-ID: Subject: Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a113dc834ceffcf052f863e2f X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 23186 Cc: Michael Albinus , 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --001a113dc834ceffcf052f863e2f Content-Type: text/plain; charset=UTF-8 Since the two of you have decided that a verbose warning is all that is required to satisfy the problems THESE people are reporting and have reported for years, since you have decided that assigning a guaranteed bad value is better than setting a mostly correct value, https://www.google.com/search?q=emacs+cmd.exe+tramp-encoding-shell+string-match Then I gather I was correct in my earliest decision that working with you was an exercise in futility and frustration. On Sat, Apr 2, 2016 at 1:03 PM, Eli Zaretskii wrote: > > From: Michael Albinus > > Cc: Jerry Asher , 23186@debbugs.gnu.org > > Date: Sat, 02 Apr 2016 21:37:51 +0200 > > > > The Tramp maintainers could check, whether COMSPEC is set, and raise a > > verbose warning in case it isn't. Refusing further work. > > That'd be fine with me. > > > Shall I commit this to the emacs-25 branch, or to master? > > emacs-25, I guess. > --001a113dc834ceffcf052f863e2f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Since the two of you have decided that a verbose warning i= s all that is required to satisfy the problems THESE people are reporting a= nd have reported for years, since you have decided that assigning a guarant= eed bad value is better than setting a mostly correct value,

=

Then I gath= er I was correct in my earliest decision that working with you was an exerc= ise in futility and frustration.


<= div class=3D"gmail_extra">
On Sat, Apr 2, 201= 6 at 1:03 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Michael Albinus <michael.albinus@gmx.de>
> Cc: Jerry Asher <ja2038@gmail.c= om>,=C2=A0 23186@debbugs.gn= u.org
> Date: Sat, 02 Apr 2016 21:37:51 +0200
>
> The Tramp maintainers could check, whether COMSPEC is set, and raise a=
> verbose warning in case it isn't. Refusing further work.

That'd be fine with me.

> Shall I commit this to the emacs-25 branch, or to master?

emacs-25, I guess.

--001a113dc834ceffcf052f863e2f-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 16:29:03 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 20:29:03 +0000 Received: from localhost ([127.0.0.1]:49181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amSAJ-0002Ap-6D for submit@debbugs.gnu.org; Sat, 02 Apr 2016 16:29:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amSAG-0002AK-UV for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:29:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amSA8-0002qL-Md for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:28:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amSA8-0002qH-JU; Sat, 02 Apr 2016 16:28:52 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1723 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1amSA7-0005u7-TH; Sat, 02 Apr 2016 16:28:52 -0400 Date: Sat, 02 Apr 2016 23:28:22 +0300 Message-Id: <83mvpbrc0p.fsf@gnu.org> From: Eli Zaretskii To: Jerry Asher In-reply-to: (message from Jerry Asher on Sat, 2 Apr 2016 13:11:01 -0700) Subject: Re: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) References: <831t6nsyzy.fsf@gnu.org> <87a8lbpzbv.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23186 Cc: michael.albinus@gmx.de, 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Jerry Asher > Date: Sat, 2 Apr 2016 13:11:01 -0700 > Cc: 23186@debbugs.gnu.org > > What is the full contents of the environment of the Emacs process when > you run that zapped binary? I'm still waiting for the answer to that question. It's important, for the reasons explained below. > WHAT DO YOU THE MAINTAINER PROPOSE as a solution? We don't yet understand the problem to have a proposal. I asked a question that might lead to a proposal. If you are interested in solving the problem, please answer it. > Since I am not a windows developer, I think my actual proposal setting the value to > "%SYSTEMROOT%\system32\cmd.exe" is a reasonable first start. How do we know that we can trust %SYSTEMROOT% to be in the environment, if %COMSPEC% is not there? How can we trust _any_ environment variable, for that matter? That's why I asked that question: to know what exactly is and isn't in the environment. I don't see how we can advance without knowing that, and I certainly don't see how that question could be taken as a slur. > I don't know where cmd.exe is supposed to live, or how it's supposed to be found, but I do know the path I > suggested, which misrepresented as you and Eli have done, actually works and would work FAR better than > setting it to NIL. You are, of course, free to change your copy of Emacs as you see fit. That is what Free Software is for. But when you ask us to incorporate the solution in upstream code, the solution must be correct for everyone, not just for you. And it must be well understood, because any solution will have to be maintained from this point onward. As a matter of fact, I still don't see how COMSPEC could disappear from the environment just because you made Emacs a GUI program. I just tried that on my system, and couldn't reproduce the problem. Maybe it's something specific to Windows 10. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 16:30:36 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 20:30:36 +0000 Received: from localhost ([127.0.0.1]:49185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amSBo-0002EG-Iw for submit@debbugs.gnu.org; Sat, 02 Apr 2016 16:30:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amSBo-0002E3-0z for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:30:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amSBf-0003Ck-N9 for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:30:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amSBf-0003Cg-JE; Sat, 02 Apr 2016 16:30:27 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1724 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1amSBe-0008Fm-9q; Sat, 02 Apr 2016 16:30:27 -0400 Date: Sat, 02 Apr 2016 23:29:56 +0300 Message-Id: <83lh4vrby3.fsf@gnu.org> From: Eli Zaretskii To: Jerry Asher In-reply-to: (message from Jerry Asher on Sat, 2 Apr 2016 13:21:30 -0700) Subject: Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match References: <8337r4rme5.fsf@gnu.org> <87eganpzsg.fsf@gmx.de> <83pou7rd5t.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23186 Cc: michael.albinus@gmx.de, 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Jerry Asher > Date: Sat, 2 Apr 2016 13:21:30 -0700 > Cc: Michael Albinus , 23186@debbugs.gnu.org > > Since the two of you have decided that a verbose warning is all that is required to satisfy the problems THESE > people are reporting and have reported for years, since you have decided that assigning a guaranteed bad > value is better than setting a mostly correct value, > > https://www.google.com/search?q=emacs+cmd.exe+tramp-encoding-shell+string-match > > > Then I gather I was correct in my earliest decision that working with you was an exercise in futility and > frustration. Only if you have decided that in advance. Because you are talking to people who accept, analyze, and solve bugs all the time, you can see that in the Emacs commit log. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 16:34:27 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 20:34:27 +0000 Received: from localhost ([127.0.0.1]:49193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amSFX-0002Ju-CK for submit@debbugs.gnu.org; Sat, 02 Apr 2016 16:34:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41011) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amSFV-0002Jg-Pd for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:34:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amSFN-0004Lr-Hl for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 16:34:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amSFN-0004Ll-EA; Sat, 02 Apr 2016 16:34:17 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1733 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1amSFM-0005ye-Ma; Sat, 02 Apr 2016 16:34:17 -0400 Date: Sat, 02 Apr 2016 23:33:47 +0300 Message-Id: <83inzzrbro.fsf@gnu.org> From: Eli Zaretskii To: Jerry Asher In-reply-to: (message from Jerry Asher on Sat, 2 Apr 2016 13:19:01 -0700) Subject: Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) References: <831t6nsyzy.fsf@gnu.org> <87a8lbpzbv.fsf@gmx.de> <83r3enrd72.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23186 Cc: michael.albinus@gmx.de, 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Jerry Asher > Date: Sat, 2 Apr 2016 13:19:01 -0700 > Cc: Michael Albinus , 23186@debbugs.gnu.org > > > What is the full contents of the environment of the Emacs process when > you run that zapped binary? > > My full environment contains a lot of internal information with private data with security implications Your private data cannot help solving this problem, so you can just elide it. > And my full environment is not sufficient either. You need a knowledge of windows programming. > I cannot supply that. If you cannot, say so. You may wish looking at the number of Windows-related commits I made in the Emacs repository. Maybe that will convince you to reconsider your views on my abilities. Once again, if you decide to be constructive, it's possible that we will eventually understand the nature of this problem and solve it. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 17:36:15 2016 Received: (at 23186) by debbugs.gnu.org; 2 Apr 2016 21:36:15 +0000 Received: from localhost ([127.0.0.1]:49237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amTDL-0003m2-0x for submit@debbugs.gnu.org; Sat, 02 Apr 2016 17:36:15 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:36684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amTDI-0003lk-JL for 23186@debbugs.gnu.org; Sat, 02 Apr 2016 17:36:13 -0400 Received: by mail-oi0-f41.google.com with SMTP id y204so3054001oie.3 for <23186@debbugs.gnu.org>; Sat, 02 Apr 2016 14:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version; bh=xPXSEbDhPK4c+ovdMdCD1SaZEZ89raIGB+M3umnai8s=; b=NJCgSpgBEDOw0ljUKaQGnY4sTmfOlYNwxl2fC4+hFrHS2ZCyg8KrxrQJdGRisEryLt /fpUSRPD3kzue3Gs7f+R4hVAhIvXtxmrmEj6Zn32ok2ujgIdUfypWVMDugo27FYwMk9p 7Jyqjajh2Jxl0Zkb563U15QIVbE4ZGT7Da/ipk7vMkEn42TurfYJhyI/0alI9yY64LMi 3zeSjkA/aypFae4+7E1LV//IY4+1s95DqsY2lvDjNf/EsmKJdVEhn67EwK1YeGUGb1en yMz85RzCQkDvTqRtceE5W+8HySXaAIHLpIGcF2bTxUSWncSH1PWwerhDGGzBu2NDPCJW fmdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:mime-version; bh=xPXSEbDhPK4c+ovdMdCD1SaZEZ89raIGB+M3umnai8s=; b=BAC0ohK5h1qCFrv6NfweT0wvT+TbtviRiYBmUulMKLt6Fp5pjp0VdnaB94OKJPnrBo 2/7XqC9HAiHEFpmdPNsa3UboBNkzT9WIAYD7J7pV/eDgln+k9ud4MlD76izHvs0j9Ep1 OPwnFHp60Hk7K+Tg82KV1xU5FwnhjweL1UgGprXKLX92IFYb77R6K6aXiE++eIb3rtPu hpotjpkG9nXAy1dJ3Y+pzg0e/uO5iJrHEeobNLETGy+CvTRDYQyB8m8+49uS2g5A7cHP lpZB4//VieC9uMHKXuIxgiJ98xQz1REmttIWxmZ806Zlpu0LAgzyK7wy4rQTKYA7I5/H WSGA== X-Gm-Message-State: AD7BkJKc2hTKlsZP5LmlzNtOLm+jeaELFrsdDvd1qKxaP0f6uFPeIh/DH7I1dIF6x0FOFg== X-Received: by 10.157.24.107 with SMTP id t40mr4626110ott.142.1459632966993; Sat, 02 Apr 2016 14:36:06 -0700 (PDT) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id r10sm6197273oih.15.2016.04.02.14.36.06 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 02 Apr 2016 14:36:06 -0700 (PDT) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id 423DD13D1E398; Sat, 2 Apr 2016 14:36:05 -0700 (PDT) To: Jerry Asher Subject: Re: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) In-Reply-To: (Jerry Asher's message of "Sat, 2 Apr 2016 13:11:01 -0700") Date: Sat, 02 Apr 2016 14:35:55 -0700 Message-ID: References: <831t6nsyzy.fsf@gnu.org> <87a8lbpzbv.fsf@gmx.de> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.92 (darwin) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23186 Cc: Michael Albinus , 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable >>>>> Jerry Asher writes: > Michael, I am not interested in a flamewar, regardless, your trust in him > aside, I was abused by Eli this morning. Jerry, I have read all the messages in this report, and you were not "abused by Eli". Your stance in this dialog has been both accusatory and inflammato= ry, and I cannot blame any volunteer for deciding not to work with you on this issue. If any other of the other people you claim this bug is important to wishes = to step forward and champion the matter, I would be happy to reopen, and conti= nue discussing it with them. But it is fairly clear no progress will be made he= re right now, and I do not wish our contributors to waste any further time. =2D-=20 John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGcBAEBCgAGBQJXADs7AAoJEMFE2PTxn+Ywb3oMAM2sQxZKnaf1qh0QsET0AAVV 8LHJ34HxI6FI0sI4AA6wtUhC6VtHrbCGPXfAChT5JQj8iq3op+Hzz4LXX+SdxQG8 g/4M6ynNSnpa2pv3h9Apvm1TpKk153x8eL8WClzDsDjpiJfuhlqy/6tn7x6k5KoK E1Y1xwEetC+gKJD4X5X6E+rlXJKIMU/sHOVwLpfyExlWYgw9NDtyUI9+dCi5IzeT C2/UrKa0W2si70Ich9e5JXy25nWUZxJ1Iu+ZGyLNeMmF9K+DP8nC7JbvdoLrCXXx G9eVWZ+Y5gAK2dGUPK9Snaqi7/4HCAwgrqnOaozZdzdtuQUdDOmRgJ2aszpbs/HK TKP03UqKzBCfuo0SfzHq8iIJpl27IELEhT0hzDXInXlCjoUHlsVjmjmHPQlKu6Z1 CXJrkua3asAcyaf8Y2iOhAwhJQMPM6imvHDZvdwAVKDvMs4/Hc/cJsDe8JRj2HZX ncgNMUXhiasH9BiW7zQdFD1QFiFIivPHI6UbjiSXoA== =Wafe -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 03 03:05:19 2016 Received: (at 23186) by debbugs.gnu.org; 3 Apr 2016 07:05:19 +0000 Received: from localhost ([127.0.0.1]:49384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amc63-0002PK-0a for submit@debbugs.gnu.org; Sun, 03 Apr 2016 03:05:19 -0400 Received: from mout.gmx.net ([212.227.17.21]:56339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amc60-0002P4-HU for 23186@debbugs.gnu.org; Sun, 03 Apr 2016 03:05:17 -0400 Received: from detlef.gmx.de ([87.146.46.179]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MVNWU-1bLG8Z0QGs-00YlcK; Sun, 03 Apr 2016 09:05:09 +0200 From: Michael Albinus To: Jerry Asher Subject: Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match References: <8337r4rme5.fsf@gnu.org> <87eganpzsg.fsf@gmx.de> <83pou7rd5t.fsf@gnu.org> Date: Sun, 03 Apr 2016 09:05:04 +0200 In-Reply-To: (Jerry Asher's message of "Sat, 2 Apr 2016 13:21:30 -0700") Message-ID: <87twjjnpen.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:mcZxzdiiddh3UtLKxi93kE5FhRUP8WrtRvZuiADhUrJfHsExezE k9wwS1oWhvyMwja+mZfhyCPz6AN5Lq1jCvBBUDkHo4wjL/mimaa+LT8vhAYTAL/5fV2BCKo nk8sG6/30QxsizHvXgfqJSyEGQtRvIQSUkT6NXU7dsaFnJg6qRbSqyx2w+60nbGoSM2sb5g K4rZ0FIY6rJ6Rc4RItcLw== X-UI-Out-Filterresults: notjunk:1;V01:K0:Rrtzbnl+Kuc=:QqirOgR5mIpMG/HmDKkoWP MlNpkfbYt2UcOXcPgWrcBQh+YVbaTJpZtvNPD/7YbV6eS8mwL5QdKm1SbUnEBmxJEUSiJLTIF 5di++yb6WHTwcBP7IupKd9BTMIglsLDC3TYOnbH2g449SJbKpjyBrF4llgidWbTl05QBJd/Qg tiAgJN03Pr/CucK0bikzmfFCM/2psR95y5QFU7TTRcwOtL5QUgAPVlZlfbrIWP4PsI4SDTw1i Q4XARIGQxB2kFlaYRxxV27ROgLZOpuN8WZhfCpLIiCnh+fFTjdpZb25flCOfU1ut1geeuo/ly z+ifle8wVTUlfLgwlySiPbUHYEN3i9g0MnjzMudI9V0ACko6z8qwJYITnEE+RGUNySIEqet9Z QbLuDqlfv/K0S1dbKLxvtLax96WnHQJDXLI/yrD/yPQaAPsJBiX987S+IAIpEKxSGeyJYzr5K oie7lNB2mAB0D90t9SSGA1j7fXD27yMEZ3tbjEXsKQlXCXFUxJniJDg3mBty30YZaV+VJ47xl 457yLJ8vVY7rqUFfzvGx6Pt5hilDlr9s3scKoFxsIoGacAQVJPNNMTs4vRS9G7WSeYW5dXE2b I4Vs6uH4t1o+LmB0UHthaJWd8BB9vTaW7ymkGlpJV1ySufKzJOUqU57uG5YhGawHoNXlSmxZi i6H4/LnBi2uOjTMEsTAvaTm7OxT9gwYRcW7P6T7GKSgn7QxGvO6yEZE0qsBu2zb9DR5MkLBv7 9guITlod76z1FNWmmoB3uekVGY4cea6IUQJAhfL5A0YNBUWD1iPX4ecr2nbdOswM4/EpK8mz2 FCpox6d X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23186 Cc: Eli Zaretskii , 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Jerry Asher writes: Hi Jerry, [sorry for the slow response, I'm fighting with bronchitis these days] > Since the two of you have decided that a verbose warning is all that > is required to satisfy the problems THESE people are reporting and > have reported for years, since you have decided that assigning a > guaranteed bad value is better than setting a mostly correct value, It would be helpful if you don't take any statement from us as personal attack. We don't attack you, we are just slightly demotivated by your sound. I don't know what's the style somewhere else, but here in Emacs development we behave respectful. This does not mean that everything is accepted when you propose something, and it could happen that a proposal is rejected, but it is *your* responsibility then to convince us. Not all of us are idiots. Coming back to the proposal: Emacs 25.1 is frozen, I won't apply serious changes there. That's why both Eli and me have agreed to detect the problem and report, and nothing else. But this wouldn't prevent us from finding a better solution for further Emacs version, if possible. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 03 03:15:23 2016 Received: (at 23186) by debbugs.gnu.org; 3 Apr 2016 07:15:23 +0000 Received: from localhost ([127.0.0.1]:49393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amcFn-0002du-87 for submit@debbugs.gnu.org; Sun, 03 Apr 2016 03:15:23 -0400 Received: from mout.gmx.net ([212.227.17.21]:51837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amcFl-0002df-Ml for 23186@debbugs.gnu.org; Sun, 03 Apr 2016 03:15:22 -0400 Received: from detlef.gmx.de ([87.146.46.179]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LeiJ8-1bcmvk0boE-00qQl5; Sun, 03 Apr 2016 09:15:14 +0200 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) References: <831t6nsyzy.fsf@gnu.org> <87a8lbpzbv.fsf@gmx.de> <83mvpbrc0p.fsf@gnu.org> Date: Sun, 03 Apr 2016 09:15:11 +0200 In-Reply-To: <83mvpbrc0p.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 02 Apr 2016 23:28:22 +0300") Message-ID: <87pou7noxs.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:fVdB+Nyv1iJUpi496QUdgFFeUVIwYlmonqCgRSbM0lldOYKPrqH DE33Vj9i0uS8LsTGOKTjzRzmcBAZjDXbNm4UAzUQr6Aoa2CERrWJtvU64KUCPmARKQaBYgQ zUpHAWXs4HJorAqc7u9E+b6NvgGT2XICUZTPQw6CXxMnCyg8hOa3hlCYVhF5RYLdmL1MCi9 OowTaZa07VfH6JgYw9vPw== X-UI-Out-Filterresults: notjunk:1;V01:K0:A9pNvFNJQeU=:HQaIoInbK/LIVsVrzIjdm0 +wARTt8OLdwFDdsDLDt79dXf68tvctC1ViWnZxKq/2Eddy4oK6xcPqyzQhjCF/C3K0MxUVR1y eH8u6h/P5aDg3cB+YyL85ynO0iMU06ktbzqq9yPJ+ylV43Kz34K968nblo6huk9u24+PzYwac VYzcfJZcc7whPYOWgo5q8Sjdffi2Z3r2bJppMHpo+K5+ZsMQChAUR4l2St/17iiQbI3faKHXN 4977Dd3t88jU7bjG4MlXGGv0VGMX9dTU8Dra5PDNmtHL1CKQWGkwJJfnOtRPb7gWKQTm2aXr+ trU5Ap+EgwrteYrl+ld4S4Uo4cifI0e2m2AUO2oNt1FDrB3AL7YFfWld6S/ti+kdY3+UobgS1 TN+ypOOHtvYR5AsQNOITTbFgFpQQ54Y29yFe0AD4V2vAJaIhLsz7t1U8KQxMPiKI2d3qG4PYM XcwLTTYnOcdNX/i8C5AaElrOsHnGZB9QHAiyYTtq1Jf1duQkkFd/m3j5iSSnQH0Iib0VkKhB2 kasl1xCGinQLvLQB2xPJfZ+/ypiF6Iarn4sDPBQr6ueTGnSqS33LXRhLAq+8l6RnUg9TuID9M +tOSCK9PfMzvdJEpMPyNHBr8LKq0qJUqGPGNNTGEkd7rpEN3xY+RbKqZVxc5BY0CYERbXl4yl MN14CzzXpPXs6k8F4oUenpsqTPFFfsgDKpt8Qz0BSIybseHbJ/6gyForiE4HmS+1bVtoQLE0S RQaMb3I0amsOAzoRR6xOf+KYHgqFPt+XEvdPknuExPX7a67SLfGnYlCyQBTHxYTgU/m6LCJWi 7U4ELkK X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23186 Cc: Jerry Asher , 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: Hi Jerry, >> What is the full contents of the environment of the Emacs process when >> you run that zapped binary? > > I'm still waiting for the answer to that question. It's important, > for the reasons explained below. I second Eli. First of all we must understand why COMSPEC isn't set in your case. Just applying a workaround doesn't suffice at first glance, it could be that there is amuch more serious problem behind. Tramp could be just the first victim entering this problem. Who knows. >> WHAT DO YOU THE MAINTAINER PROPOSE as a solution? Investigate. As Eli proposed. And for the upcoming Emacs 25.1, we just report the error. We cannot do anything else so late in the pretest. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 03 10:52:37 2016 Received: (at 23186) by debbugs.gnu.org; 3 Apr 2016 14:52:37 +0000 Received: from localhost ([127.0.0.1]:50079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amjOH-0006qJ-JH for submit@debbugs.gnu.org; Sun, 03 Apr 2016 10:52:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44047) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amjOG-0006q7-1X for 23186@debbugs.gnu.org; Sun, 03 Apr 2016 10:52:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amjO6-0000C0-R3 for 23186@debbugs.gnu.org; Sun, 03 Apr 2016 10:52:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amjO6-0000Bw-NP; Sun, 03 Apr 2016 10:52:26 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3062 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1amjO5-0006jU-VO; Sun, 03 Apr 2016 10:52:26 -0400 Date: Sun, 03 Apr 2016 17:51:58 +0300 Message-Id: <83egamrbht.fsf@gnu.org> From: Eli Zaretskii To: Jerry Asher In-reply-to: (message from Jerry Asher on Sat, 2 Apr 2016 09:06:57 -0700) Subject: Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23186 Cc: 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Jerry Asher > Date: Sat, 2 Apr 2016 09:06:57 -0700 > > The problem is that Windows can sometimes (see caveat below) start emacs such that COMSPEC is not defined. (The caveat being that the OP poked the PE headers of the Emacs binary to change its subsystem from 'console' to 'windows'.) FWIW, I cannot reproduce this problem. I've compiled a simple Windows GUI program that calls 'getenv', and it can access the COMSPEC variable without any trouble. I also used 'objcopy' to change the subsystem of the Emacs executable to 'windows' (which should have the same effect as what the OP did with a Python script), and the resulting executable does have COMSPEC in the environment when it starts. So I'm quite sure some other factor is at work here, most probably something in the user customizations. Looking at the value of process-environment after starting "emacs -Q" should be the first step for investigating the reasons for this behavior. If COMSPEC is not there in "emacs -Q", the next step is to describe the local configuration with system shells; if it is, look at your customizations in ~/.emacs and elsewhere. > Once more, I am not a windows developer, you are the maintainer, I have reported a bug, a bug felt not just by me but by many others, the current code, which sets it to NIL is 10,000% guaranteed to be wrong, since you REJECTED my proposed suggestion which would seem to work in most cases and be a great place to start, > > Here are a list of many other people who see this bug: > https://www.google.com/search?q=emacs+cmd.exe+tramp-encoding-shell+string-match The relevant hits of this Google search seems to point to just 2 reports, both of them look like they are related to magit. (Another report, where it turns out the user tried to use PowerShell as the system shell, can be disregarded as a situation that will never work on Windows without a lot of tinkering.) I didn't find any such issue in the magit issue tracker, so I'm not sure what's going on there. I suspect something related to the local setup with shells, perhaps, or maybe something related to Python mode. In any case, these reports don't seem to provide any useful information about the reason for the problem, as they all end in the user using the Tramp customizations to set tramp-encoding-shell directly, which btw is an okay solution, it just cannot be used in the default value of the defcustom, for the reasons explained up-thread. Last, but not least: COMSPEC is used in Emacs by more than just Tramp. For example, using M-! etc. to run commands that require a shell will not work without COMSPEC in the environment, because cmdproxy.exe uses the same method to find cmd.exe that Tramp does, and will fail if it cannot find it. So the Tramp problem is just the tip of a rather large iceberg. To summarize: . making Emacs a GUI app doesn't in itself interfere with COMSPEC . without COMSPEC in the environment many other Emacs features will fail . more information about the OP's setup is required to understand the reason(s) for the problem From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 03 10:55:00 2016 Received: (at 23186) by debbugs.gnu.org; 3 Apr 2016 14:55:00 +0000 Received: from localhost ([127.0.0.1]:50083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amjQa-0006tn-1C for submit@debbugs.gnu.org; Sun, 03 Apr 2016 10:55:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amjQY-0006tb-HX for 23186@debbugs.gnu.org; Sun, 03 Apr 2016 10:54:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amjQP-0000Wq-Ii for 23186@debbugs.gnu.org; Sun, 03 Apr 2016 10:54:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amjQP-0000Wm-FB; Sun, 03 Apr 2016 10:54:49 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3074 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1amjQO-0006uT-Ny; Sun, 03 Apr 2016 10:54:49 -0400 Date: Sun, 03 Apr 2016 17:54:21 +0300 Message-Id: <83d1q6rbdu.fsf@gnu.org> From: Eli Zaretskii To: Michael Albinus In-reply-to: <87a8lbpzbv.fsf@gmx.de> (message from Michael Albinus on Sat, 02 Apr 2016 21:47:48 +0200) Subject: Re: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) References: <831t6nsyzy.fsf@gnu.org> <87a8lbpzbv.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23186 Cc: ja2038@gmail.com, 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Michael Albinus > Date: Sat, 02 Apr 2016 21:47:48 +0200 > Cc: 23186@debbugs.gnu.org > > Make a proposal about a config option which could be used > instead of the COMSPEC env which doesn't exist in your environment. Make > a proposal how to avoid calling cmd.exe at all, it seems not be > mandatory, I believe. Propose something else what is possible. Let me try ;-) Can you (Michael) explain why does Tramp need this variable, and also why it needs the companion tramp-encoding-command-switch? Why not just use shell-file-name and shell-command-switch? Or, if you must look deeper, why not call w32-shell-name or w32-shell-dos-semantics? I think these already do what you need tramp-encoding-shell for, but maybe I'm missing something. If I'm right, and Tramp doesn't really need to calculate the shell's name separately from the rest of Emacs, then this problem will cease to be a "Tramp problem". That won't solve the larger problems the OP would have in Emacs, but at least Tramp will no longer be accused ;-) From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 03 11:55:39 2016 Received: (at 23186) by debbugs.gnu.org; 3 Apr 2016 15:55:39 +0000 Received: from localhost ([127.0.0.1]:50108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amkNG-0008IM-Pw for submit@debbugs.gnu.org; Sun, 03 Apr 2016 11:55:38 -0400 Received: from mout.gmx.net ([212.227.15.18]:57602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amkNF-0008I9-49 for 23186@debbugs.gnu.org; Sun, 03 Apr 2016 11:55:37 -0400 Received: from detlef.gmx.de ([87.146.46.179]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MLfLH-1an1cY3t9H-000qKh; Sun, 03 Apr 2016 17:55:30 +0200 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) References: <831t6nsyzy.fsf@gnu.org> <87a8lbpzbv.fsf@gmx.de> <83d1q6rbdu.fsf@gnu.org> Date: Sun, 03 Apr 2016 17:55:29 +0200 In-Reply-To: <83d1q6rbdu.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 03 Apr 2016 17:54:21 +0300") Message-ID: <87a8laoff2.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:Bc1QotPussH9stIogq2xT9L9QE93KQlK9q6ioeOkPdCQHSpSQgU QmMiFOywACq4Jsy6R2+CTiamAX9ym7Kb8Wykc7IQA0WucJUeB6rfZadR9vcdcYM7FxTv5mT oFfMLJTjaEJh+7gz2l9bacCuP/5RWR/wWOaDu9AsL9NrcuFcK0u+eJ9R/NG8D7t4Cw0lcz/ xUr3H/fTziv3u/2r0mvig== X-UI-Out-Filterresults: notjunk:1;V01:K0:I2TioDenq0s=:p5m/i/Wv4h195PoaED7+KZ 1r7w0d/9Z1PJ7VS+7OvgxDVegorJ28FrJFqUadCRZbrjxsJQrRSsFB7VQ28OWt8e9DQ0n+Zk8 P15JKBuRw9OxsLMAbHrP48Nfzvm3kGxRrnsdaUvtK+dUoqmEM0OPiBqwiJ+si9nAkPbSdEkIr 02h1xu86OSvt0tQTOvs7u4AjHERqi2X2C/8Z06Q3lpRWKpHCFisSlGEt3U2N/+CE2ghQ+Jxjb YLPEnd1hY5cCD1KtHnPh0ePcXNuoUi/tTJAA07HOLEBJu5Iw5l3d1RmTQ2D1DiSkjz1+HmVtW mE5lxx0cwlZNn2Gzi4IwfhE5YfsJ1yLvNuhO0VQrDZaMLMp3p0tsNVUmvZ98nOzRjo6l8Etz1 8i6ZXpYV2s4880Lp6+S9SlN+lZueYsRL8K7oDzICymlyCzVV0ETCXTozsBa27XqrP/I/Nb2ax 3ZyvVjLsCMh2kLEfGvjexwjFMZfEI4WI2w3me6RXzTBHBlcmBqy0ITreqya9M6QahAXntFdpW 1AyzQzAA/UH79nkjJN/cxhVoxl35p1FkX2jKZQWcJg4fhryUZ8FOICmQqeVNUOh/8qJtHTjkI YDUN5FWwL+USVEQgEIe7D2M8PPvMMPkUWCdLiOOdN9YYkBlMnobIX6aaAfnyiFLnQT89HnzKU +XbNq28KlBS2Hswu3ak8pftrH4Y4bhwGnmzjc9IGDmH/AiArY/3GxJkA3ucv15/mCmAadMZx9 48Zq0Vto8WzfXtdc0GaG7W5+l6FdZtOZzMvZp8Ope2FH70dU18qW5jgiLe1y0KnlGprIYVOPP gNW3BPy X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23186 Cc: ja2038@gmail.com, 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: Hi Eli, >> Make a proposal about a config option which could be used >> instead of the COMSPEC env which doesn't exist in your environment. Make >> a proposal how to avoid calling cmd.exe at all, it seems not be >> mandatory, I believe. Propose something else what is possible. > > Let me try ;-) > > Can you (Michael) explain why does Tramp need this variable, and also > why it needs the companion tramp-encoding-command-switch? Why not > just use shell-file-name and shell-command-switch? Or, if you must > look deeper, why not call w32-shell-name or w32-shell-dos-semantics? > I think these already do what you need tramp-encoding-shell for, but > maybe I'm missing something. Well, this is set this way for decades. I don't remember the datails; likely it was used also for other cases than just local encoding/ decoding. And don't forget, Tramp has carried a lot of compat code, back to Emacs 21 and XEmacs. Maybe it was not possible to trust on `w32-shell-name'. This compat code has been removed recently. So it is applicable indeed, to use `w32-shell-name'. I've committed a patch to master, doing this. I don't know, whether the setting for `tramp-encoding-command-switch' is OK, 'tho. As usual, I cannot test it for w32. Let's see, whether we get reports :-) > If I'm right, and Tramp doesn't really need to calculate the shell's > name separately from the rest of Emacs, then this problem will cease > to be a "Tramp problem". That won't solve the larger problems the OP > would have in Emacs, but at least Tramp will no longer be accused ;-) Agreed. This fits perfectly to the Tramp cleanup, I have applied back in January. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 03 12:18:08 2016 Received: (at 23186) by debbugs.gnu.org; 3 Apr 2016 16:18:08 +0000 Received: from localhost ([127.0.0.1]:50126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amkj2-0000QM-Gm for submit@debbugs.gnu.org; Sun, 03 Apr 2016 12:18:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amkj1-0000QB-Ru for 23186@debbugs.gnu.org; Sun, 03 Apr 2016 12:18:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amkis-0000a5-9Q for 23186@debbugs.gnu.org; Sun, 03 Apr 2016 12:18:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amkis-0000a0-67; Sun, 03 Apr 2016 12:17:58 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3408 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1amkir-0003Cz-D6; Sun, 03 Apr 2016 12:17:57 -0400 Date: Sun, 03 Apr 2016 19:17:29 +0300 Message-Id: <831t6mr7ja.fsf@gnu.org> From: Eli Zaretskii To: Michael Albinus In-reply-to: <87a8laoff2.fsf@gmx.de> (message from Michael Albinus on Sun, 03 Apr 2016 17:55:29 +0200) Subject: Re: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) References: <831t6nsyzy.fsf@gnu.org> <87a8lbpzbv.fsf@gmx.de> <83d1q6rbdu.fsf@gnu.org> <87a8laoff2.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23186 Cc: ja2038@gmail.com, 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Michael Albinus > Cc: ja2038@gmail.com, 23186@debbugs.gnu.org > Date: Sun, 03 Apr 2016 17:55:29 +0200 > > > Can you (Michael) explain why does Tramp need this variable, and also > > why it needs the companion tramp-encoding-command-switch? Why not > > just use shell-file-name and shell-command-switch? Or, if you must > > look deeper, why not call w32-shell-name or w32-shell-dos-semantics? > > I think these already do what you need tramp-encoding-shell for, but > > maybe I'm missing something. > > Well, this is set this way for decades. I don't remember the datails; > likely it was used also for other cases than just local encoding/ > decoding. And don't forget, Tramp has carried a lot of compat code, back > to Emacs 21 and XEmacs. Maybe it was not possible to trust on `w32-shell-name'. I figured it was something like that. > This compat code has been removed recently. So it is applicable indeed, > to use `w32-shell-name'. I've committed a patch to master, doing this. I > don't know, whether the setting for `tramp-encoding-command-switch' is > OK, 'tho. The beauty of w32-shell-name is that you don't need to worry about the switch: cmdproxy supports both -c and /c (and even -C and /C). So you can now safely use just "-c" for tramp-encoding-command-switch. Or, if you want to be extra-cautious, and protect Tramp from people who point shell-file-name or $SHELL at something weird, you can use w32-shell-dos-semantics: if it returns non-nil, use /c, otherwise -c. > As usual, I cannot test it for w32. Let's see, whether we get reports :-) Yep. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 03 12:49:57 2016 Received: (at 23186) by debbugs.gnu.org; 3 Apr 2016 16:49:57 +0000 Received: from localhost ([127.0.0.1]:50134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amlDo-00018S-CZ for submit@debbugs.gnu.org; Sun, 03 Apr 2016 12:49:57 -0400 Received: from mout.gmx.net ([212.227.17.21]:61048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amlDm-00018G-Sq for 23186@debbugs.gnu.org; Sun, 03 Apr 2016 12:49:55 -0400 Received: from detlef.gmx.de ([87.146.46.179]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0M2WgT-1beSCc0nvp-00sO7Z; Sun, 03 Apr 2016 18:49:47 +0200 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match) References: <831t6nsyzy.fsf@gnu.org> <87a8lbpzbv.fsf@gmx.de> <83d1q6rbdu.fsf@gnu.org> <87a8laoff2.fsf@gmx.de> <831t6mr7ja.fsf@gnu.org> Date: Sun, 03 Apr 2016 18:49:45 +0200 In-Reply-To: <831t6mr7ja.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 03 Apr 2016 19:17:29 +0300") Message-ID: <87zitamyc6.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:XGFbD1eB35lR15WOCCCuUuGxCBxGEsKs0fOm4ur16DwSkxWVwAa nO6wvlVVUI5Mn6KUAmzrjdbkxwNGMOG9y050oH3Kum76AD+ZqElKR8ymFG3RAinu9VdYShT DHcaZ2cilehzXsZo36E2wB0eWbSU/qj6wkCCKPGH6f6Fx+IfnPAfPZpc3c0Y7/F6h1HqUgv BxYuaW1aVFGQORFRM4G0w== X-UI-Out-Filterresults: notjunk:1;V01:K0:DIgTIjIcG1k=:FkYAQ3cBakxUILiNoGKQ5t zspZmBfgs3xwUOJxsbGW9Ra88EKjG+iiNKz04KmNeool9rhk64xG1SCh02G/I4IiuUBAVDugc kLNP+xWUQ9FwS8AdX7rcuuvzTpQnZg4Ps+0ZYsjQ52ltHONMZcpNBoMps7dWPceV654ZZp3qx 7MnOUorLKTeXeFS+yubMqypJiZygwxWH81Uxgf+agaWP/j+6zivvByPJzPAhE09ouWgvQGh1N NfPQELVgfE5hv/T+noFtFnslaKRYffj+pXWrc1xgFyB+jtzgnOfcTxrwxdzDNS+EAvntmT5Iu bcyjVqNJiLG9Aq9JVoA1rcCcpZWLTJL6JKTiBiLyXQxwlTdK2TF7PTGbYlfjyvoplBWmZrBBq xNOsCXFf4SkQX8vxO7KYRIR2jA38WvhEZ0Ow7o0ZghDj8GPF+/m6SLI+e8MYO86NkN/Qs4E7Z XJ+/rKh5j2awDSjSCift+u4et9wtQBQS5dluQqPoIx0sMKfg+/plNpYWNeg6kEc2iqTL2iDy4 EXErxOBxEC/gTzfGr6CyNopR21soXxu91btBIW+yqZLdsuPorydiKzeAhrF+1HYqVTBuWLoj+ QrJGi2HYnyQQXmJP+JYzNTnNFmYg7vca14qjtmrOixK4P1XC5R6LRtntGc4gyocNsBq9Q24I8 U5WQDGHTlovgy1hPqMdzZ5WOdF40Rel2JzyCCsy9iUHQgPad/2IS1WGxKhm3Ytb9SakPdtAWF gW/eLEPYhI+AvP0NJftA60f4mzpIGxpWZ22imMZr6WZCyZUjerMYfx2xr+1ICaESHFxn+9f7E orUaw+K X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23186 Cc: ja2038@gmail.com, 23186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: Hi Eli, > The beauty of w32-shell-name is that you don't need to worry about the > switch: cmdproxy supports both -c and /c (and even -C and /C). So you > can now safely use just "-c" for tramp-encoding-command-switch. > > Or, if you want to be extra-cautious, and protect Tramp from people > who point shell-file-name or $SHELL at something weird, you can use > w32-shell-dos-semantics: if it returns non-nil, use /c, otherwise -c. I check (boundp 'w32-shell-name). This looks safe. If somebody uses weird settings, she will loose. > Thanks. From unknown Thu Sep 11 06:33:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 02 May 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator