all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Remote display-time-mail-file
Date: Thu, 16 Sep 2010 23:01:35 +0200	[thread overview]
Message-ID: <87pqwdbdxs.fsf@gmx.de> (raw)
In-Reply-To: <83zkvh1m4j.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Sep 2010 22:14:52 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Thu, 16 Sep 2010 20:38:32 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: emacs-devel@gnu.org
>> 
>> Is this supposed to work:
>> 
>>  (setq display-time-mail-file "/plink:eliz@fencepost.gnu.org:/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.



  reply	other threads:[~2010-09-16 21:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16 18:38 Remote display-time-mail-file Eli Zaretskii
2010-09-16 20:14 ` Eli Zaretskii
2010-09-16 21:01   ` Michael Albinus [this message]
2010-09-17 11:48     ` Eli Zaretskii
2010-09-17 13:11       ` Michael Albinus
2010-09-17 15:37         ` Stefan Monnier
2010-09-17 20:26           ` Michael Albinus
2010-09-17 20:59             ` Michael Albinus
2010-09-17 21:43               ` Eli Zaretskii
2010-09-18  6:47                 ` Michael Albinus
2010-09-18  9:00                 ` Stefan Monnier
2010-09-18  9:06                   ` Michael Albinus
2010-09-18  9:08                   ` Eli Zaretskii
2010-09-18 10:49                     ` Michael Albinus
2010-09-30 13:07                     ` Michael Albinus
2010-09-30 13:29                       ` Eli Zaretskii
2010-09-30 14:01                         ` Michael Albinus

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=87pqwdbdxs.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.