[Top][All Lists]

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

[debbugs-tracker] bug#19870: closed (24.4.90; tramp sets bad PAGER, comm

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19870: closed (24.4.90; tramp sets bad PAGER, commands which reference it fail)
Date: Mon, 16 Feb 2015 08:01:02 +0000

Your message dated Mon, 16 Feb 2015 08:59:57 +0100
with message-id <address@hidden>
and subject line Re: bug#19870: 24.4.90; tramp sets bad PAGER, commands which 
reference it fail
has caused the debbugs.gnu.org bug report #19870,
regarding 24.4.90; tramp sets bad PAGER, commands which reference it fail
to be marked as done.

(If you believe you have received this mail in error, please contact

19870: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19870
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.4.90; tramp sets bad PAGER, commands which reference it fail Date: Sat, 14 Feb 2015 23:56:26 -0500 User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.4.90 (darwin)
Change ae5602c51c721196922620b263a490137bba7fe0 "Backport Tramp changes
from trunk." contained a chunk like this:

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 6f55b86..1976e0e 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3967,15 +4076,22 @@ process to set up.  VEC specifies the connection."
   (let ((env (append (when (tramp-get-remote-locale vec) ; Discard `(nil)'.
                       `(,(tramp-get-remote-locale vec)))
                     (copy-sequence tramp-remote-process-environment)))
-       unset item)
+       unset vars item)
     (while env
       (setq item (tramp-compat-split-string (car env) "="))
       (setcdr item (mapconcat 'identity (cdr item) "="))
       (if (and (stringp (cdr item)) (not (string-equal (cdr item) "")))
-         (tramp-send-command
-          vec (format "%s=%s; export %s" (car item) (cdr item) (car item)) t)
+         (push (format "%s %s" (car item) (cdr item)) vars)
        (push (car item) unset))
       (setq env (cdr env)))
+    (when vars
+      (tramp-send-command
+       vec
+       (format "while read var val; do export $var=$val; done <<'%s'\n%s\n%s"
+              tramp-end-of-heredoc
+              (mapconcat 'identity vars "\n")
+              tramp-end-of-heredoc)
+       t))
     (when unset
        vec (format "unset %s" (mapconcat 'identity unset " ")) t))))

Presumably this is tidying as part of:
    Prefer utf-8 coding.  (Bug#17859)

Where `tramp-remote-process-environment' by default contains
"PAGER=\"\"", after this change we will export into the remote
environment literally PAGER="\"\"" (that is it will be in the environment, with 
value "").  Since "" isn't an application, things which use the pager
will then fail, much as if you had done:

  $ PAGER="\"\"" git log

You can reproduce this by running emacs -Q, opening a dired on a remote
directory under git control (C-x C-d /somehost:/some/directory/in/git),
and trying to run 'git show' (M-! git show).  This will fail, saying:
  "": : command not found

It's not clear to me whether the change quoted above is somehow flawed,
or whether the setting of PAGER in `tramp-remote-process-environment' is
flawed.  I think the setting is to workaround the fact that if the RHS
of the assignment in `tramp-remote-process-environment' is empty, we
won't actually do anything (which seems a bit weird, given the number of
variables in there that will be ignored), and the new code quoted above
results in more faithfully quoting things, triggering the bug.

In GNU Emacs (i386-apple-darwin14.0.0, NS apple-appkit-1343.16)
 of 2015-02-12 on quisling.home
Repository revision: ae5602c51c721196922620b263a490137bba7fe0
Windowing system distributor `Apple', version 10.3.1343
Configured using:
 `configure --with-ns --without-pop'

Important settings:
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-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
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Tramp: Opening connection for metropolis using scp...
Tramp: Sending command `exec ssh   -o ControlMaster=auto -o 
ControlPath='address@hidden:%p' -o ControlPersist=no -e none metropolis'
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on `metropolis'
Tramp: Opening connection for metropolis using scp...done
ls does not support --dired; see `dired-use-ls-dired' for more details.
s-! is undefined

Load-path shadows:
None found.

(shadow sort mail-extr emacsbug message rfc822 mml easymenu mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils tramp-cache
tramp-sh tramp tramp-compat auth-source eieio byte-opt bytecomp
byte-compile cl-extra cl-loaddefs cl-lib cconv eieio-core gnus-util
mm-util mail-prsvr password-cache tramp-loaddefs trampver shell
pcomplete comint ansi-color ring format-spec advice help-fns dired
time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel ns-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode prog-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process cocoa ns multi-tty emacs)

Memory information:
((conses 16 101198 8658)
 (symbols 48 20448 0)
 (miscs 40 46 198)
 (strings 32 21041 5061)
 (string-bytes 1 641937)
 (vectors 16 13414)
 (vector-slots 8 420900 6141)
 (floats 8 81 271)
 (intervals 56 1073 223)
 (buffers 960 14))

--- End Message ---
--- Begin Message --- Subject: Re: bug#19870: 24.4.90; tramp sets bad PAGER, commands which reference it fail Date: Mon, 16 Feb 2015 08:59:57 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
Version: 24.5

Richard Lowe <address@hidden> writes:

> PAGER=cat works, yes.

Thanks for testing. I'm marking this bug as closed.

> Thanks,
> -- Rich

Best regards, Michael.

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]