GNU bug report logs - #29723
25.3; `compile' doesn't honor `tramp-methods', always uses "/bin/sh"

Previous Next

Package: emacs;

Reported by: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>

Date: Fri, 15 Dec 2017 19:57:02 UTC

Severity: normal

Tags: fixed

Merged with 24338

Found in versions 24.5, 25.3

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29723 in the body.
You can then email your comments to 29723 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#29723; Package emacs. (Fri, 15 Dec 2017 19:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 15 Dec 2017 19:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 25.3; `compile' doesn't honor `tramp-methods', always uses "/bin/sh"
Date: Fri, 15 Dec 2017 19:56:37 +0000
Hello,

Starting with emacs -Q, execute the following:

--8<---------------cut here---------------start------------->8---
(require 'tramp)
(let ((scpx-method (cdr (assoc "scpx" tramp-methods))))
  (add-to-list 'scpx-method '(tramp-remote-shell "/bin/bash"))
  (add-to-list 'tramp-methods (cons "scpx" scpx-method)))
--8<---------------cut here---------------end--------------->8---

Then use the "scpx" connection type to find a file on a remote host.  Then, use `shell-command' to run "echo $_".  I get an output of "/bin/bash".  Then, run the same command with `compile'.  I get an output of "/bin/sh".  I was expecting to again get "/bin/bash".

Thank you!

Daniel



In GNU Emacs 25.3.1 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1611))
of 2017-09-13 built on JSSLA17030925
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/usr/local/share/emacs/site-lisp
--infodir=/usr/local/Cellar/emacs/25.3/share/info/emacs
--prefix=/usr/local/Cellar/emacs/25.3 --without-x --with-xml2
--without-dbus --without-gnutls --with-imagemagick --with-ns
--disable-ns-self-contained'

Configured features:
JPEG IMAGEMAGICK NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Dired by name

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Tramp: Found remote shell prompt on ‘blade11-fsl’
Tramp: Opening connection for blade11-fsl using scpx...done
ls does not support --dired; see ‘dired-use-ls-dired’ for more details.
/bin/bash
Tramp: Opening connection for blade11-fsl using scpx...
Tramp: Sending command ‘exec ssh -q   -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none -t -t blade11-fsl /bin/sh’
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘blade11-fsl’
Tramp: Opening connection for blade11-fsl using scpx...done
Compilation finished

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec epg
epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils
compile dired tramp-cache tramp-sh tramp tramp-compat auth-source cl-seq
eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core cl-macs
gv gnus-util mm-util help-fns help-mode easymenu cl-loaddefs pcase
cl-lib mail-prsvr password-cache tramp-loaddefs trampver shell pcomplete
comint ansi-color ring format-spec advice time-date mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
ns-win ucs-normalize 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 kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 219866 11318)
(symbols 48 22367 0)
(miscs 40 65 321)
(strings 32 24665 6831)
(string-bytes 1 805327)
(vectors 16 37025)
(vector-slots 8 697142 5701)
(floats 8 228 204)
(intervals 56 503 0)
(buffers 976 21))


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29723; Package emacs. (Wed, 21 Feb 2018 22:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 29723 <at> debbugs.gnu.org (full text, mbox):

From: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>
To: "29723 <at> debbugs.gnu.org" <29723 <at> debbugs.gnu.org>
Subject: Re: bug#29723: Acknowledgement (25.3; `compile' doesn't honor
 `tramp-methods', always uses "/bin/sh")
Date: Wed, 21 Feb 2018 22:13:11 +0000
Hi,

I never received any reply to this bug report.  Did this one fall through the cracks?

Thank you!

Daniel

> On Dec 15, 2017, at 1:57 PM, GNU bug Tracking System <help-debbugs <at> gnu.org> wrote:
> 
> Thank you for filing a new bug report with debbugs.gnu.org.
> 
> This is an automatically generated reply to let you know your message
> has been received.
> 
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
> 
> Your message has been sent to the package maintainer(s):
> bug-gnu-emacs <at> gnu.org
> 
> If you wish to submit further information on this problem, please
> send it to 29723 <at> debbugs.gnu.org.
> 
> Please do not send mail to help-debbugs <at> gnu.org unless you wish
> to report a problem with the Bug-tracking system.
> 
> -- 
> 29723: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29723
> GNU Bug Tracking System
> Contact help-debbugs <at> gnu.org with problems





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29723; Package emacs. (Thu, 22 Feb 2018 06:23:01 GMT) Full text and rfc822 format available.

Message #11 received at 29723 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Matz\, Daniel A. \(JSC-EG511\)" <daniel.a.matz <at> nasa.gov>,
 Michael Albinus <michael.albinus <at> gmx.de>
Cc: 29723 <at> debbugs.gnu.org
Subject: Re: bug#29723: Acknowledgement (25.3;
 `compile' doesn't honor `tramp-methods', always uses "/bin/sh")
Date: Thu, 22 Feb 2018 08:22:50 +0200
> From: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>
> Date: Wed, 21 Feb 2018 22:13:11 +0000
> 
> I never received any reply to this bug report.  Did this one fall through the cracks?

Sorry about that.  Michael, can you please take a look?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29723; Package emacs. (Thu, 22 Feb 2018 09:04:01 GMT) Full text and rfc822 format available.

Message #14 received at 29723 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 29723 <at> debbugs.gnu.org, "Matz,
 Daniel A. \(JSC-EG511\)" <daniel.a.matz <at> nasa.gov>
Subject: Re: bug#29723: Acknowledgement (25.3;
 `compile' doesn't honor `tramp-methods', always uses "/bin/sh")
Date: Thu, 22 Feb 2018 10:03:41 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> I never received any reply to this bug report.  Did this one fall
>> through the cracks?
>
> Sorry about that.  Michael, can you please take a look?

Will do.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29723; Package emacs. (Thu, 22 Feb 2018 10:41:01 GMT) Full text and rfc822 format available.

Message #17 received at 29723 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: "Matz\, Daniel A. \(JSC-EG511\)" <daniel.a.matz <at> nasa.gov>
Cc: 29723 <at> debbugs.gnu.org
Subject: Re: bug#29723: 25.3;
 `compile' doesn't honor `tramp-methods', always uses "/bin/sh"
Date: Thu, 22 Feb 2018 11:39:37 +0100
"Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov> writes:

> Hello,

Hi Daniel,

> Starting with emacs -Q, execute the following:
>
> (require 'tramp)
> (let ((scpx-method (cdr (assoc "scpx" tramp-methods))))
>   (add-to-list 'scpx-method '(tramp-remote-shell "/bin/bash"))
>   (add-to-list 'tramp-methods (cons "scpx" scpx-method)))
>
> Then use the "scpx" connection type to find a file on a remote host.
> Then, use `shell-command' to run "echo $_".  I get an output of
> "/bin/bash".  Then, run the same command with `compile'.  I get an
> output of "/bin/sh".  I was expecting to again get "/bin/bash".

This is the same problem as bug#24338, I will mark your report as
duplicate.

In fact, "/bin/sh" is hardcoded for remote compilation in function
`compilation-start'. This shall be changed, using connection-local
variables, see (info "(elisp) Connection Local Variables")

It is on my todo list, but less prioritized. I would be happy if
somebody else takes the ball, and implements this in `compilation-start'.

> Thank you!
>
> Daniel

Best regards, Michael.




Merged 24338 29723. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Thu, 22 Feb 2018 10:44:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29723; Package emacs. (Thu, 22 Feb 2018 12:54:02 GMT) Full text and rfc822 format available.

Message #22 received at 29723 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 29723 <at> debbugs.gnu.org
Subject: Re: bug#29723: 25.3;
 `compile' doesn't honor `tramp-methods', always uses "/bin/sh"
Date: Thu, 22 Feb 2018 13:53:11 +0100
Robert Pluim <rpluim <at> gmail.com> writes:

Hi Robert,

>> It is on my todo list, but less prioritized. I would be happy if
>> somebody else takes the ball, and implements this in `compilation-start'.
>
> You mean this is going to be changed to enable the use of connection
> local variables, or it's already possible to do so?

The former. See for example `shell', where this has been done. Due to
this, you could set `explicit-shell-file-name' for different remote
connections.

However, meanwhile I believe we shouldn't implement it in every single
package which might profit from this. A better approach might be to call
it in `hack-local-variables'. Connection local variables would be
enabled then by every `run-mode-hooks' call, i.e., when a buffer
determines its major mode. Like directory local variables.

> Robert

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29723; Package emacs. (Sat, 09 Mar 2019 17:11:02 GMT) Full text and rfc822 format available.

Message #25 received at 29723 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: "Matz\, Daniel A. \(JSC-EG511\)" <daniel.a.matz <at> nasa.gov>
Cc: 29723 <at> debbugs.gnu.org, 24338 <at> debbugs.gnu.org
Subject: Re: bug#29723: 25.3;
 `compile' doesn't honor `tramp-methods', always uses "/bin/sh"
Date: Sat, 09 Mar 2019 18:10:30 +0100
Michael Albinus <michael.albinus <at> gmx.de> writes:

Hi Daniel,

>> Starting with emacs -Q, execute the following:
>>
>> (require 'tramp)
>> (let ((scpx-method (cdr (assoc "scpx" tramp-methods))))
>>   (add-to-list 'scpx-method '(tramp-remote-shell "/bin/bash"))
>>   (add-to-list 'tramp-methods (cons "scpx" scpx-method)))
>>
>> Then use the "scpx" connection type to find a file on a remote host.
>> Then, use `shell-command' to run "echo $_".  I get an output of
>> "/bin/bash".  Then, run the same command with `compile'.  I get an
>> output of "/bin/sh".  I was expecting to again get "/bin/bash".
>
> This is the same problem as bug#24338, I will mark your report as
> duplicate.
>
> In fact, "/bin/sh" is hardcoded for remote compilation in function
> `compilation-start'. This shall be changed, using connection-local
> variables, see (info "(elisp) Connection Local Variables")
>
> It is on my todo list, but less prioritized. I would be happy if
> somebody else takes the ball, and implements this in `compilation-start'.

Finally, I've adapted connection-local variables accordingly, pushed to
the master branch. See the discussion in (info "(emacs) Connection Variables")

>> Thank you!
>>
>> Daniel

Best regards, Michael.




Added tag(s) fixed. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Sat, 09 Mar 2019 17:12:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29723; Package emacs. (Sun, 17 Mar 2019 14:10:04 GMT) Full text and rfc822 format available.

Message #30 received at 29723-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: "Matz\, Daniel A. \(JSC-EG511\)" <daniel.a.matz <at> nasa.gov>
Cc: 29723-done <at> debbugs.gnu.org, 24338-done <at> debbugs.gnu.org
Subject: Re: bug#24338: bug#29723: 25.3;
 `compile' doesn't honor `tramp-methods', always uses "/bin/sh"
Date: Sun, 17 Mar 2019 15:09:12 +0100
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Finally, I've adapted connection-local variables accordingly, pushed to
> the master branch. See the discussion in (info "(emacs) Connection Variables")

No news are good news. I'm closing the bugs. Feel free to ask if there's
something not clear with the solution.

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 15 Apr 2019 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 350 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.