Commit graph

223 commits

Author SHA1 Message Date
Stefan Monnier
beaab89896 Stop messing with the EMACS env var
Fixes: debbugs:20202

* lisp/net/tramp-sh.el (tramp-remote-process-environment):
* lisp/comint.el (comint-exec-1):
* lisp/term.el (term-exec-1): Don't set EMACS envvar.
* lisp/progmodes/compile.el (compilation-start): Same and bring
INSIDE_EMACS's format in line with other users.
2015-04-09 11:01:04 -04:00
Michael Albinus
444975fa54 Improve special char handling in Tramp
* net/tramp-sh.el (tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-stat): Quote file names in output.
(tramp-do-directory-files-and-attributes-with-stat): Use "//" as marker.
2015-03-24 20:05:00 +01:00
Michael Albinus
611a4791a4 Mark apostrophs with ?/ instead of \037 in Tramp
Fixes: debbugs:20117

* net/tramp-sh.el (tramp-do-directory-files-and-attributes-with-stat):
Mark apostrophs with ?/ instead of \037.
2015-03-18 20:32:16 +01:00
Michael Albinus
7cf5b3748c Avoid leading tabs in shell scripts, sent by Tramp.
Fixes: debbugs:20118

* tramp-sh.el (tramp-maybe-send-script): Avoid leading tabs in
shell scripts.
2015-03-17 20:07:38 +01:00
Michael Albinus
508049aae9 Change test for ControlPath in order to avoid DNS timeouts.
Fixes: debbugs:20015

* net/tramp-sh.el (tramp-ssh-controlmaster-options): Change test
for ControlPath in order to avoid DNS timeouts.
2015-03-17 10:18:10 +01:00
Michael Albinus
28caedba0f In Tramp. check ssh Control* options only when needed
Fixes: debbugs:20015

* net/tramp-adb.el:
* net/tramp-gvfs.el:
* net/tramp-sh.el:
* net/tramp-smb.el: Set tramp-autoload cookie for all defcustoms.

* net/tramp-sh.el (tramp-use-ssh-controlmaster-options):
New defcustom, moved from tramp.el.
(tramp-ssh-controlmaster-options): New defvar, moved from tramp.el
but with a nil initial value.
(tramp-ssh-controlmaster-options): New defun.
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Use it.

* net/tramp.el (tramp-ssh-controlmaster-options)
(tramp-use-ssh-controlmaster-options): Move them to tramp-sh.el.
(tramp-default-method): Do not check for
`tramp-ssh-controlmaster-options'.
2015-03-15 16:07:03 +01:00
Paul Eggert
33d9869b5f Spelling and minor grammar fixes 2015-03-10 00:49:57 -07:00
Michael Albinus
8ac08792a7 Sync with Tramp upstream.
* net/tramp-cache.el (tramp-dump-connection-properties):
Use `with-temp-file'.

* net/tramp-sh.el (tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes): Escape apostrophs in
file names.
(tramp-do-file-attributes-with-stat): Quote file name.
(tramp-sh-handle-directory-files-and-attributes): Fall back to
`tramp-handle-directory-files-and-attributes' in case of problems.
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-delete-directory)
(tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file):
Normalize use of "cd".
(tramp-do-directory-files-and-attributes-with-stat): Use the
`quoting-style' arg of `ls' if possible.  Make it also working for
file names with apostrophs.
(tramp-sh-handle-file-name-all-completions): Use arguments of `ls'
in proper order.
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-sh-handle-file-local-copy): Use `with-temp-file'.
(tramp-get-remote-locale): Accept also \r in output.
(tramp-get-ls-command-with-quoting-style): New defun.
(tramp-get-inline-coding): Set `default-directory' to a local
directory.  Sporadically, `call-process-region' does not handle a
remote default directory properly.

* net/tramp.el (tramp): Add :link property.
(tramp-login-prompt-regexp): Allow also "user", as required by
Fritz!Box telnet.
(tramp-autoload-file-name-handler): Use "/".
(tramp-handle-unhandled-file-name-directory): Return nil when
required by the spec.

* net/trampver.el: Update release number.
2015-03-04 11:02:36 +01:00
Jérémy Compostella
ba5bc0ee7c Tramp: Disable paging with PAGER=cat.
Fixes: debbugs:19870

* net/tramp-sh.el (tramp-remote-process-environment): Disable paging
with PAGER=cat.
2015-02-15 10:57:33 +01:00
Paul Eggert
5c20aa7486 Port to platforms lacking test -a and -o
* configure.ac (HAVE_LIBXML2):
* lisp/Makefile.in (compile-clean):
* lisp/net/tramp-sh.el (tramp-find-executable):
Prefer '&&' and '||' to 'test -a' and 'test -o'.
2015-02-08 16:00:58 -08:00
Michael Albinus
24fa4ff944 Further work on suppressing shell history in Tramp
Fixes: debbugs:19731

* net/tramp-sh.el (tramp-histfile-override): Fix docstring.
(tramp-open-shell, tramp-maybe-open-connection): Set also
HISTFILESIZE and HISTSIZE when needed.
2015-02-03 09:24:57 +01:00
Michael Albinus
c10828bd85 * net/tramp-sh.el (tramp-histfile-override): Use t instead of `unset'. 2015-02-02 20:47:31 +01:00
Michael Albinus
954ca0f017 * net/tramp-sh.el (tramp-histfile-override): Use `unset' as default. 2015-02-02 16:42:01 +01:00
Michael Albinus
219119e906 Fix last tramp-sh.el commit 2015-02-02 13:49:57 +01:00
Michael Albinus
6f8372ded1 Tramp: Support unsetting HISTFILE.
Fixes: debbugs:19731

* lisp/net/tramp-sh.el (tramp-histfile-override): Add another choice 'unset.
(tramp-open-shell, tramp-maybe-open-connection): Support it.
2015-02-02 12:38:36 +01:00
Paul Eggert
52a4e87c63 Fix copyright years by hand
These are dates that admin/update-copyright did not update, or
updated incorrectly.  Also, back out the copyright-date change to
doc/misc/texinfo.tex, as upstream hasn't updated that date yet.
2015-01-01 14:27:34 -08:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Fabián Ezequiel Gallina
411c1c6531 Merge from origin/emacs-24
216c6aa * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use `tramp-rsh-end-of-line', it ought to be more robust.
20cfd24 Improve indexing on the chapter/section/subsection levels.
14c3739 * lisp/progmodes/js.el (js-syntax-propertize): "return" can't be divided.
ea78112 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n" as end-of-line delimeter for passwords, when running on MS Windows.
012479a * lisp/progmodes/sh-script.el: Don't set global indent-line-function
75e114f Fix line numbers on Python shell.
d0fd23c doc/emacs/buffers.texi (Kill Buffer): Improve indexing.
8e818d1 Keep maximized when going fullscreen.
749813e python.el: Fix electric colon behavior
936d5e5 Fix last patch.
74d3b20 Fixes: debbugs:18623

Conflicts:
	doc/emacs/ChangeLog
	doc/lispref/ChangeLog
	doc/lispref/functions.texi
	lisp/ChangeLog
	src/ChangeLog
	src/xterm.c
	test/ChangeLog
2014-12-27 13:21:17 -03:00
Fabián Ezequiel Gallina
3a12f2ed99 Merge from origin/emacs-24
2616307 * net/tramp-sh.el (tramp-send-command-and-read): New optional arg MARKER. (tramp-get-remote-path): Use it.
c773edc * net/tramp-gw.el (tramp-gw-open-connection): Suppress traces in wrong debug buffer. (tramp-gw-open-connection): Set process coding system 'binary. (tramp-gw-open-network-stream): Handle HTTP error 403.
8032fc1 * .gitignore: Ignore /conftest*.
fb420e7 * lisp/subr.el (sit-for): Tweak docstring.
061db13 Fix vc-git-dir-status-files WRT up-to-date vs edited
bb57c94 Consider electric-pair-mode in tex-mode.
7b94572 * test/automated/flymake/warnpred/test.pl: Tweak earlier change.
59c218f ChangeLog fix
db2a768 * test/automated/flymake/warnpred/test.pl: Tweak format
d9005dd src/gnutls.c (gnutls_init): Fix deprecation warning from GCC.

Conflicts:
	ChangeLog
	lisp/ChangeLog
	src/ChangeLog
	test/ChangeLog
2014-12-27 13:15:55 -03:00
Michael Albinus
216c6aadf2 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Use `tramp-rsh-end-of-line', it ought to be more robust.
2014-12-24 09:58:49 +01:00
Michael Albinus
ea78112b12 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n"
as end-of-line delimeter for passwords, when running on MS Windows.

* net/tramp.el (tramp-read-passwd): Ignore errors from `auth-source-*'.
2014-12-23 14:17:00 +01:00
Michael Albinus
b459f1f0b9 * net/tramp-sh.el (tramp-histfile-override): Add :version. 2014-12-20 13:09:49 +01:00
Ted Zlatanov
6623f3daae * net/tramp-sh.el (tramp-histfile-override): Clarify docstring. 2014-12-20 06:14:04 -05:00
Michael Albinus
230c010050 * net/tramp-sh.el (tramp-send-command-and-read): New optional arg MARKER.
(tramp-get-remote-path): Use it.
2014-12-19 12:51:42 +01:00
Michael Albinus
2616307f5c * net/tramp-sh.el (tramp-send-command-and-read): New optional arg MARKER.
(tramp-get-remote-path): Use it.
2014-12-19 12:45:01 +01:00
Michael Albinus
c773edcf56 * net/tramp-gw.el (tramp-gw-open-connection): Suppress traces in
wrong debug buffer.
(tramp-gw-open-connection): Set process coding system 'binary.
(tramp-gw-open-network-stream): Handle HTTP error 403.

* net/tramp-sh.el (tramp-compute-multi-hops): Suppress traces in
wrong debug buffer.
(tramp-maybe-open-connection): Set connection property "gateway".

* net/tramp.el (tramp-error-with-buffer): Call `message' properly.
(tramp-accept-process-output): Use nil as argument for
`accept-process-output', when there is a gateway prepended.
2014-12-17 22:08:30 +01:00
Ted Zlatanov
9be1538571 Introduce tramp-histfile-override.
* net/tramp-sh.el (tramp-histfile-override): New variable.
(tramp-open-shell, tramp-maybe-open-connection): Use it.
2014-12-17 14:52:10 -05:00
Ted Zlatanov
28e0d0c95d Merge from origin/emacs-24
bd6c441 * simple.el (password-word-equivalents): Add "passcode", used for numeric secrets like PINs or RSA tokens.
16d4c1c A better fix for bug#19346
82ec808 * .gitignore: Add !lib/std*.in.h, so as to not ignore the .in.h files.
3cf7629 Git ignore lib/std*.h
301a401 Always define `gnutls-available-p' even if GnuTLS is not available.
d76b9b2 Don't break example string between 2 lines (bug#19257)
75b4857 Port commit-msg to mawk
9ac0332 Improve commit-msg messages and autosquash
0c2f254 Support overflow-newline-into-fringe together with word-wrap (bug#19300)
935ee05 * net/tramp-sh.el (tramp-get-remote-path): Use a login shell in order to determine `tramp-own-remote-path'.
c2db939 python.el: Support interpreter paths with spaces
d83f329 ChangeLog fix
0f9fbb9 Port commit-message checking to FreeBSD 9.
3db1ada admin/MAINTAINERS: Update my interests and responsibilities.
6382f24 * .gitignore: Ignore autosave files.

Conflicts:
	ChangeLog
	lisp/progmodes/python.el
	src/gnutls.c
2014-12-12 19:23:19 -05:00
Michael Albinus
935ee05f07 * net/tramp-sh.el (tramp-get-remote-path): Use a login shell in
order to determine `tramp-own-remote-path'.
2014-12-10 14:15:51 +01:00
Paul Eggert
0cce3623b1 Merge branch 'emacs-24'. 2014-11-28 23:07:16 -08:00
Michael Albinus
cd22fd754b Propagate remote process environment.
* net/tramp-sh.el (tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file): Propagate `process-environment'.

* vc/vc-hg.el (vc-hg-state): No special handling for remote files;
Tramp propagates environment variables now.
2014-11-22 12:37:04 +01:00
Michael Albinus
176f2077aa * net/tramp-sh.el (tramp-get-remote-locale): Return "LC_ALL=C" as
fallback.
(tramp-open-connection-setup-interactive-shell): No need to check
for nil as `tramp-get-remote-locale' return value.
2014-11-22 10:30:36 +01:00
Michael Albinus
6ec5ee8872 Improve XEmacs compatibility.
* net/tramp.el (tramp-autoload-file-name-handler):
Wrap `temporary-file-directory' by `symbol-value', it doesn't exist in XEmacs.
(tramp-read-passwd): Don't use `with-timeout-suspend' and
`with-timeout-unsuspend' if they don't exist, like in XEmacs.
(tramp-time-less-p, tramp-time-subtract): Remove functions.
(tramp-handle-file-newer-than-file-p, tramp-time-diff):
* net/ttramp-adb.el (tramp-adb-ls-output-time-less-p):
* net/ttramp-cache.el (tramp-get-file-property):
* net/ttramp-smb.el (tramp-smb-handle-insert-directory):
Use `time-less-p' and `time-subtract, respectively.
2014-11-20 20:10:15 +01:00
Michael Albinus
bd02f3d40e * net/tramp-adb.el (tramp-adb-handle-file-attributes):
* net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes):
* net/tramp-sh.el (tramp-sh-handle-file-attributes): Return nil in
case of errors.

* net/tramp.el (tramp-error-with-buffer): Show connection buffer
only when message appeared in minibuffer.

Fixes: debbugs:18891
2014-11-05 12:24:04 +01:00
Michael Albinus
b6ad705482 * net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Don't use
a local copy; setting `inhibit-file-name-handlers' proper might be
more performant.

Fixes: debbugs:18751
2014-11-04 10:02:56 +01:00
Michael Albinus
6c5a32ddbc * net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Use a
local copy of FILENAME, when it is remote.

Fixes: debbugs:18751
2014-11-03 15:29:51 +01:00
Michael Albinus
7a2d560045 * net/tramp-cache.el (tramp-get-file-property)
(tramp-set-file-property): Check, that `tramp-cache-get-count-*'
and `tramp-cache-set-count-*' are bound.  Otherwise, there might
be compiler warnings.

* net/tramp-sh.el (tramp-get-remote-uid, tramp-get-remote-gid):
Return -1 respective "UNKNOWN", if uid or gid cannot be determined.
2014-11-01 17:47:09 +01:00
Wolfgang Jenkner
b14b7f431f * net/tramp-sh.el (tramp-send-command): Fix the case where the
remote-echo connection property is non-nil.

Fixes: debbugs:18858
2014-11-01 15:08:00 +01:00
Michael Albinus
ae5602c51c Backport Tramp changes from trunk.
* net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'.
(tramp-adb-handle-write-region): Improve messages.
(tramp-adb-maybe-open-connection): Don't set
`tramp-current-*' variables.

* net/tramp-cache.el (tramp-flush-file-function): Simplify check.
Suppress debug messages.

* net/tramp-ftp.el (top): Remove special handling for URL syntax.
(tramp-ftp-file-name-handler):

* net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add.
(tramp-gvfs-methods-mounttracker)
(tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled'
during initialization. 
(tramp-gvfs-handle-delete-file): Flush file properties, not
directory properties.
(tramp-gvfs-handle-file-attributes): Use `string-to-number' when
reading "unix::mode".
(tramp-gvfs-handle-file-name-all-completions):
Use "-h" option for "gvfs-ls".
(tramp-gvfs-url-file-name): Apply `cons' where appropriate.
`user' and `localname' could be nil.
(tramp-gvfs-send-command): Simplify traces.

* net/tramp-sh.el (vc-handled-backends, vc-bzr-program)
(vc-git-program, vc-hg-program): Declare.
(tramp-methods) <sftp>: Remove.  It has never worked satisfactorily.
(tramp-methods) <nc>: Add new method.
(tramp-methods) <telnet>: Redirect stderr to "/dev/null".
(tramp-methods) <plink, plinkx, pscp, psftp>: Improve
`tramp-login-args'.
(tramp-default-user-alist): Add "nc".
(top): Remove completion function for "sftp".  Add completion
functions for "nc" and "psftp".
(tramp-sh-handle-set-visited-file-modtime):
(tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'.
(tramp-do-copy-or-rename-file-out-of-band):
Use cached "remote-copy-args" value, if available.  (Bug#18199)
Tweak docstring.  Implement support for "nc" method.
(tramp-sh-handle-expand-file-name, tramp-local-coding-commands)
(tramp-remote-coding-commands, tramp-call-local-coding-command):
Tweak docstring.
(tramp-sh-handle-start-file-process): Expand `default-directory'.
(tramp-sh-handle-write-region): Tweak error message.
(tramp-sh-handle-vc-registered): Remove backends when the remote
binary does not exist.
(tramp-open-connection-setup-interactive-shell):
Prefer utf-8 coding.  (Bug#17859)
(tramp-find-inline-encoding): Do not raise an error.
(tramp-make-copy-program-file-name): Tweak docstring.  Handle also
the "nc" case.  Quote result also locally.
(tramp-get-remote-id): Check also for "gid".
(tramp-get-remote-python):

* net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-set-file-acl): Use `start-process'.
(tramp-smb-handle-insert-directory): Use progress reporter.
(tramp-smb-handle-rename-file): Flush also file properties of
FILENAME.

* net/tramp.el (tramp-methods): Tweak docstring.
(tramp-file-name-handler): Apply `cons' where appropriate.
(tramp-handle-file-accessible-directory-p): Check for
`file-readable-p' instead of `file-executable-p'.
(tramp-handle-shell-command): Use `display-buffer'.  (Bug#18326)
(tramp-handle-unhandled-file-name-directory): Return "/".
(tramp-check-cached-permissions):
Use `tramp-compat-file-attributes'.
(tramp-call-process): Add new argument VEC.  Adapt callees in all
tramp*.el files.

* net/trampver.el: Update release number.
2014-11-01 14:34:45 +01:00
Michael Albinus
6692a64cc4 * net/tramp-adb.el (tramp-adb-handle-process-file):
* net/tramp-sh.el (tramp-sh-handle-process-file):
* net/tramp-smb.el (tramp-smb-handle-process-file): Do not raise
the output buffer when DISPLAY is non-nil.

Fixes: debbugs:17815
2014-06-22 11:20:38 +02:00
Michael Albinus
43425aecb1 * net/tramp-sh.el (tramp-find-inline-encoding): Do not match "%%t"
for a temporary file name.
2014-05-17 11:00:54 +02:00
Michael Albinus
23e19cf290 Fix Bug#17415.
* net/tramp-sh.el (tramp-uudecode): Replace the hard-coded temporary
file name by a format specifier.
(tramp-remote-coding-commands): Enhance docstring.
(tramp-find-inline-encoding): Replace "%t" by a temporary file name.
2014-05-06 11:51:05 +02:00
Michael Albinus
3e59ead144 Fix Bug#17295.
* net/tramp-sh.el (tramp-remote-process-environment): Remove
HISTFILE and HISTSIZE; it's too late to set them here.  Add
:version entry.
(tramp-open-shell): Do not let-bind `tramp-end-of-output'.  Add
"HISTSIZE=/dev/null" to the shell's env arguments.  Do not send
extra "PSx=..." commands.
(tramp-maybe-open-connection): Setenv HISTFILE to /dev/null.
2014-05-06 10:42:53 +02:00
Michael Albinus
14828a9567 * net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
Remove test messages.
(tramp-do-copy-or-rename-file-out-of-band): Do not quote `source'
and `target' twice.
2014-04-22 12:43:01 +02:00
Michael Albinus
505fa2ab43 * net/tramp-sh.el (tramp-sh-handle-file-name-all-completions): Set
"IFS=" when using read builtin, in order to preserve spaces in
the file name.  Add test messages for hunting a bug on hydra.
(tramp-get-ls-command): Undo using "-b" argument.  It doesn't help.
2014-04-21 23:04:25 +02:00
Michael Albinus
feb5d8a4d3 * net/tramp-sh.el (tramp-get-ls-command): Use "-b" argument if possible. 2014-04-20 23:35:55 +02:00
Michael Albinus
f2d164a4c6 * net/tramp-sh.el (tramp-sh-handle-file-truename): Revert previous
patch, there are new problems with file names containing spaces.
Get rid of backticks.  (Bug#17238)
2014-04-13 12:31:48 +02:00
Michael Albinus
f628e17c4b * net/tramp-sh.el (tramp-sh-handle-file-truename): Quote the file
name twice due to backticks.  (Bug#17238)
2014-04-11 14:59:36 +02:00
Michael Albinus
bcbb83a92d * net/tramp.el (tramp-file-name-handler)
(tramp-completion-file-name-handler): Avoid recursive loading.

* net/tramp-sh.el (tramp-make-copy-program-file-name):
Quote result also locally.
2014-04-10 09:17:40 +02:00
Michael Albinus
08cf935b84 * net/tramp-sh.el (tramp-do-copy-or-rename-file-directly): In the
`rename' case, check whether source directory has set the sticky bit.
2014-03-25 10:49:37 +01:00