* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories @ 2016-09-20 10:21 Ævar Arnfjörð Bjarmason 2016-09-22 18:02 ` Michael Albinus 0 siblings, 1 reply; 19+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2016-09-20 10:21 UTC (permalink / raw) To: 24478; +Cc: Ævar Arnfjörð Bjarmason There's a regression in 25.1 introduced by 1e04ea9 (although that seems to also have fixed an issue): Now tramp-histfile-override is set to ".tramp_history", which is good, but I would expect it to be created in $HOME on remote hosts. Instead when I e.g.: 1. C-x C-f //ssh:<hostname>:/usr/local/git_tree/sysadmin/ 2. Run e.g. magit to make a commit 3. I end up with: $ echo $PWD/.tramp_history /usr/local/git_tree/sysadmin/.tramp_history $ wc -l !$ wc -l $PWD/.tramp_history 34 /usr/local/git_tree/sysadmin/.tramp_history From reading https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20446 and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19731#56 this seems like an unintended bug. Just setting: (setq tramp-histfile-override "~/.tramp_history") Works for me. Now it's always created in ~. In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5) of 2016-09-18 built on snth Repository revision: a0d50eb64bf0a469fd010a3f6133276eb1511ec9 (a revert of a761fbf262b6898036a537a36476da7767c0daca on top of emacs-25.1, for an unrelated bug...) System Description: Debian GNU/Linux 8.5 (jessie) Configured using: 'configure --prefix=/home/avar/local --with-modules' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES Important settings: value of $LANG: en_US.utf8 locale-coding-system: utf-8 Major mode: CPerl Minor modes in effect: flyspell-mode: t global-edit-server-edit-mode: t diff-auto-refine-mode: t magit-auto-revert-mode: t global-undo-tree-mode: t undo-tree-mode: t global-git-commit-mode: t shell-dirtrack-mode: t recentf-mode: t which-function-mode: t icomplete-mode: t show-paren-mode: t global-eldoc-mode: t mouse-wheel-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: Checking spelling of PREPERATION... Saving file /ssh:pc101eventlog-04:/usr/local/git_tree/sysadmin/.git/COMMIT_EDITMSG... Tramp: Encoding local file ‘/tmp/tramp.4026djU’ using ‘base64-encode-region’...done Tramp: Decoding remote file ‘/ssh:pc101eventlog-04:/usr/local/git_tree/sysadmin/.git/COMMIT_EDITMSG’ using ‘base64 -d -i >%s’...done Wrote /ssh:pc101eventlog-04:/usr/local/git_tree/sysadmin/.git/COMMIT_EDITMSG Git finished [2 times] Quit [2 times] occur-find-match: No more matches Quit occur-find-match: No more matches Quit Load-path shadows: /home/avar/g/elisp/magit/lisp/git-commit hides /home/avar/g/elisp/git-commit-mode/git-commit /home/avar/g/elisp/nopaste/nopaste hides /home/avar/g/elisp/_local/nopaste /home/avar/g/elisp/go-mode.el/go-mode hides /home/avar/g/elisp/go-mode /home/avar/g/elisp/mu/mu4e/mu4e-contrib hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-contrib /home/avar/g/elisp/mu/mu4e/mu4e-mark hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-mark /home/avar/g/elisp/mu/mu4e/mu4e-context hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-context /home/avar/g/elisp/mu/mu4e/org-old-mu4e hides /home/avar/local/share/emacs/site-lisp/mu4e/org-old-mu4e /home/avar/g/elisp/mu/mu4e/mu4e hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e /home/avar/g/elisp/mu/mu4e/mu4e-view hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-view /home/avar/g/elisp/mu/mu4e/mu4e-compose hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-compose /home/avar/g/elisp/mu/mu4e/mu4e-main hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-main /home/avar/g/elisp/mu/mu4e/mu4e-proc hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-proc /home/avar/g/elisp/mu/mu4e/mu4e-headers hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-headers /home/avar/g/elisp/mu/mu4e/mu4e-message hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-message /home/avar/g/elisp/mu/mu4e/mu4e-utils hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-utils /home/avar/g/elisp/mu/mu4e/mu4e-vars hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-vars /home/avar/g/elisp/mu/mu4e/org-mu4e hides /home/avar/local/share/emacs/site-lisp/mu4e/org-mu4e /home/avar/g/elisp/mu/mu4e/mu4e-speedbar hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-speedbar /home/avar/g/elisp/mu/mu4e/mu4e-draft hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-draft /home/avar/g/elisp/mu/mu4e/mu4e-meta hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-meta /home/avar/g/elisp/mu/mu4e/mu4e-actions hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-actions /home/avar/g/elisp/mu/mu4e/mu4e-lists hides /home/avar/local/share/emacs/site-lisp/mu4e/mu4e-lists /home/avar/g/elisp/shellarchive/find-cmd hides /home/avar/local/share/emacs/25.1/lisp/find-cmd /home/avar/g/elisp/css-mode hides /home/avar/local/share/emacs/25.1/lisp/textmodes/css-mode /home/avar/g/elisp/cperl-mode/cperl-mode hides /home/avar/local/share/emacs/25.1/lisp/progmodes/cperl-mode /home/avar/g/elisp/org-mode/lisp/org-id hides /home/avar/local/share/emacs/25.1/lisp/org/org-id /home/avar/g/elisp/org-mode/lisp/ob-css hides /home/avar/local/share/emacs/25.1/lisp/org/ob-css /home/avar/g/elisp/org-mode/lisp/org-src hides /home/avar/local/share/emacs/25.1/lisp/org/org-src /home/avar/g/elisp/org-mode/lisp/ob-keys hides /home/avar/local/share/emacs/25.1/lisp/org/ob-keys /home/avar/g/elisp/org-mode/lisp/ox hides /home/avar/local/share/emacs/25.1/lisp/org/ox /home/avar/g/elisp/org-mode/lisp/org-archive hides /home/avar/local/share/emacs/25.1/lisp/org/org-archive /home/avar/g/elisp/org-mode/lisp/org-timer hides /home/avar/local/share/emacs/25.1/lisp/org/org-timer /home/avar/g/elisp/org-mode/lisp/org-table hides /home/avar/local/share/emacs/25.1/lisp/org/org-table /home/avar/g/elisp/org-mode/lisp/ob-org hides /home/avar/local/share/emacs/25.1/lisp/org/ob-org /home/avar/g/elisp/org-mode/lisp/ob-ledger hides /home/avar/local/share/emacs/25.1/lisp/org/ob-ledger /home/avar/g/elisp/org-mode/lisp/org-w3m hides /home/avar/local/share/emacs/25.1/lisp/org/org-w3m /home/avar/g/elisp/org-mode/lisp/org-element hides /home/avar/local/share/emacs/25.1/lisp/org/org-element /home/avar/g/elisp/org-mode/lisp/org-feed hides /home/avar/local/share/emacs/25.1/lisp/org/org-feed /home/avar/g/elisp/org-mode/lisp/ob-calc hides /home/avar/local/share/emacs/25.1/lisp/org/ob-calc /home/avar/g/elisp/org-mode/lisp/org-mhe hides /home/avar/local/share/emacs/25.1/lisp/org/org-mhe /home/avar/g/elisp/org-mode/lisp/org-inlinetask hides /home/avar/local/share/emacs/25.1/lisp/org/org-inlinetask /home/avar/g/elisp/org-mode/lisp/ob-C hides /home/avar/local/share/emacs/25.1/lisp/org/ob-C /home/avar/g/elisp/org-mode/lisp/org-agenda hides /home/avar/local/share/emacs/25.1/lisp/org/org-agenda /home/avar/g/elisp/org-mode/lisp/ob-eval hides /home/avar/local/share/emacs/25.1/lisp/org/ob-eval /home/avar/g/elisp/org-mode/lisp/ox-publish hides /home/avar/local/share/emacs/25.1/lisp/org/ox-publish /home/avar/g/elisp/org-mode/lisp/ob-fortran hides /home/avar/local/share/emacs/25.1/lisp/org/ob-fortran /home/avar/g/elisp/org-mode/lisp/ob-ocaml hides /home/avar/local/share/emacs/25.1/lisp/org/ob-ocaml /home/avar/g/elisp/org-mode/lisp/ox-beamer hides /home/avar/local/share/emacs/25.1/lisp/org/ox-beamer /home/avar/g/elisp/org-mode/lisp/org hides /home/avar/local/share/emacs/25.1/lisp/org/org /home/avar/g/elisp/org-mode/lisp/ob-R hides /home/avar/local/share/emacs/25.1/lisp/org/ob-R /home/avar/g/elisp/org-mode/lisp/ob-screen hides /home/avar/local/share/emacs/25.1/lisp/org/ob-screen /home/avar/g/elisp/org-mode/lisp/org-protocol hides /home/avar/local/share/emacs/25.1/lisp/org/org-protocol /home/avar/g/elisp/org-mode/lisp/ob-awk hides /home/avar/local/share/emacs/25.1/lisp/org/ob-awk /home/avar/g/elisp/org-mode/lisp/ox-md hides /home/avar/local/share/emacs/25.1/lisp/org/ox-md /home/avar/g/elisp/org-mode/lisp/ob-core hides /home/avar/local/share/emacs/25.1/lisp/org/ob-core /home/avar/g/elisp/org-mode/lisp/ox-org hides /home/avar/local/share/emacs/25.1/lisp/org/ox-org /home/avar/g/elisp/org-mode/lisp/ob-js hides /home/avar/local/share/emacs/25.1/lisp/org/ob-js /home/avar/g/elisp/org-mode/lisp/ox-icalendar hides /home/avar/local/share/emacs/25.1/lisp/org/ox-icalendar /home/avar/g/elisp/org-mode/lisp/ob-emacs-lisp hides /home/avar/local/share/emacs/25.1/lisp/org/ob-emacs-lisp /home/avar/g/elisp/org-mode/lisp/org-ctags hides /home/avar/local/share/emacs/25.1/lisp/org/org-ctags /home/avar/g/elisp/org-mode/lisp/ob-sql hides /home/avar/local/share/emacs/25.1/lisp/org/ob-sql /home/avar/g/elisp/org-mode/lisp/org-version hides /home/avar/local/share/emacs/25.1/lisp/org/org-version /home/avar/g/elisp/org-mode/lisp/org-compat hides /home/avar/local/share/emacs/25.1/lisp/org/org-compat /home/avar/g/elisp/org-mode/lisp/ob hides /home/avar/local/share/emacs/25.1/lisp/org/ob /home/avar/g/elisp/org-mode/lisp/org-footnote hides /home/avar/local/share/emacs/25.1/lisp/org/org-footnote /home/avar/g/elisp/org-mode/lisp/ob-io hides /home/avar/local/share/emacs/25.1/lisp/org/ob-io /home/avar/g/elisp/org-mode/lisp/org-pcomplete hides /home/avar/local/share/emacs/25.1/lisp/org/org-pcomplete /home/avar/g/elisp/org-mode/lisp/org-faces hides /home/avar/local/share/emacs/25.1/lisp/org/org-faces /home/avar/g/elisp/org-mode/lisp/org-plot hides /home/avar/local/share/emacs/25.1/lisp/org/org-plot /home/avar/g/elisp/org-mode/lisp/ob-maxima hides /home/avar/local/share/emacs/25.1/lisp/org/ob-maxima /home/avar/g/elisp/org-mode/lisp/ox-latex hides /home/avar/local/share/emacs/25.1/lisp/org/ox-latex /home/avar/g/elisp/org-mode/lisp/org-macro hides /home/avar/local/share/emacs/25.1/lisp/org/org-macro /home/avar/g/elisp/org-mode/lisp/ob-python hides /home/avar/local/share/emacs/25.1/lisp/org/ob-python /home/avar/g/elisp/org-mode/lisp/org-mouse hides /home/avar/local/share/emacs/25.1/lisp/org/org-mouse /home/avar/g/elisp/org-mode/lisp/ob-gnuplot hides /home/avar/local/share/emacs/25.1/lisp/org/ob-gnuplot /home/avar/g/elisp/org-mode/lisp/ob-exp hides /home/avar/local/share/emacs/25.1/lisp/org/ob-exp /home/avar/g/elisp/org-mode/lisp/ox-html hides /home/avar/local/share/emacs/25.1/lisp/org/ox-html /home/avar/g/elisp/org-mode/lisp/ob-ref hides /home/avar/local/share/emacs/25.1/lisp/org/ob-ref /home/avar/g/elisp/org-mode/lisp/ob-lob hides /home/avar/local/share/emacs/25.1/lisp/org/ob-lob /home/avar/g/elisp/org-mode/lisp/org-docview hides /home/avar/local/share/emacs/25.1/lisp/org/org-docview /home/avar/g/elisp/org-mode/lisp/ob-table hides /home/avar/local/share/emacs/25.1/lisp/org/ob-table /home/avar/g/elisp/org-mode/lisp/ob-dot hides /home/avar/local/share/emacs/25.1/lisp/org/ob-dot /home/avar/g/elisp/org-mode/lisp/ox-texinfo hides /home/avar/local/share/emacs/25.1/lisp/org/ox-texinfo /home/avar/g/elisp/org-mode/lisp/org-eshell hides /home/avar/local/share/emacs/25.1/lisp/org/org-eshell /home/avar/g/elisp/org-mode/lisp/ob-ruby hides /home/avar/local/share/emacs/25.1/lisp/org/ob-ruby /home/avar/g/elisp/org-mode/lisp/org-bibtex hides /home/avar/local/share/emacs/25.1/lisp/org/org-bibtex /home/avar/g/elisp/org-mode/lisp/ob-scala hides /home/avar/local/share/emacs/25.1/lisp/org/ob-scala /home/avar/g/elisp/org-mode/lisp/ob-octave hides /home/avar/local/share/emacs/25.1/lisp/org/ob-octave /home/avar/g/elisp/org-mode/lisp/ob-java hides /home/avar/local/share/emacs/25.1/lisp/org/ob-java /home/avar/g/elisp/org-mode/lisp/ob-clojure hides /home/avar/local/share/emacs/25.1/lisp/org/ob-clojure /home/avar/g/elisp/org-mode/lisp/ob-sass hides /home/avar/local/share/emacs/25.1/lisp/org/ob-sass /home/avar/g/elisp/org-mode/lisp/org-rmail hides /home/avar/local/share/emacs/25.1/lisp/org/org-rmail /home/avar/g/elisp/org-mode/lisp/org-irc hides /home/avar/local/share/emacs/25.1/lisp/org/org-irc /home/avar/g/elisp/org-mode/lisp/org-crypt hides /home/avar/local/share/emacs/25.1/lisp/org/org-crypt /home/avar/g/elisp/org-mode/lisp/ob-lisp hides /home/avar/local/share/emacs/25.1/lisp/org/ob-lisp /home/avar/g/elisp/org-mode/lisp/ob-scheme hides /home/avar/local/share/emacs/25.1/lisp/org/ob-scheme /home/avar/g/elisp/org-mode/lisp/ox-odt hides /home/avar/local/share/emacs/25.1/lisp/org/ox-odt /home/avar/g/elisp/org-mode/lisp/ob-mscgen hides /home/avar/local/share/emacs/25.1/lisp/org/ob-mscgen /home/avar/g/elisp/org-mode/lisp/ob-lilypond hides /home/avar/local/share/emacs/25.1/lisp/org/ob-lilypond /home/avar/g/elisp/org-mode/lisp/org-gnus hides /home/avar/local/share/emacs/25.1/lisp/org/org-gnus /home/avar/g/elisp/org-mode/lisp/org-indent hides /home/avar/local/share/emacs/25.1/lisp/org/org-indent /home/avar/g/elisp/org-mode/lisp/ob-ditaa hides /home/avar/local/share/emacs/25.1/lisp/org/ob-ditaa /home/avar/g/elisp/org-mode/lisp/ox-man hides /home/avar/local/share/emacs/25.1/lisp/org/ox-man /home/avar/g/elisp/org-mode/lisp/ob-comint hides /home/avar/local/share/emacs/25.1/lisp/org/ob-comint /home/avar/g/elisp/org-mode/lisp/org-info hides /home/avar/local/share/emacs/25.1/lisp/org/org-info /home/avar/g/elisp/org-mode/lisp/org-attach hides /home/avar/local/share/emacs/25.1/lisp/org/org-attach /home/avar/g/elisp/org-mode/lisp/ob-picolisp hides /home/avar/local/share/emacs/25.1/lisp/org/ob-picolisp /home/avar/g/elisp/org-mode/lisp/ob-latex hides /home/avar/local/share/emacs/25.1/lisp/org/ob-latex /home/avar/g/elisp/org-mode/lisp/org-capture hides /home/avar/local/share/emacs/25.1/lisp/org/org-capture /home/avar/g/elisp/org-mode/lisp/org-entities hides /home/avar/local/share/emacs/25.1/lisp/org/org-entities /home/avar/g/elisp/org-mode/lisp/org-loaddefs hides /home/avar/local/share/emacs/25.1/lisp/org/org-loaddefs /home/avar/g/elisp/org-mode/lisp/ob-sqlite hides /home/avar/local/share/emacs/25.1/lisp/org/ob-sqlite /home/avar/g/elisp/org-mode/lisp/ob-shen hides /home/avar/local/share/emacs/25.1/lisp/org/ob-shen /home/avar/g/elisp/org-mode/lisp/ob-matlab hides /home/avar/local/share/emacs/25.1/lisp/org/ob-matlab /home/avar/g/elisp/org-mode/lisp/org-bbdb hides /home/avar/local/share/emacs/25.1/lisp/org/org-bbdb /home/avar/g/elisp/org-mode/lisp/ox-ascii hides /home/avar/local/share/emacs/25.1/lisp/org/ox-ascii /home/avar/g/elisp/org-mode/lisp/org-datetree hides /home/avar/local/share/emacs/25.1/lisp/org/org-datetree /home/avar/g/elisp/org-mode/lisp/ob-perl hides /home/avar/local/share/emacs/25.1/lisp/org/ob-perl /home/avar/g/elisp/org-mode/lisp/org-macs hides /home/avar/local/share/emacs/25.1/lisp/org/org-macs /home/avar/g/elisp/org-mode/lisp/org-mobile hides /home/avar/local/share/emacs/25.1/lisp/org/org-mobile /home/avar/g/elisp/org-mode/lisp/org-colview hides /home/avar/local/share/emacs/25.1/lisp/org/org-colview /home/avar/g/elisp/org-mode/lisp/org-list hides /home/avar/local/share/emacs/25.1/lisp/org/org-list /home/avar/g/elisp/org-mode/lisp/org-habit hides /home/avar/local/share/emacs/25.1/lisp/org/org-habit /home/avar/g/elisp/org-mode/lisp/ob-plantuml hides /home/avar/local/share/emacs/25.1/lisp/org/ob-plantuml /home/avar/g/elisp/org-mode/lisp/ob-makefile hides /home/avar/local/share/emacs/25.1/lisp/org/ob-makefile /home/avar/g/elisp/org-mode/lisp/ob-asymptote hides /home/avar/local/share/emacs/25.1/lisp/org/ob-asymptote /home/avar/g/elisp/org-mode/lisp/ob-haskell hides /home/avar/local/share/emacs/25.1/lisp/org/ob-haskell /home/avar/g/elisp/org-mode/lisp/org-clock hides /home/avar/local/share/emacs/25.1/lisp/org/org-clock /home/avar/g/elisp/org-mode/lisp/org-install hides /home/avar/local/share/emacs/25.1/lisp/org/org-install /home/avar/g/elisp/org-mode/lisp/ob-tangle hides /home/avar/local/share/emacs/25.1/lisp/org/ob-tangle Features: (shadow face-remap emacsbug dabbrev cperl-mode man linum sh-script executable pp misearch multi-isearch vc-git term/xterm xterm flyspell ispell edit-server puppet-mode git-rebase magit-extras magit-ediff ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff magit-subtree magit-submodule magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit dired-x package magit-apply magit-wip magit-log magit-diff smerge-mode diff-mode magit-core magit-autorevert autorevert filenotify magit-process magit-popup magit-mode magit-git crm magit-section magit-utils yaml-mode xs-mode nopaste browse-kill-ring prove ack grep info perl6-mode perl6-indent smie perl6-font-lock perl6-detect twittering-mode tls gnutls url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap xml remember org-clock org-agenda org-present org-element avl-tree org org-macro org-footnote org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs find-func undo-tree diff mu4e desktop frameset mu4e-speedbar mu4e-main mu4e-context mu4e-view cal-menu calendar cal-loaddefs epa browse-url mu4e-headers mu4e-compose mu4e-draft mu4e-actions rfc2368 smtpmail sendmail mu4e-mark mu4e-message html2text mu4e-proc mu4e-utils doc-view subr-x jka-compr image-mode mu4e-lists mu4e-vars hl-line mu4e-meta go-mode-autoloads markdown-mode url-parse url-vars noutline outline ibuffer-git ibuf-macs ibuffer php-mode etags xref project cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs speedbar sb-image ezimage dframe pir-mode lua-mode compile po-mode gitignore-mode gitconfig-mode derived conf-mode rx git-commit with-editor warnings term ehelp esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util server log-edit easy-mmode message dired rfc822 mml mml-sec epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log dash pod-mode cl tap-mode perlmod perldoc thingatpt saveplace edmacro kmacro tramp-cache tramp-sh tramp tramp-compat auth-source cl-seq eieio eieio-core cl-macs gnus-util mm-util help-fns mail-prsvr password-cache tramp-loaddefs trampver ucs-normalize shell pcomplete comint ansi-color ring format-spec advice recentf tree-widget wid-edit which-func imenu icomplete ido seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date paren disp-table mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd 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 dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 1070463 61868) (symbols 48 48706 0) (miscs 40 2471 2039) (strings 32 165751 19691) (string-bytes 1 6864776) (vectors 16 60604) (vector-slots 8 1059692 20226) (floats 8 572 876) (intervals 56 35874 241) (buffers 976 39) (heap 1024 60160 5537)) ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-09-20 10:21 bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories Ævar Arnfjörð Bjarmason @ 2016-09-22 18:02 ` Michael Albinus 2016-10-10 10:38 ` Eli Zaretskii 0 siblings, 1 reply; 19+ messages in thread From: Michael Albinus @ 2016-09-22 18:02 UTC (permalink / raw) To: Ævar Arnfjörð Bjarmason Cc: Ævar Arnfjörð Bjarmason, 24478 Ævar Arnfjörð Bjarmason <avar@booking.com> writes: Hi, > There's a regression in 25.1 introduced by 1e04ea9 (although that seems > to also have fixed an issue): Now tramp-histfile-override is set to > ".tramp_history", which is good, but I would expect it to be created in > $HOME on remote hosts. > > Instead when I e.g.: > > 1. C-x C-f //ssh:<hostname>:/usr/local/git_tree/sysadmin/ > 2. Run e.g. magit to make a commit > 3. I end up with: > > $ echo $PWD/.tramp_history > /usr/local/git_tree/sysadmin/.tramp_history > $ wc -l !$ > wc -l $PWD/.tramp_history > 34 /usr/local/git_tree/sysadmin/.tramp_history Most of the shells I know off use the home directory, when you specify just the relative file name ".tramp_history". > From reading https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20446 and > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19731#56 this seems like > an unintended bug. > > Just setting: > > (setq tramp-histfile-override "~/.tramp_history") > > Works for me. Now it's always created in ~. I have thought about this, when I was fixing bug#19731. Unfortunately, there exist shells which cannot expand "~/". Other shells cannot expand "$HOME/". So I really don't know a robust default we could offer. Maybe one should give this problem more emphasis in the Tramp manual. But who reads manuals? Best regards, Michael. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-09-22 18:02 ` Michael Albinus @ 2016-10-10 10:38 ` Eli Zaretskii 2016-10-10 11:14 ` Ævar Arnfjörð Bjarmason 0 siblings, 1 reply; 19+ messages in thread From: Eli Zaretskii @ 2016-10-10 10:38 UTC (permalink / raw) To: Michael Albinus; +Cc: avar, avarab, 24478 > From: Michael Albinus <michael.albinus@gmx.de> > Date: Thu, 22 Sep 2016 20:02:59 +0200 > Cc: Ævar Arnfjörð Bjarmason <avarab@gmail.com>, > 24478@debbugs.gnu.org > > Ævar Arnfjörð Bjarmason <avar@booking.com> writes: > > Hi, > > > There's a regression in 25.1 introduced by 1e04ea9 (although that seems > > to also have fixed an issue): Now tramp-histfile-override is set to > > ".tramp_history", which is good, but I would expect it to be created in > > $HOME on remote hosts. > > > > Instead when I e.g.: > > > > 1. C-x C-f //ssh:<hostname>:/usr/local/git_tree/sysadmin/ > > 2. Run e.g. magit to make a commit > > 3. I end up with: > > > > $ echo $PWD/.tramp_history > > /usr/local/git_tree/sysadmin/.tramp_history > > $ wc -l !$ > > wc -l $PWD/.tramp_history > > 34 /usr/local/git_tree/sysadmin/.tramp_history > > Most of the shells I know off use the home directory, when you specify > just the relative file name ".tramp_history". > > > From reading https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20446 and > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19731#56 this seems like > > an unintended bug. > > > > Just setting: > > > > (setq tramp-histfile-override "~/.tramp_history") > > > > Works for me. Now it's always created in ~. > > I have thought about this, when I was fixing bug#19731. Unfortunately, > there exist shells which cannot expand "~/". Other shells cannot expand > "$HOME/". So I really don't know a robust default we could offer. > > Maybe one should give this problem more emphasis in the Tramp > manual. But who reads manuals? Michael, does the above mean this bug should be closed as wontfix? It currently blocks a release, so I'd like to resolve this some way soon. Thanks. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-10 10:38 ` Eli Zaretskii @ 2016-10-10 11:14 ` Ævar Arnfjörð Bjarmason 2016-10-11 13:54 ` Michael Albinus 0 siblings, 1 reply; 19+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2016-10-10 11:14 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Michael Albinus, Ted Zlatanov, 24478 On Mon, Oct 10, 2016 at 12:38 PM, Eli Zaretskii <eliz@gnu.org> wrote: >> From: Michael Albinus <michael.albinus@gmx.de> >> Date: Thu, 22 Sep 2016 20:02:59 +0200 >> Cc: Ævar Arnfjörð Bjarmason <avarab@gmail.com>, >> 24478@debbugs.gnu.org >> >> Ævar Arnfjörð Bjarmason <avar@booking.com> writes: >> >> Hi, >> >> > There's a regression in 25.1 introduced by 1e04ea9 (although that seems >> > to also have fixed an issue): Now tramp-histfile-override is set to >> > ".tramp_history", which is good, but I would expect it to be created in >> > $HOME on remote hosts. >> > >> > Instead when I e.g.: >> > >> > 1. C-x C-f //ssh:<hostname>:/usr/local/git_tree/sysadmin/ >> > 2. Run e.g. magit to make a commit >> > 3. I end up with: >> > >> > $ echo $PWD/.tramp_history >> > /usr/local/git_tree/sysadmin/.tramp_history >> > $ wc -l !$ >> > wc -l $PWD/.tramp_history >> > 34 /usr/local/git_tree/sysadmin/.tramp_history >> >> Most of the shells I know off use the home directory, when you specify >> just the relative file name ".tramp_history". >> >> > From reading https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20446 and >> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19731#56 this seems like >> > an unintended bug. >> > >> > Just setting: >> > >> > (setq tramp-histfile-override "~/.tramp_history") >> > >> > Works for me. Now it's always created in ~. >> >> I have thought about this, when I was fixing bug#19731. Unfortunately, >> there exist shells which cannot expand "~/". Other shells cannot expand >> "$HOME/". So I really don't know a robust default we could offer. >> >> Maybe one should give this problem more emphasis in the Tramp >> manual. But who reads manuals? > > Michael, does the above mean this bug should be closed as wontfix? It > currently blocks a release, so I'd like to resolve this some way soon. I'm the reporter, so I obviously have a dog in this fight, but I don't think that makes sense. This whole facility introduced in the emacs-25 series still seems really broken since its introduction, and the various regressions reported have just resulted in other regressions taking their place, the latest one being discussed in this ticket. Here's a Git history showing the back & forth this has gone through: git log --reverse -p -Gtramp-histfile-override -- 'lisp/net/*tramp*.el' I might have read those commits incorrectly, but it seems to me that: * In emacs-24 there was no way to have a Tramp history file, we'd just specify a HISTFILE=/dev/null environment variable. * 9be1538 added an option to change that, so you could have a history file as a file, defaulting to /dev/null, but they way it was implemented caused it to unlink /dev/null, as reported in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19731 * So Michael patched it to make 'unset an option, which was implemented in 6f8372d, as far as I can tell at this point the facility worked the way it did in emacs-24 again. I.e. no history by default, but no regression with unlinking /dev/null * 'unset was made the default by Michael in 954ca0f, but just a few hours later this was set to t instead in c10828b, which does the same thing as 'unset according to the commit message. I.e. just an internal refactoring. This was followed-up by 24fa4ff to refactor it some more. * It was then changed from t to ".tramp_history" in 1e04ea9. The commit message says to fix https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20446 but I don't see how it could eat the bash history if it's set to not have any history file by default. * Now because it's ".tramp_history" and not "~/.tramp_history" it gets created in random non-~ directories you open with tramp, but more importantly, and I didn't realize this in my initial report, the shell history *might be shared between multiple users*, which seems like a bad security issue. It seems to me that the best solution to this whole problem is to set it to "t" again which would return to the non-history days of emacs-24, since apparently using ~ can't be counted on. In addition, depending on the bug with history potentially being shared between users now that it's being dumped in random potentially shared FS directories they open with tramp, changing this to ".tramp_history" might have caused a security issue worth of a CVE, but I haven't investigated that, but we *certainly* went from no history by default in emacs-24 to history littered in potentially world readable directories in emacs-25. The permissions on the file itself might have mitigated data leakage in some cases, but in those cases it would have blocked other Emacs users from recording their shell history. In addition not all remote FSs tramp supports working with can be relied upon to obey HISTFILE permissions. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-10 11:14 ` Ævar Arnfjörð Bjarmason @ 2016-10-11 13:54 ` Michael Albinus 2016-10-11 14:34 ` Ævar Arnfjörð Bjarmason 0 siblings, 1 reply; 19+ messages in thread From: Michael Albinus @ 2016-10-11 13:54 UTC (permalink / raw) To: Ævar Arnfjörð Bjarmason; +Cc: 24478, Ted Zlatanov Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: Hi Ævar, > I'm the reporter, so I obviously have a dog in this fight, but I don't > think that makes sense. This whole facility introduced in the emacs-25 > series still seems really broken since its introduction, and the > various regressions reported have just resulted in other regressions > taking their place, the latest one being discussed in this ticket. I'm also unhappy about this story. I really would like to use a proper and robust default value for this. But there isn't one so far. > * In emacs-24 there was no way to have a Tramp history file, we'd > just specify a HISTFILE=/dev/null environment variable. This was introduced back in 2014. Before this change, HISFILE was unset somewhere else in the initialization hand-shake, but at a later point. It didn't work properly then. > * 9be1538 added an option to change that, so you could have a history > file as a file, defaulting to /dev/null, but they way it was > implemented caused it to unlink /dev/null, as reported in > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19731 Bug#19371 has reported, that there is a bash bug <https://bbs.archlinux.org/viewtopic.php?pid=1397412#p1397412> which has this effect. It is no Tramp error, and I would regard this setting still be the best one if possible. But due to this bash bug, this setting would damage the remote system. So we cannot use "/dev/null" as default, even if the bash bug has been fixed. There will still be system in the wild with this bug. > * So Michael patched it to make 'unset an option, which was > implemented in 6f8372d, as far as I can tell at this point the > facility worked the way it did in emacs-24 again. I.e. no history by > default, but no regression with unlinking /dev/null > > * 'unset was made the default by Michael in 954ca0f, but just a few > hours later this was set to t instead in c10828b, which does the same > thing as 'unset according to the commit message. I.e. just an internal > refactoring. This was followed-up by 24fa4ff to refactor it some more. Yes. > * It was then changed from t to ".tramp_history" in 1e04ea9. The > commit message says to fix > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20446 but I don't see > how it could eat the bash history if it's set to not have any history > file by default. Glenn did report, that in his use case unsetting HISTFILE has changed his ~/.bash_history to a zero size. Not acceptable, and again a special behaviour of bash :-( So the only solution I could thing about is setting this variable to a Tramp specific value. > * Now because it's ".tramp_history" and not "~/.tramp_history" it gets > created in random non-~ directories you open with tramp, but more > importantly, and I didn't realize this in my initial report, the shell > history *might be shared between multiple users*, which seems like a > bad security issue. "~/.tramp_history" would be the obvious choice, but "~/" is not guaranteed to exist. An example is hydra, were the tests failed with this setting. > It seems to me that the best solution to this whole problem is to set > it to "t" again which would return to the non-history days of > emacs-24, since apparently using ~ can't be counted on. How do you want explain it to bash users like Glenn? Their history file will get lost, again. > In addition, depending on the bug with history potentially being > shared between users now that it's being dumped in random potentially > shared FS directories they open with tramp, changing this to > ".tramp_history" might have caused a security issue worth of a CVE, > but I haven't investigated that, but we *certainly* went from no > history by default in emacs-24 to history littered in potentially > world readable directories in emacs-25. I still don't understand why the ".tramp_history" file is spread over the file system. This setting is apllied immediately after connecting to the remote host. I would assume that one lands in the home directory there; ".tramp_history" should be expanded relatively to that directory. Could you show hot it happens to you that it is expanded to another place? Pls run Tramp from scratch, after increasing the debug level by (setq tramp-verbose 6) There will be a Tramp debug buffer, which might tell us what happens. Best regards, Michael. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-11 13:54 ` Michael Albinus @ 2016-10-11 14:34 ` Ævar Arnfjörð Bjarmason 2016-10-11 14:44 ` Michael Albinus 0 siblings, 1 reply; 19+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2016-10-11 14:34 UTC (permalink / raw) To: Michael Albinus; +Cc: 24478, Ted Zlatanov On Tue, Oct 11, 2016 at 3:54 PM, Michael Albinus <michael.albinus@gmx.de> wrote: > Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: > > Hi Ævar, > >> I'm the reporter, so I obviously have a dog in this fight, but I don't >> think that makes sense. This whole facility introduced in the emacs-25 >> series still seems really broken since its introduction, and the >> various regressions reported have just resulted in other regressions >> taking their place, the latest one being discussed in this ticket. > > I'm also unhappy about this story. I really would like to use a proper > and robust default value for this. But there isn't one so far. > >> * In emacs-24 there was no way to have a Tramp history file, we'd >> just specify a HISTFILE=/dev/null environment variable. > > This was introduced back in 2014. Before this change, HISFILE was unset > somewhere else in the initialization hand-shake, but at a later > point. It didn't work properly then. > >> * 9be1538 added an option to change that, so you could have a history >> file as a file, defaulting to /dev/null, but they way it was >> implemented caused it to unlink /dev/null, as reported in >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19731 > > Bug#19371 has reported, that there is a bash bug > <https://bbs.archlinux.org/viewtopic.php?pid=1397412#p1397412> which has > this effect. It is no Tramp error, and I would regard this setting still > be the best one if possible. But due to this bash bug, this setting > would damage the remote system. So we cannot use "/dev/null" as default, > even if the bash bug has been fixed. There will still be system in the > wild with this bug. > >> * So Michael patched it to make 'unset an option, which was >> implemented in 6f8372d, as far as I can tell at this point the >> facility worked the way it did in emacs-24 again. I.e. no history by >> default, but no regression with unlinking /dev/null >> >> * 'unset was made the default by Michael in 954ca0f, but just a few >> hours later this was set to t instead in c10828b, which does the same >> thing as 'unset according to the commit message. I.e. just an internal >> refactoring. This was followed-up by 24fa4ff to refactor it some more. > > Yes. > >> * It was then changed from t to ".tramp_history" in 1e04ea9. The >> commit message says to fix >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20446 but I don't see >> how it could eat the bash history if it's set to not have any history >> file by default. > > Glenn did report, that in his use case unsetting HISTFILE has changed > his ~/.bash_history to a zero size. Not acceptable, and again a special > behaviour of bash :-( > > So the only solution I could thing about is setting this variable to a > Tramp specific value. > >> * Now because it's ".tramp_history" and not "~/.tramp_history" it gets >> created in random non-~ directories you open with tramp, but more >> importantly, and I didn't realize this in my initial report, the shell >> history *might be shared between multiple users*, which seems like a >> bad security issue. > > "~/.tramp_history" would be the obvious choice, but "~/" is not > guaranteed to exist. An example is hydra, were the tests failed with > this setting. > >> It seems to me that the best solution to this whole problem is to set >> it to "t" again which would return to the non-history days of >> emacs-24, since apparently using ~ can't be counted on. > > How do you want explain it to bash users like Glenn? Their history file > will get lost, again. Thanks for all the follow-up details. I mainly included all of that to get all this straight in my head, but I was apparently wrong about it being viable to revert to the old behavior vis-a-vis unlinking /dev/null on those old systems. >> In addition, depending on the bug with history potentially being >> shared between users now that it's being dumped in random potentially >> shared FS directories they open with tramp, changing this to >> ".tramp_history" might have caused a security issue worth of a CVE, >> but I haven't investigated that, but we *certainly* went from no >> history by default in emacs-24 to history littered in potentially >> world readable directories in emacs-25. > > I still don't understand why the ".tramp_history" file is spread over > the file system. This setting is apllied immediately after connecting to > the remote host. I would assume that one lands in the home directory > there; ".tramp_history" should be expanded relatively to that directory. > > Could you show hot it happens to you that it is expanded to another > place? Pls run Tramp from scratch, after increasing the debug level by > > (setq tramp-verbose 6) > > There will be a Tramp debug buffer, which might tell us what happens. > > Best regards, Michael. All I'm doing is e.g.: 1. C-x C-f //ssh:puppet-staging:/etc/puppet/environment/aearnfjord/puppet RET 2. Run some command e.g. M-x grep <hi> 3. This results in: $ wc -l $PWD/.tramp_history 39 /etc/puppet/environments/aearnfjord/puppet/.tramp_history I've snipped away the parts I think are irrelevant because it's very verbose, but this hopefully the relevant tramp-verbose=6 output: [I don't have an existing tramp connection at this point, so it connects] 16:24:08.497153 tramp-process-one-action (5) # Looking for regexp "\(^[^#$%> ]*[#$%>] *\)\'" from remote shell 16:24:08.497248 tramp-process-one-action (5) # Call ‘tramp-action-succeed’ 16:24:08.497369 tramp-process-actions (6) # nohup: redirecting stderr to stdout Last login: Tue Oct 11 16:03:15 2016 from <host>^M [...] ^[[1;31mPROD^[[m puppet-staging ~ (DUMMY) $ 16:24:08.497762 tramp-process-actions (3) # Waiting for prompts from remote shell...done 16:24:08.498117 tramp-maybe-open-connection (3) # Found remote shell prompt on ‘puppet-staging’ 16:24:08.498251 tramp-open-shell (5) # Opening remote shell ‘/bin/sh’... 16:24:08.498387 tramp-send-command (6) # exec env ENV='' HISTFILE=.tramp_history PROMPT_COMMAND='' PS1=\#\$\ PS2='' PS3='' /bin/sh 16:24:08.522855 tramp-wait-for-regexp (6) # #$ 16:24:08.522995 tramp-open-shell (5) # Opening remote shell ‘/bin/sh’...done 16:24:08.523075 tramp-open-connection-setup-interactive-shell (5) # Setting up remote shell environment 16:24:08.523157 tramp-send-command (6) # stty tab0 -inlcr -onlcr -echo kill '^U' erase '^H' 16:24:08.543347 tramp-wait-for-regexp (6) # [...] Then this and all subsequent commands end up in my non-~ .tramp_history: $ head -n 2 /etc/puppet/environments/aearnfjord/puppet/.tramp_history #1476195869 stty tab0 -inlcr -onlcr -echo kill '^U' erase '^H' If this isn't the relevant output or you'd like to me to try something else I'd be happy to provide more details. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-11 14:34 ` Ævar Arnfjörð Bjarmason @ 2016-10-11 14:44 ` Michael Albinus 2016-10-11 14:47 ` Ævar Arnfjörð Bjarmason 0 siblings, 1 reply; 19+ messages in thread From: Michael Albinus @ 2016-10-11 14:44 UTC (permalink / raw) To: Ævar Arnfjörð Bjarmason; +Cc: 24478, Ted Zlatanov Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: Hi Ævar, > All I'm doing is e.g.: > > 1. C-x C-f //ssh:puppet-staging:/etc/puppet/environment/aearnfjord/puppet RET > 2. Run some command e.g. M-x grep <hi> > 3. This results in: > $ wc -l $PWD/.tramp_history > 39 /etc/puppet/environments/aearnfjord/puppet/.tramp_history OK, so this is about running an asynchronous process on the remote host. This shall help me to reproduce it locally, thanks for the recipe. Best regards, Michael. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-11 14:44 ` Michael Albinus @ 2016-10-11 14:47 ` Ævar Arnfjörð Bjarmason 2016-10-12 14:05 ` Michael Albinus 0 siblings, 1 reply; 19+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2016-10-11 14:47 UTC (permalink / raw) To: Michael Albinus; +Cc: 24478, Ted Zlatanov On Tue, Oct 11, 2016 at 4:44 PM, Michael Albinus <michael.albinus@gmx.de> wrote: > Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: > > Hi Ævar, > >> All I'm doing is e.g.: >> >> 1. C-x C-f //ssh:puppet-staging:/etc/puppet/environment/aearnfjord/puppet RET >> 2. Run some command e.g. M-x grep <hi> >> 3. This results in: >> $ wc -l $PWD/.tramp_history >> 39 /etc/puppet/environments/aearnfjord/puppet/.tramp_history > > OK, so this is about running an asynchronous process on the remote > host. This shall help me to reproduce it locally, thanks for the recipe. If you mean the M-x grep from the .tramp_history (in that /etc/puppet/... directory) it starts much earlier than that, i.e. Tramp's own post-connection commands go to that file, and then the last command is my M-x grep: $ cat .tramp_history #1476195869 stty tab0 -inlcr -onlcr -echo kill '^U' erase '^H' #1476195869 echo foo #1476195869 PS1=///dfb559542f43800587d648842ba11aba\#\$ PS2='' PS3='' PROMPT_COMMAND='' #1476195869 echo \"`uname -sr`\" 2>/dev/null; echo tramp_exit_status $? #1476195869 echo foo ; echo bar #1476195869 set +o vi +o emacs #1476195869 PATH=/usr/bin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export PATH #1476195869 mesg n 2>/dev/null; biff n 2>/dev/null #1476195869 stty iutf8 2>/dev/null #1476195869 echo \"`tty`\" 2>/dev/null; echo tramp_exit_status $? #1476195869 while read var val; do export $var=$val; done <<'73f386707e9600ff260fa9d80e5e5557' PAGER cat INSIDE_EMACS '25.1.1,tramp:2.2.13.25.1' TERM dumb LC_CTYPE '' TMOUT 0 LC_ALL en_US.utf8 73f386707e9600ff260fa9d80e5e5557 #1476195869 unset correct autocorrect MAILPATH MAILCHECK MAIL HISTORY CDPATH #1476195869 cd /etc/puppet/environments/aearnfjord/puppet/ && exec <<'73f386707e9600ff260fa9d80e5e5557' env PS1\=/ssh\:puppet-staging\:/etc/puppet/environments/aearnfjord/puppet/\ \#\$\ TERMCAP\= COLUMNS\=106 INSIDE_EMACS\=25.1.1\,compile /bin/sh ( git --no-pager grep -E -i -n -- hi ) </dev/tty 73f386707e9600ff260fa9d80e5e5557 ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-11 14:47 ` Ævar Arnfjörð Bjarmason @ 2016-10-12 14:05 ` Michael Albinus 2016-10-13 14:51 ` Michael Albinus 0 siblings, 1 reply; 19+ messages in thread From: Michael Albinus @ 2016-10-12 14:05 UTC (permalink / raw) To: Ævar Arnfjörð Bjarmason; +Cc: 24478, Ted Zlatanov Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: Hi Ævar, >>> All I'm doing is e.g.: >>> >>> 1. C-x C-f //ssh:puppet-staging:/etc/puppet/environment/aearnfjord/puppet RET >>> 2. Run some command e.g. M-x grep <hi> >>> 3. This results in: >>> $ wc -l $PWD/.tramp_history >>> 39 /etc/puppet/environments/aearnfjord/puppet/.tramp_history >> >> OK, so this is about running an asynchronous process on the remote >> host. This shall help me to reproduce it locally, thanks for the recipe. > > If you mean the M-x grep from the .tramp_history (in that > /etc/puppet/... directory) it starts much earlier than that, i.e. > Tramp's own post-connection commands go to that file, and then the > last command is my M-x grep: Thanks. So it is related to `tramp-open-shell', which comes just prior these commands. I've tried it with several configurations, but I could not reproduce the problem locally. I suppose this behaviour is related to the used shell on the remote host. What is /bin/sh on your remote machine? So again, could you pls start a new Emacs, set tramp-verbose to 6, and connect to the remote host where it happens?. And I need the full debug buffer then, because there are a lot of other information which could tell us what's up. If you have privacy concerns showing this publicly, pls send it to me directly. Best regards, Michael. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-12 14:05 ` Michael Albinus @ 2016-10-13 14:51 ` Michael Albinus 2016-10-13 15:18 ` Ævar Arnfjörð Bjarmason 0 siblings, 1 reply; 19+ messages in thread From: Michael Albinus @ 2016-10-13 14:51 UTC (permalink / raw) To: Ævar Arnfjörð Bjarmason; +Cc: 24478, Ted Zlatanov Michael Albinus <michael.albinus@gmx.de> writes: Hi Ævar, > I've tried it with several configurations, but I could not reproduce the > problem locally. I suppose this behaviour is related to the used shell > on the remote host. What is /bin/sh on your remote machine? For the records, today I could reproduce the problem. I had to set /bin/bash explicitely as remote shell. Let's see, whether I could find a proper solution, compliant to all bug#24478, bug#20446, bug#19731, bug#17295. And it is always bash, which causes problems! Best regards, Michael. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-13 14:51 ` Michael Albinus @ 2016-10-13 15:18 ` Ævar Arnfjörð Bjarmason 2016-10-13 16:30 ` Michael Albinus 0 siblings, 1 reply; 19+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2016-10-13 15:18 UTC (permalink / raw) To: Michael Albinus; +Cc: 24478, Ted Zlatanov On Thu, Oct 13, 2016 at 4:51 PM, Michael Albinus <michael.albinus@gmx.de> wrote: > Michael Albinus <michael.albinus@gmx.de> writes: > > Hi Ævar, > >> I've tried it with several configurations, but I could not reproduce the >> problem locally. I suppose this behaviour is related to the used shell >> on the remote host. What is /bin/sh on your remote machine? > > For the records, today I could reproduce the problem. I had to set > /bin/bash explicitely as remote shell. > > Let's see, whether I could find a proper solution, compliant to all > bug#24478, bug#20446, bug#19731, bug#17295. And it is always bash, which > causes problems! Hi, sorry about not getting back to you earlier on this bug, so just to confirm you don't need to be to reproduce this anymore? The system I'm ssh-ing into is a CentOS (a RedHat derivative) machine, on RHEL/CentOS/Fedora: $ file /bin/sh /bin/sh: symbolic link to `bash' $ rpm -qf /bin/sh bash-4.2.46-20.el7_2.x86_64 I.e. their /bin/sh is always bash, as opposed to say the more minimal dash shell on Debian. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-13 15:18 ` Ævar Arnfjörð Bjarmason @ 2016-10-13 16:30 ` Michael Albinus 2016-10-15 10:38 ` Michael Albinus 2016-10-24 13:10 ` Michael Albinus 0 siblings, 2 replies; 19+ messages in thread From: Michael Albinus @ 2016-10-13 16:30 UTC (permalink / raw) To: Ævar Arnfjörð Bjarmason; +Cc: 24478, Ted Zlatanov Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: Hi Ævar, > Hi, sorry about not getting back to you earlier on this bug, so just > to confirm you don't need to be to reproduce this anymore? No, I shall be able to work on this with the information I could retrieve locally. > I.e. their /bin/sh is always bash, as opposed to say the more minimal > dash shell on Debian. Indeed. All the bugs I've quoted were related to bash. Best regards, Michael. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-13 16:30 ` Michael Albinus @ 2016-10-15 10:38 ` Michael Albinus 2016-10-22 16:55 ` Michael Albinus 2016-10-24 13:10 ` Michael Albinus 1 sibling, 1 reply; 19+ messages in thread From: Michael Albinus @ 2016-10-15 10:38 UTC (permalink / raw) To: Ævar Arnfjörð Bjarmason; +Cc: 24478, Ted Zlatanov Michael Albinus <michael.albinus@gmx.de> writes: Hi Ævar, >> I.e. their /bin/sh is always bash, as opposed to say the more minimal >> dash shell on Debian. > > Indeed. All the bugs I've quoted were related to bash. Well, I've partly reverted the fix for bug#20446. This shall fix the problem for you. See appended patch. Glenn, you have reported bug#20446. I believe that I haven't reintroduced your problem, but I would appreciate pretty much if you could cross-check this. The point is NOT to set $HISTFILESIZE. Best regards, Michael. --8<---------------cut here---------------start------------->8--- *** /home/albinus/src/emacs-25/lisp/net/tramp-sh.el.~4f406e9813e073b675bb45613bf1dd111eec2368~ 2016-10-15 12:34:57.847998549 +0200 --- /home/albinus/src/emacs-25/lisp/net/tramp-sh.el 2016-10-15 12:28:04.562663524 +0200 *************** *** 67,85 **** :type 'string) ;;;###tramp-autoload ! (defcustom tramp-histfile-override ".tramp_history" "When invoking a shell, override the HISTFILE with this value. When setting to a string, it redirects the shell history to that file. Be careful when setting to \"/dev/null\"; this might result in undesired results when using \"bash\" as shell. The value t, the default value, unsets any setting of HISTFILE, ! and sets both HISTFILESIZE and HISTSIZE to 0. If you set this ! variable to nil, however, the *override* is disabled, so the ! history will go to the default storage location, ! e.g. \"$HOME/.sh_history\"." :group 'tramp ! :version "25.1" :type '(choice (const :tag "Do not override HISTFILE" nil) (const :tag "Unset HISTFILE" t) (string :tag "Redirect to a file"))) --- 67,84 ---- :type 'string) ;;;###tramp-autoload ! (defcustom tramp-histfile-override t "When invoking a shell, override the HISTFILE with this value. When setting to a string, it redirects the shell history to that file. Be careful when setting to \"/dev/null\"; this might result in undesired results when using \"bash\" as shell. The value t, the default value, unsets any setting of HISTFILE, ! and sets HISTSIZE to 0. If you set this variable to nil, ! however, the *override* is disabled, so the history will go to ! the default storage location, e.g. \"$HOME/.sh_history\"." :group 'tramp ! :version "25.2" :type '(choice (const :tag "Do not override HISTFILE" nil) (const :tag "Unset HISTFILE" t) (string :tag "Redirect to a file"))) *************** *** 4113,4119 **** (format "HISTFILE=%s" (tramp-shell-quote-argument tramp-histfile-override)) (if tramp-histfile-override ! "HISTFILE='' HISTFILESIZE=0 HISTSIZE=0" "")) (tramp-shell-quote-argument tramp-end-of-output) shell (or extra-args "")) --- 4112,4118 ---- (format "HISTFILE=%s" (tramp-shell-quote-argument tramp-histfile-override)) (if tramp-histfile-override ! "HISTFILE='' HISTSIZE=0" "")) (tramp-shell-quote-argument tramp-end-of-output) shell (or extra-args "")) *************** *** 4885,4891 **** (if tramp-histfile-override (progn (setenv "HISTFILE") - (setenv "HISTFILESIZE" "0") (setenv "HISTSIZE" "0")))) (setenv "PROMPT_COMMAND") (setenv "PS1" tramp-initial-end-of-output) --- 4884,4889 ---- --8<---------------cut here---------------end--------------->8--- ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-15 10:38 ` Michael Albinus @ 2016-10-22 16:55 ` Michael Albinus 2016-10-23 23:29 ` Glenn Morris 0 siblings, 1 reply; 19+ messages in thread From: Michael Albinus @ 2016-10-22 16:55 UTC (permalink / raw) To: Glenn Morris; +Cc: 24478 Michael Albinus <michael.albinus@gmx.de> writes: Hi Glenn, > Glenn, you have reported bug#20446. I believe that I haven't > reintroduced your problem, but I would appreciate pretty much if you > could cross-check this. The point is NOT to set $HISTFILESIZE. Ping. I would really like to get your feedback, before I push the patch to the emacs-25 branch. Best regards, Michael. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-22 16:55 ` Michael Albinus @ 2016-10-23 23:29 ` Glenn Morris 2016-10-24 7:09 ` Michael Albinus 0 siblings, 1 reply; 19+ messages in thread From: Glenn Morris @ 2016-10-23 23:29 UTC (permalink / raw) To: Michael Albinus; +Cc: 24478 Applying the patch causes bug 20446 to recur. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-23 23:29 ` Glenn Morris @ 2016-10-24 7:09 ` Michael Albinus 0 siblings, 0 replies; 19+ messages in thread From: Michael Albinus @ 2016-10-24 7:09 UTC (permalink / raw) To: Glenn Morris; +Cc: 24478 Glenn Morris <rgm@gnu.org> writes: Hi Glenn, > Applying the patch causes bug 20446 to recur. Thanks for the feedback. So I need to find another, more complicated, solution. Best regards, Michael. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-13 16:30 ` Michael Albinus 2016-10-15 10:38 ` Michael Albinus @ 2016-10-24 13:10 ` Michael Albinus 2016-10-24 13:54 ` Ævar Arnfjörð Bjarmason 1 sibling, 1 reply; 19+ messages in thread From: Michael Albinus @ 2016-10-24 13:10 UTC (permalink / raw) To: Ævar Arnfjörð Bjarmason; +Cc: 24478 Michael Albinus <michael.albinus@gmx.de> writes: Hi Ævar, > No, I shall be able to work on this with the information I could > retrieve locally. Since I couldn't apply the other change, setting `tramp-histfile-override' to t, I've changed it now to "~/.tramp_history". Plus a short test whether this (or something else the user decides) is a proper setting. Hope this fixes the problem finally. Could you, pls, crosscheck in the emacs-25 branch? Best regards, Michael. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-24 13:10 ` Michael Albinus @ 2016-10-24 13:54 ` Ævar Arnfjörð Bjarmason 2016-10-24 14:32 ` Michael Albinus 0 siblings, 1 reply; 19+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2016-10-24 13:54 UTC (permalink / raw) To: Michael Albinus; +Cc: 24478 On Mon, Oct 24, 2016 at 3:10 PM, Michael Albinus <michael.albinus@gmx.de> wrote: > Michael Albinus <michael.albinus@gmx.de> writes: > > Hi Ævar, > >> No, I shall be able to work on this with the information I could >> retrieve locally. > > Since I couldn't apply the other change, setting > `tramp-histfile-override' to t, I've changed it now to > "~/.tramp_history". Plus a short test whether this (or something else > the user decides) is a proper setting. > > Hope this fixes the problem finally. Could you, pls, crosscheck in the > emacs-25 branch? Looks good to me. The ~/.tramp_history value you changed it to has been what I've been setting this to locally to work around the issue. Thanks! ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories 2016-10-24 13:54 ` Ævar Arnfjörð Bjarmason @ 2016-10-24 14:32 ` Michael Albinus 0 siblings, 0 replies; 19+ messages in thread From: Michael Albinus @ 2016-10-24 14:32 UTC (permalink / raw) To: Ævar Arnfjörð Bjarmason; +Cc: 24478-done Version: 25.2 Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: Hi Ævar, >> Hope this fixes the problem finally. Could you, pls, crosscheck in the >> emacs-25 branch? > > Looks good to me. The ~/.tramp_history value you changed it to has > been what I've been setting this to locally to work around the issue. I know. But I also want to ensure, that the additional code does not break anything. Hmm, so what. I mark this bug as closed, hoping the problem does not appear, again. And I'll watch hydra next days; being curious whether it breaks there. > Thanks! Best regards, Michael. ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2016-10-24 14:32 UTC | newest] Thread overview: 19+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-09-20 10:21 bug#24478: 25.1; Regression in 25.1: .tramp_history files are littered in non-$HOME working directories Ævar Arnfjörð Bjarmason 2016-09-22 18:02 ` Michael Albinus 2016-10-10 10:38 ` Eli Zaretskii 2016-10-10 11:14 ` Ævar Arnfjörð Bjarmason 2016-10-11 13:54 ` Michael Albinus 2016-10-11 14:34 ` Ævar Arnfjörð Bjarmason 2016-10-11 14:44 ` Michael Albinus 2016-10-11 14:47 ` Ævar Arnfjörð Bjarmason 2016-10-12 14:05 ` Michael Albinus 2016-10-13 14:51 ` Michael Albinus 2016-10-13 15:18 ` Ævar Arnfjörð Bjarmason 2016-10-13 16:30 ` Michael Albinus 2016-10-15 10:38 ` Michael Albinus 2016-10-22 16:55 ` Michael Albinus 2016-10-23 23:29 ` Glenn Morris 2016-10-24 7:09 ` Michael Albinus 2016-10-24 13:10 ` Michael Albinus 2016-10-24 13:54 ` Ævar Arnfjörð Bjarmason 2016-10-24 14:32 ` Michael Albinus
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.