1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-06 11:55:48 +00:00
Commit Graph

1664 Commits

Author SHA1 Message Date
Michael Albinus
d08536296c * net/tramp-compat.el (tramp-compat-call-process): Move function ...
* net/tramp.el (tramp-call-process): ... here
(tramp-set-completion-function, tramp-parse-putty):
* net/tramp-adb.el (tramp-adb-execute-adb-command):
* net/tramp-gvfs.el (tramp-gvfs-send-command):
* net/tramp-sh.el (tramp-sh-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-sh-handle-write-region)
(tramp-call-local-coding-command): Use `tramp-call-process'
instead of `tramp-compat-call-process'.

* net/tramp-sh.el (tramp-perl-pack, tramp-perl-unpack): New defconst.
(tramp-local-coding-commands, tramp-remote-coding-commands): Use them.
(tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region):
(tramp-find-inline-compress):Improve traces.
(tramp-maybe-send-script): Check for Perl binary.
(tramp-get-inline-coding): Do not redirect STDOUT for local decoding.
2013-04-22 12:26:09 +02:00
Michael Albinus
beb42340a1 * net/tramp-sh.el (tramp-remote-process-environment): Add "TMOUT=0". 2013-04-18 14:47:01 +02:00
Michael Albinus
eb922adfdb * net/ange-ftp.el (ange-ftp-run-real-handler-orig): New defun,
uses code from the previous `ange-ftp-run-real-handler'.
(ange-ftp-run-real-handler): Set it to `tramp-run-real-handler'
only in case that function exist.  This is needed for proper
unloading of Tramp.
2013-04-15 11:43:20 +02:00
Glenn Morris
8d3655be5a Merge from emacs-24; up to 2012-12-26T16:22:18Z!michael.albinus@gmx.de 2013-03-30 09:55:47 -07:00
Michael Albinus
4430bd5399 * net/tramp.el (tramp-drop-volume-letter): Make it an ordinary
defun.  Defining it as defalias could introduce too eager
byte-compiler optimization.  (Bug#14030)
2013-03-25 10:16:31 +01:00
Michael Albinus
64ab82d1da * net/tramp-compat.el (tramp-compat-user-error): New defun.
* net/tramp-adb.el (tramp-adb-handle-shell-command):
* net/tramp-gvfs.el (top):
* net/tramp.el (tramp-find-method, tramp-dissect-file-name)
(tramp-handle-shell-command): Use it.
(tramp-dissect-file-name): Raise an error when hostname is a
method name, and neither method nor user is specified.

* net/trampver.el: Update release number.
2013-03-18 14:04:13 +01:00
Michael Albinus
67c0a6e63e * net/tramp-adb.el (tramp-adb-parse-device-names): Use
`start-process' instead of `call-process'.  Otherwise, the
function might be blocked under MS Windows.
2013-03-17 18:23:05 +01:00
Michael Albinus
2edd602933 Sync with Tramp 2.2.7.
* net/trampver.el: Update release number.
2013-03-15 15:17:25 +01:00
Michael Albinus
dba720f1d1 Fix last change. 2013-03-13 12:42:21 +01:00
Michael Albinus
85b66a2100 * net/tramp-sh.el (tramp-sh-handle-insert-directory): Check,
whether `default-file-name-coding-system' is bound.  It isn't in
XEmacs.
2013-03-13 12:38:13 +01:00
Stefan Monnier
940e509914 Use locate-user-emacs-file.
* lisp/type-break.el (type-break-file-name):
* lisp/textmodes/remember.el (remember-data-file):
* lisp/strokes.el (strokes-file):
* lisp/shadowfile.el (shadow-initialize):
* lisp/saveplace.el (save-place-file):
* lisp/ps-bdf.el (bdf-cache-file):
* lisp/progmodes/idlwave.el (idlwave-config-directory):
* lisp/net/quickurl.el (quickurl-url-file):
* lisp/international/kkc.el (kkc-init-file-name):
* lisp/ido.el (ido-save-directory-list-file):
* lisp/emulation/viper.el (viper-custom-file-name):
* lisp/emulation/vip.el (vip-startup-file):
* lisp/calendar/todo-mode.el (todo-file-do, todo-file-done, todo-file-top):
* lisp/calendar/timeclock.el (timeclock-file): Use locate-user-emacs-file.
2013-03-11 22:08:21 -04:00
Thierry Volpiatto
c6bdd11071 * lisp/net/net-utils.el (net-utils-remove-ctrl-m-filter):
Use with-current-buffer and don't move point.
(net-utils-run-simple): Remove useless code.
(net-utils-remove-ctl-m): Remove unused custom.
2013-03-11 14:30:49 -04:00
Michael Albinus
3675b1698d Major rewrite due to changed D-Bus interface of GVFS 1.14.
* net/tramp-gvfs.el (top): Extend check for gvfs availability.
(tramp-gvfs-methods-mounttracker, tramp-gvfs-listmounts)
(tramp-gvfs-mountlocation, tramp-gvfs-mountlocation-signature):
New defconst.
(tramp-gvfs-file-name-handler-alist) [directory-files]:
[directory-files-and-attributes, file-exists-p, file-modes]: Use
Tramp default handler.
[file-acl, file-selinux-context, process-file, set-file-acl]:
[set-file-modes, set-file-selinux-context, shell-command]:
[start-file-process ]: Remove handler.
[verify-visited-file-modtime]: New handler.
(tramp-gvfs-dbus-string-to-byte-array)
(tramp-gvfs-dbus-byte-array-to-string): New defuns.  Replace all
calls of `dbus-string-to-byte-array' and
`tramp-gvfs-dbus-byte-array-to-string'.
(tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-delete-directory)
(tramp-gvfs-handle-delete-file, tramp-gvfs-handle-file-attributes)
(tramp-gvfs-handle-file-directory-p)
(tramp-gvfs-handle-file-executable-p)
(tramp-gvfs-handle-file-name-all-completions)
(tramp-gvfs-handle-file-readable-p)
(tramp-gvfs-handle-file-writable-p)
(tramp-gvfs-handle-insert-directory)
(tramp-gvfs-handle-insert-file-contents)
(tramp-gvfs-handle-make-directory, tramp-gvfs-handle-rename-file)
(tramp-gvfs-handle-set-visited-file-modtime)
(tramp-gvfs-handle-write-region): Rewrite.
(tramp-gvfs-handle-file-acl)
(tramp-gvfs-handle-file-selinux-context)
(tramp-gvfs-handle-process-file, tramp-gvfs-handle-set-file-acl)
(tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-selinux-context)
(tramp-gvfs-handle-shell-command)
(tramp-gvfs-handle-start-file-process)
(tramp-gvfs-handle-verify-visited-file-modtime): Remove defuns.
(tramp-gvfs-url-file-name): Do not use `file-truename', we work
over the symlinks.  Fix user handling.
(top, tramp-gvfs-handler-mounted-unmounted): Handle different names
of the D-Bus signals.
(tramp-gvfs-connection-mounted-p): Handle different names of the
D-Bus methods.
(tramp-gvfs-mount-spec-entry): New defun.
(tramp-gvfs-mount-spec): Use it.
(tramp-gvfs-maybe-open-connection): Check, that in case of "smb"
there is a share name.  Handle different names of the D-Bus
signals and methods.
(tramp-gvfs-maybe-open-connection): Set connection properties
needed for `tramp-check-cached-permissions'.
(tramp-gvfs-send-command): Apply `tramp-gvfs-maybe-open-connection'.
Return t or nil.

* net/tramp.el (tramp-backtrace): Move up.
(tramp-error): Apply a backtrace into the debug buffer when
`tramp-verbose > 9.
(tramp-file-mode-type-map, tramp-file-mode-from-int)
(tramp-file-mode-permissions, tramp-get-local-uid)
(tramp-get-local-gid, tramp-check-cached-permissions): Move from
tramp-sh.el.

* net/tramp-sh.el (tramp-file-mode-type-map)
(tramp-check-cached-permissions, tramp-file-mode-from-int)
(tramp-file-mode-permissions, tramp-get-local-uid)
(tramp-get-local-gid): Move to tramp.el.
2013-03-09 12:06:23 +01:00
Paul Eggert
c38e0c974e Prefer UTF-8 when the encoding shouldn't matter and changes are small. 2013-03-05 09:13:01 -08:00
Michael Albinus
11f4d68f25 * net/tramp-compat.el (tramp-compat-delete-directory): Implement
TRASH argument.
2013-03-05 16:55:53 +01:00
Michael Albinus
9a0f9ec39a * net/tramp-adb.el (tramp-adb-maybe-open-connection): Cache,
whether the "su" command is available on the device.
2013-03-03 11:31:01 +01:00
Michael Albinus
7d11fc2763 * net/tramp-adb.el (tramp-adb-prompt): Extend regexp.
(tramp-adb-handle-process-file): Remove superfluous setting.
(tramp-adb-command-exit-status): Handle case that COMMAND is nil.
(tramp-adb-barf-unless-okay): Use `tramp-adb-command-exit-status'.
(tramp-adb-maybe-open-connection): Apply "su" if user is defined.
2013-03-01 22:12:26 +01:00
Thierry Volpiatto
7944eaa336 * lisp/net/net-utils.el (net-utils-run-simple): Don't display-buffer
when reverting.

Fixes: debbugs:13831
2013-03-01 12:27:57 -05:00
Michael Albinus
36a8b68b33 * net/tramp.el (tramp-obsolete-methods): New defconst.
(tramp-warned-obsolete-methods): New defvar.
(tramp-find-method): Check for obsolete methods.  Map them to a
replacement method if appropriate.

* net/tramp-sh.el (tramp-methods) [scp1, scp2, ssh1, ssh2, plink1]:
Remove methods.
(top): Remove completion functions for "scp1", "scp2", "ssh1",
"ssh2" and "plink1".
2013-03-01 09:13:53 +01:00
Michael Albinus
779451da53 * net/tramp-adb.el (tramp-adb-sdk-dir): Remove. Replaced by ...
(tramp-adb-program): New defcustom.  Remove function.  Adapt calls.
2013-02-28 20:33:03 +01:00
Thierry Volpiatto
bd0dd7554e * lisp/net/net-utils.el (net-utils--revert-function): New fun.
(net-utils-mode): Use it.
(net-utils--revert-cmd): New var.
(net-utils-run-simple): Set it, and remove bogus interactive spec.
(traceroute): Use net-utils-run-simple.

Fixes: debbugs:13831
2013-02-28 09:51:03 -05:00
Michael Albinus
fa550654db * net/tramp-adb.el (tramp-adb-parse-device-names)
(tramp-adb-maybe-open-connection): Add timeouts.  (Bug#13299)
2013-02-27 10:20:13 +01:00
Michael Albinus
58bd4aa21a * net/tramp-sh.el (tramp-sh-handle-insert-directory): Add
"2>/dev/null" to the ls command, in case "en_US.utf8" is not
defined.  POSIX environments fall back to the "C" locale then and
emit a warning, which shall be suppressed.
2013-02-26 09:46:38 +01:00
Michael Albinus
c57a0aff3e * net/tramp.el (tramp-methods): Fix docstring.
(tramp-ssh-controlmaster-options): Rename it from
`tramp-ssh-controlmaster-template'.  Return a string.
(tramp-default-method): Adapt check for
`tramp-ssh-controlmaster-options'.

* net/tramp-sh.el (tramp-methods): Replace
`tramp-ssh-controlmaster-template' by "%c".
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Use it in format spec.  Ensure,
that it is applied for the first hop only.
2013-02-23 13:40:14 +01:00
Michael Albinus
29bb19dc10 * net/tramp.el (tramp-tramp-file-p): Fix docstring.
* net/tramp-sh.el (tramp-sh-handle-insert-directory): Handle
multibyte file names.
2013-02-22 15:05:38 +01:00
Glenn Morris
cfbf790d80 Merge from emacs-24; up to 2012-12-21T07:35:02Z!ueno@gnu.org 2013-02-21 08:56:49 -08:00
Michael Albinus
d20e6e9093 * net/tramp.el (tramp-ssh-controlmaster-template): Make it a
defconst.  Apply independent check for ControlPersist.
2013-02-21 15:23:12 +01:00
Michael Albinus
886bae77f0 * net/tramp-sh.el (tramp-sh-handle-set-file-times): Set $UTC only
temporarily, via "env".
2013-02-21 14:36:16 +01:00
Glenn Morris
e233e1000e * lisp/net/tramp.el (tramp-get-debug-buffer): Ensure outline.el is not
loaded while outline-regexp is let bound.  (Bug#9584)
2013-02-19 16:21:30 -05:00
Michael Albinus
81ed22e4ca * net/tramp-cache.el (tramp-get-hash-table): New defun.
(tramp-get-file-property, tramp-set-file-property)
(tramp-get-connection-property, tramp-set-connection-property): Use it.
(tramp-flush-file-property, tramp-flush-directory-property):
Rename argument to KEY.
(tramp-flush-connection-property): Simplify a little bit.
(tramp-connection-property-p): New defun.
(top): Reapply saved values only if there isn't a corresponding
entry in `tramp-connection-properties'.
2013-02-19 16:17:55 +01:00
Glenn Morris
872faefb07 Merge from emacs-24; up to 2012-12-20T16:09:05Z!dmantipov@yandex.ru 2013-02-18 19:29:28 -08:00
Michael Albinus
c9bcc580e8 * eshell/em-unix.el (eshell/su): Require tramp.
(eshell/sudo): Require tramp.  Remove now unnecessary check.

* net/tramp-sh.el (tramp-sh-handle-start-file-process): Let-bind
`tramp-current-connection' in order to avoid an error when several
commands are invoked in a short time in eshell and friends.
2013-02-18 20:13:21 +01:00
Glenn Morris
a51e9ff76c Merge from emacs-24; up to 2012-12-20T05:05:41Z!dmantipov@yandex.ru 2013-02-17 11:01:46 -08:00
Leo Liu
53db1d8b92 * net/rcirc.el (rcirc-keepalive): Fix invalid timer error. 2013-02-18 00:26:38 +08:00
Michael Albinus
61addbc212 * net/tramp-cache.el (tramp-connection-properties): New customer option.
(tramp-get-connection-property): Use it.

* net/tramp-compat.el (top): Require 'trampver.

* net/tramp-sh.el (tramp-remote-process-environment): Set
tramp-autoload cookie.
2013-02-16 18:44:00 +01:00
Didier Verna
e5b246e9f3 * lisp/net/network-stream.el (network-stream-open-starttls):
Check that response to the starttls-command is non-nil.

Fixes: debbugs:13706
2013-02-15 18:45:24 -08:00
Paul Eggert
648e5523fb Merge from emacs-24; up to 2012-12-19T13:01:16Z!michael.albinus@gmx.de 2013-02-14 22:35:54 -08:00
Stefan Monnier
213ac1686c * lisp/net/goto-addr.el (goto-address-fontify): Add start and end args.
(goto-address-fontify-region): Use them instead of narrowing, so
syntax-ppss has access to the whole buffer.
2013-02-14 10:53:46 -05:00
Michael Albinus
5267e6d3f6 * net/tramp.el (tramp-debug-message): Add
`tramp-condition-case-unless-debug'.
(tramp-debug-on-error): New defvar.
(tramp-condition-case-unless-debug): New defun.
(tramp-file-name-handler): Use it.
2013-02-14 14:32:04 +01:00
David Biesack
3ca2c0150d * net/quickurl.el (quickurl-save-urls): Ensure quickurl-urls is not truncated
on printing.

Fixes: debbugs:9276
2013-02-13 23:50:57 -08:00
Michael Albinus
d729103280 Use ControlMaster where applicable. (Bug#13677)
* net/tramp.el (tramp-ssh-controlmaster-template): New defvar,
replacing `tramp-detect-ssh-controlmaster'.
(tramp-default-method): Use it.

* net/tramp-sh.el (tramp-methods) [scp, scp1, scp2, scpx, sftp]:
[rsync, ssh, ssh1, ssh2, sshx]: Add ControlPath and ControlMaster
arguments.
[scpc, rsyncc]: Remove methods.
(top): Remove completion functions for "scpc", "rsyncc", "ssh1_old"
and "ssh2_old".
(tramp-do-copy-or-rename-file-out-of-band):  Change trace level.
(tramp-maybe-open-connection): Reuse tmpfile for ControlPath.
2013-02-13 17:23:15 +01:00
Glenn Morris
01fcc3a532 Merge from emacs-24; up to 2012-12-17T11:17:34Z!rgm@gnu.org 2013-02-12 20:31:09 -08:00
Michael Albinus
f1f0587100 * net/tramp-adb.el (tramp-adb-handle-start-file-process): Rewrite.
* net/tramp-compat.el (top): Declare `remote-file-name-inhibit-cache'
only if it doesn't exist.

* net/tramp-sh.el (tramp-sh-handle-start-file-process): Set
process marker.
2013-02-12 15:35:10 +01:00
Glenn Morris
958614cf80 Make S-SPC scroll in the opposite direction to SPC
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calendar/calendar.el (calendar-mode-map):
* lisp/cus-edit.el (custom-mode-map):
* lisp/ehelp.el (electric-help-map):
* lisp/emulation/vip.el (vip-mode-map):
* lisp/epa.el (epa-key-list-mode-map):
* lisp/info.el (Info-mode-map):
* lisp/mail/rmail.el (rmail-mode-map):
* lisp/mail/rmailsum.el (rmail-summary-mode-map):
* lisp/man.el (Man-mode-map):
* lisp/net/newst-plainview.el (newsticker-mode-map):
* lisp/progmodes/cpp.el (cpp-edit-mode-map):
* lisp/progmodes/grep.el (grep-mode-map):
* lisp/progmodes/idlw-help.el (idlwave-help-mode-map):
* lisp/simple.el (special-mode-map):
* lisp/startup.el (splash-screen-keymap):
* lisp/view.el (view-mode-map):
Make S-SPC scroll in the opposite sense to SPC.

Fixes: debbugs:2145
2013-02-11 20:46:18 -08:00
Paul Eggert
e37778785a Remove obsolete references to VAX in comments. 2013-02-10 16:35:37 -08:00
Michael Albinus
e08e7d9154 * net/ange-ftp.el (ange-ftp-make-directory): Don't raise an error,
if DIR exists and PARENTS is non-nil.
2013-02-10 11:07:09 +01:00
Eli Zaretskii
8549f9e89b Remove all references to buffer-file-type and related features.
src/xdisp.c (decode_mode_spec): Remove handling of %t.

 lisp/net/ange-ftp.el (ange-ftp-insert-file-contents): Don't reference
 buffer-file-type.
 lisp/mail/feedmail.el (feedmail-force-binary-write): Doc fix.
 (feedmail-run-the-queue, feedmail-dump-message-to-queue)
 (feedmail-send-it-immediately): Don't bind buffer-file-type, bind
 coding-system-for-write instead.
 lisp/jka-compr.el (jka-compr-write-region): Don't bind
 buffer-file-type.
 lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't bind
 buffer-file-type.
 lisp/files.el (file-name-buffer-file-type-alist): Remove defvar.
 (insert-file-contents-literally): Remove reference to
 file-name-buffer-file-type-alist.
 lisp/dos-w32.el (file-name-buffer-file-type-alist): Deprecate and
 make-obsolete.
 (find-buffer-file-type-match, find-buffer-file-type): Remove.
 (find-buffer-file-type-coding-system): Remove references to
 find-buffer-file-type-match, find-buffer-file-type, and
 buffer-file-type.
 Don't put find-buffer-file-type-coding-system into
 file-coding-system-alist.
 (find-file-binary, find-file-text): Bind coding-system-for-read
 instead of file-name-buffer-file-type-alist.
 lisp/erc/erc-dcc.el (erc-dcc-get-file): Don't reference buffer-file-type.

 doc/emacs/msdog.texi (Text and Binary): Delete the description of
 file-name-buffer-file-type-alist.

 doc/lispref/modes.texi (%-Constructs): Remove the description of %t.
 doc/lispref/nonascii.texi (MS-DOS File Types): Delete node.

Fixes: debbugs:12989
2013-02-09 14:52:01 +02:00
Michael Albinus
5870b2b1d3 * net/tramp.el (tramp-debug-message): Extend function exclude list.
(tramp-backtrace): New defun.
(tramp-handle-insert-file-contents): Use `visit' when inserting
the local copy.

* net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime): Use
`remote-file-name-inhibit-cache'.
2013-02-03 17:49:37 +01:00
Glenn Morris
94fbc90170 Merge from emacs-24; up to 2012-12-13T09:45:54Z!lekktu@gmail.com 2013-02-01 19:38:21 -08:00
Andrew W. Nosenko
f864e0ea83 * net/tramp.el (tramp-check-for-regexp): Avoid "Args out of range"
error when buffer in question is narrowed so position 1 is out of
visible part.
2013-02-01 22:10:08 +01:00