From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Auto-revert on remote files: disabling timers temporarily? Date: Sun, 30 May 2004 17:58:55 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87aczpdhz4.fsf@gmx.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1085933298 583 80.91.224.253 (30 May 2004 16:08:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 May 2004 16:08:18 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun May 30 18:08:09 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BUSr3-0000uu-00 for ; Sun, 30 May 2004 18:08:09 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BUSr2-0006dW-00 for ; Sun, 30 May 2004 18:08:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BUSrB-0006bT-I1 for emacs-devel@quimby.gnus.org; Sun, 30 May 2004 12:08:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BUSm3-0003EE-CM for emacs-devel@gnu.org; Sun, 30 May 2004 12:02:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BUSm0-0003C4-OH for emacs-devel@gnu.org; Sun, 30 May 2004 12:02:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BUSm0-00039N-K7 for emacs-devel@gnu.org; Sun, 30 May 2004 12:02:56 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1BUSiN-000645-5d for emacs-devel@gnu.org; Sun, 30 May 2004 11:59:11 -0400 Original-Received: (qmail 13476 invoked by uid 65534); 30 May 2004 15:58:59 -0000 Original-Received: from pD9E70F9C.dip0.t-ipconnect.de (EHLO magdalene.local) (217.231.15.156) by mail.gmx.net (mp018) with SMTP; 30 May 2004 17:58:59 +0200 X-Authenticated: #3708877 Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:24223 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:24223 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.