summaryrefslogtreecommitdiff
path: root/lisp/shadowfile.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2019-09-07 12:31:31 +0200
committerMichael Albinus <michael.albinus@gmx.de>2019-09-07 12:31:31 +0200
commit01a04880ca7469626a03ea10481d60c5ddec4663 (patch)
tree171e9538fc8e870bb046053946ff0490ef95dd11 /lisp/shadowfile.el
parent52f83af1f3975130b6bd035166780c2c2dde778c (diff)
downloademacs-01a04880ca7469626a03ea10481d60c5ddec4663.tar.gz
Add traces in shadowfile
* lisp/shadowfile.el (shadow-add-to-todo) (shadow-remove-from-todo, shadow-save-todo-file): * test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo): Add traces.
Diffstat (limited to 'lisp/shadowfile.el')
-rw-r--r--lisp/shadowfile.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el
index 4566ea19f8d..2778e583674 100644
--- a/lisp/shadowfile.el
+++ b/lisp/shadowfile.el
@@ -634,6 +634,10 @@ Consider them as regular expressions if third arg REGEXP is true."
(let ((shadows (shadow-shadows-of
(shadow-expand-file-name
(buffer-file-name (current-buffer))))))
+ (when shadow-debug
+ (message
+ "shadow-add-to-todo: %s %s\n%s"
+ shadows shadow-files-to-copy (with-output-to-string (backtrace))))
(when shadows
(setq shadow-files-to-copy
(shadow-union shadows shadow-files-to-copy))
@@ -647,6 +651,10 @@ Consider them as regular expressions if third arg REGEXP is true."
(defun shadow-remove-from-todo (pair)
"Remove PAIR from `shadow-files-to-copy'.
PAIR must be `eq' to one of the elements of that list."
+ (when shadow-debug
+ (message
+ "shadow-remove-from-todo: %s %s\n%s"
+ pair shadow-files-to-copy (with-output-to-string (backtrace))))
(setq shadow-files-to-copy
(cl-remove-if (lambda (s) (eq s pair)) shadow-files-to-copy)))
@@ -717,6 +725,8 @@ With non-nil argument also saves the buffer."
(if save (shadow-save-todo-file))))
(defun shadow-save-todo-file ()
+ (when shadow-debug
+ (message "shadow-save-todo-file:\n%s" (with-output-to-string (backtrace))))
(if (and shadow-todo-buffer (buffer-modified-p shadow-todo-buffer))
(with-current-buffer shadow-todo-buffer
(condition-case nil ; have to continue even in case of
@@ -772,7 +782,7 @@ look for files that have been changed and need to be copied to other systems."
(buffer-list))))
(yes-or-no-p "Modified buffers exist; exit anyway? "))
(or (not (fboundp 'process-list))
- ;; process-list is not defined on MSDOS.
+ ;; `process-list' is not defined on MSDOS.
(let ((processes (process-list))
active)
(while processes