[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Remote display-time-mail-file
From: |
Michael Albinus |
Subject: |
Re: Remote display-time-mail-file |
Date: |
Thu, 16 Sep 2010 23:01:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
>> Date: Thu, 16 Sep 2010 20:38:32 +0200
>> From: Eli Zaretskii <address@hidden>
>> Cc: address@hidden
>>
>> Is this supposed to work:
>>
>> (setq display-time-mail-file "/plink:address@hidden:/var/mail/eliz")
>>
>> ?
>>
>> It doesn't work well for me in Emacs 23.2 on MS-Windows, and the
>> reason seems to be that file-attributes, called by
>> display-time-file-nonempty-p, only probes the file once, and
>> thereafter returns the same attributes, even when the file's size
>> changes. Is there some cache somewhere?
>
> The same happens in 3-day old Emacs 24, FWIW, and for the same reason.
In order to check, whether Tramp's cache is involved, you might test the
following patch (it might not be the final solution, 'tho):
--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs/lisp/time.el.~101446~ 2010-09-16
22:56:41.003703326 +0200
--- /home/albinus/src/emacs/lisp/time.el 2010-09-16 22:56:09.068503672
+0200
***************
*** 454,461 ****
(force-mode-line-update))
(defun display-time-file-nonempty-p (file)
! (and (file-exists-p file)
! (< 0 (nth 7 (file-attributes (file-chase-links file))))))
;;;###autoload
(define-minor-mode display-time-mode
--- 454,462 ----
(force-mode-line-update))
(defun display-time-file-nonempty-p (file)
! (let ((tramp-cache-inhibit-cache t))
! (and (file-exists-p file)
! (< 0 (nth 7 (file-attributes (file-chase-links file)))))))
;;;###autoload
(define-minor-mode display-time-mode
--8<---------------cut here---------------end--------------->8---
Best regards, Michael.
- Remote display-time-mail-file, Eli Zaretskii, 2010/09/16
- Re: Remote display-time-mail-file, Eli Zaretskii, 2010/09/16
- Re: Remote display-time-mail-file,
Michael Albinus <=
- Re: Remote display-time-mail-file, Eli Zaretskii, 2010/09/17
- Re: Remote display-time-mail-file, Michael Albinus, 2010/09/17
- Re: Remote display-time-mail-file, Stefan Monnier, 2010/09/17
- Re: Remote display-time-mail-file, Michael Albinus, 2010/09/17
- Re: Remote display-time-mail-file, Michael Albinus, 2010/09/17
- Re: Remote display-time-mail-file, Eli Zaretskii, 2010/09/17
- Re: Remote display-time-mail-file, Michael Albinus, 2010/09/18
- Re: Remote display-time-mail-file, Stefan Monnier, 2010/09/18
- Re: Remote display-time-mail-file, Eli Zaretskii, 2010/09/18
- Re: Remote display-time-mail-file, Michael Albinus, 2010/09/18