[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r100471: * net/tramp.el (tramp-debug-
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r100471: * net/tramp.el (tramp-debug-message): Add `tramp-compat-funcall' |
Date: |
Fri, 28 May 2010 16:48:56 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100471
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Fri 2010-05-28 16:48:56 +0200
message:
* net/tramp.el (tramp-debug-message): Add `tramp-compat-funcall'
to ignored backtrace functions.
(with-progress-reporter): Expand docstring.
(tramp-handle-delete-file): Implement TRASH argument.
(tramp-get-remote-trash): New defun.
modified:
lisp/ChangeLog
lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-05-28 13:28:36 +0000
+++ b/lisp/ChangeLog 2010-05-28 14:48:56 +0000
@@ -1,5 +1,13 @@
2010-05-28 Michael Albinus <address@hidden>
+ * net/tramp.el (tramp-debug-message): Add `tramp-compat-funcall'
+ to ignored backtrace functions.
+ (with-progress-reporter): Expand docstring.
+ (tramp-handle-delete-file): Implement TRASH argument.
+ (tramp-get-remote-trash): New defun.
+
+2010-05-28 Michael Albinus <address@hidden>
+
* net/tramp-compat.el (tramp-compat-delete-file): Use
`symbol-value' for backward compatibility.
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2010-05-28 13:28:36 +0000
+++ b/lisp/net/tramp.el 2010-05-28 14:48:56 +0000
@@ -2121,7 +2121,7 @@
(setq fn (symbol-name btf))
(unless (and (string-match "^tramp" fn)
(not (string-match
- "^tramp\\(-debug\\)?\\(-message\\|-error\\)$"
+
"^tramp\\(-debug\\)?\\(-message\\|-error\\|-compat-funcall\\)$"
fn)))
(setq fn nil)))
(setq btn (1+ btn))))
@@ -2290,7 +2290,10 @@
(funcall 'progress-reporter-update reporter value))))
(defmacro with-progress-reporter (vec level message &rest body)
- "Executes BODY, spinning a progress reporter with MESSAGE."
+ "Executes BODY, spinning a progress reporter with MESSAGE.
+If LEVEL does not fit for visible messages, or if this is a
+nested call of the macro, there are only traces without a visible
+progress reporter."
`(let (pr tm)
(tramp-message ,vec ,level "%s..." ,message)
;; We start a pulsing progress reporter after 3 seconds. Feature
@@ -2304,7 +2307,9 @@
(run-at-time 3 0.1 'tramp-progress-reporter-update pr)))
(error nil)))
(unwind-protect
- ;; Execute the body.
+ ;; Execute the body. Unset `tramp-message-show-message' when
+ ;; the timer object is created, in order to suppress
+ ;; concurrent timers.
(let ((tramp-message-show-message
(and tramp-message-show-message (not tm))))
,@body)
@@ -4114,15 +4119,16 @@
(defun tramp-handle-delete-file (filename &optional trash)
"Like `delete-file' for Tramp files."
- ;; TRASH needs to be implemented. See `move-file-to-trash'.
(setq filename (expand-file-name filename))
(with-parsed-tramp-file-name filename nil
(tramp-flush-file-property v (file-name-directory localname))
(tramp-flush-file-property v localname)
- (unless (zerop (tramp-send-command-and-check
- v
- (format "rm -f %s"
- (tramp-shell-quote-argument localname))))
+ (unless
+ (zerop
+ (tramp-send-command-and-check
+ v (format "%s %s"
+ (or (and trash (tramp-get-remote-trash v)) "rm -f")
+ (tramp-shell-quote-argument localname))))
(tramp-error v 'file-error "Couldn't delete %s" filename))))
;; Dired.
@@ -8417,6 +8423,11 @@
(error nil))))
result))))
+(defun tramp-get-remote-trash (vec)
+ (with-connection-property vec "trash"
+ (tramp-message vec 5 "Finding a suitable `trash' command")
+ (tramp-find-executable vec "trash" (tramp-get-remote-path vec))))
+
(defun tramp-get-remote-id (vec)
(with-connection-property vec "id"
(tramp-message vec 5 "Finding POSIX `id' command")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r100471: * net/tramp.el (tramp-debug-message): Add `tramp-compat-funcall',
Michael Albinus <=