From: Michael Albinus <michael.albinus@gmx.de>
Subject: Auto-revert on remote files: disabling timers temporarily?
Date: Sun, 30 May 2004 17:58:55 +0200 [thread overview]
Message-ID: <87aczpdhz4.fsf@gmx.de> (raw)
In parallel to Kai, I've tried to find another solution. What about
disabling timers during execution of a Tramp file name function?
Something like this:
(defun tramp-file-name-handler (operation &rest args)
"Invoke Tramp file name handler.
Falls back to normal file name handler if no tramp file name handler exists."
(save-match-data
(let* ((filename (apply 'tramp-file-name-for-operation operation args))
(foreign (tramp-find-foreign-file-name-handler filename)))
(cond
(foreign
;; Tramp functions called by timers would disturb process
;; communication. Therefore, timers are disabled temporarily.
(let ((tl timer-list))
(unwind-protect
(progn
(setq timer-list nil)
(apply foreign operation args))
(setq timer-list tl))))
(t (tramp-run-real-handler operation args))))))
Locally, it works fine for me, even with enabled auto-revert-mode for
remote files. But I have no idea about side effects. Are there obvious
objections against?
Best regards, Michael.
next reply other threads:[~2004-05-30 15:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-30 15:58 Michael Albinus [this message]
2004-05-31 1:59 ` Auto-revert on remote files: disabling timers temporarily? Luc Teirlinck
2004-05-31 8:51 ` Michael Albinus
2004-05-31 20:15 ` Luc Teirlinck
2004-05-31 20:43 ` Michael Albinus
2004-05-31 21:06 ` Luc Teirlinck
2004-05-31 21:15 ` Michael Albinus
2004-05-31 21:20 ` Luc Teirlinck
2004-06-01 0:18 ` Luc Teirlinck
2004-05-31 21:12 ` Luc Teirlinck
2004-05-31 21:20 ` Michael Albinus
2004-05-31 21:55 ` Luc Teirlinck
2004-05-31 22:18 ` Kim F. Storm
2004-05-31 23:05 ` Luc Teirlinck
2004-05-31 23:08 ` Luc Teirlinck
2004-05-31 23:24 ` Luc Teirlinck
2004-05-31 23:58 ` Luc Teirlinck
2004-05-31 22:12 ` Luc Teirlinck
[not found] ` <200405312331.i4VNVIw27988@raven.dms.auburn.edu>
2004-06-01 5:41 ` Michael Albinus
2004-05-31 2:31 ` Luc Teirlinck
2004-05-31 3:10 ` Luc Teirlinck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aczpdhz4.fsf@gmx.de \
--to=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.