all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: eliz@gnu.org, emacs-devel@gnu.org
Subject: Re: autorevert.el
Date: Thu, 25 Mar 2004 00:49:18 -0600 (CST)	[thread overview]
Message-ID: <200403250649.i2P6nIH12878@raven.dms.auburn.edu> (raw)
In-Reply-To: <200403250620.i2P6KKE12816@raven.dms.auburn.edu> (message from Luc Teirlinck on Thu, 25 Mar 2004 00:20:20 -0600 (CST))

The following appears to be better than my original patch (stylistic
improvement, not bug fix):

===File ~/dired-diff========================================
diff -c /home/teirllm/dired.old.el /home/teirllm/emacscvsdir/emacs/lisp/dired.el
*** /home/teirllm/dired.old.el	Wed Mar 24 22:07:09 2004
--- /home/teirllm/emacscvsdir/emacs/lisp/dired.el	Thu Mar 25 00:39:40 2004
***************
*** 525,530 ****
--- 525,538 ----
        (setq dir-or-list dirname))
      (dired-internal-noselect dir-or-list switches)))
  
+ (defvar dired-directory-size nil
+   "Internal variable used by dired on certain operating systems.
+ On ms-dos, the value is the sum of all file lenghts in the directory.
+ On other operating systems, the value may have a different meaning
+ or be meaningless.")
+ 
+ (put 'dired-directory-size 'permanent-local t)
+ 
  ;; The following is an internal dired function.  It returns non-nil if
  ;; the directory visited by the current dired buffer has changed on
  ;; disk.  DIRNAME should be the directory name of that directory.
***************
*** 534,540 ****
  	 (or (eq modtime 0)
  	     (not (eq (car attributes) t))
  	     (and (= (car (nth 5 attributes)) (car modtime))
! 		  (= (nth 1 (nth 5 attributes)) (cdr modtime)))))))
  
  (defun dired-buffer-stale-p (&optional noconfirm)
    "Return non-nil if current dired buffer needs updating.
--- 542,552 ----
  	 (or (eq modtime 0)
  	     (not (eq (car attributes) t))
  	     (and (= (car (nth 5 attributes)) (car modtime))
! 		  (= (nth 1 (nth 5 attributes)) (cdr modtime))
! 		  (if (eq system-type 'ms-dos)
! 		      ;; This does not work perfectly.
! 		      (= dired-directory-size (nth 7 attributes))
! 		    t))))))
  
  (defun dired-buffer-stale-p (&optional noconfirm)
    "Return non-nil if current dired buffer needs updating.
***************
*** 678,685 ****
        (set (make-local-variable 'dired-subdir-alist) nil)
        (dired-build-subdir-alist)
        (let ((attributes (file-attributes dirname)))
! 	(if (eq (car attributes) t)
! 	    (set-visited-file-modtime (nth 5 attributes))))
        (set-buffer-modified-p nil)
        ;; No need to narrow since the whole buffer contains just
        ;; dired-readin's output, nothing else.  The hook can
--- 690,699 ----
        (set (make-local-variable 'dired-subdir-alist) nil)
        (dired-build-subdir-alist)
        (let ((attributes (file-attributes dirname)))
! 	(when (eq (car attributes) t)
! 	  (set-visited-file-modtime (nth 5 attributes))
! 	  (set (make-local-variable 'dired-directory-size)
! 	       (nth 7 attributes))))
        (set-buffer-modified-p nil)
        ;; No need to narrow since the whole buffer contains just
        ;; dired-readin's output, nothing else.  The hook can

Diff finished.  Thu Mar 25 00:40:04 2004
============================================================

  reply	other threads:[~2004-03-25  6:49 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-02 23:19 autorevert.el Luc Teirlinck
2004-03-03 13:24 ` autorevert.el Stefan Monnier
2004-03-04  5:08   ` autorevert.el Luc Teirlinck
2004-03-04 20:43     ` autorevert.el Stefan Monnier
2004-03-05  4:00       ` autorevert.el Luc Teirlinck
2004-03-13  3:10         ` autorevert.el Luc Teirlinck
2004-03-13 11:29           ` autorevert.el Kai Grossjohann
2004-03-14 23:15           ` autorevert.el Stefan Monnier
2004-03-15  0:08             ` autorevert.el Luc Teirlinck
2004-03-15  2:58               ` autorevert.el Stefan Monnier
2004-03-15  7:04               ` autorevert.el Eli Zaretskii
2004-03-16  4:56                 ` autorevert.el Luc Teirlinck
2004-03-16 19:40                   ` autorevert.el Eli Zaretskii
2004-03-19  4:48                     ` autorevert.el Luc Teirlinck
2004-03-19  6:06                       ` autorevert.el Stefan Monnier
2004-03-21  2:42                         ` autorevert.el Luc Teirlinck
2004-03-23 15:26                           ` autorevert.el Stefan Monnier
2004-03-24  4:20                             ` autorevert.el Luc Teirlinck
2004-03-24  4:25                               ` autorevert.el Luc Teirlinck
2004-03-21  4:19                         ` autorevert.el Luc Teirlinck
2004-03-19 10:19                     ` autorevert.el Kim F. Storm
2004-03-19 14:46                       ` autorevert.el Eli Zaretskii
2004-03-21  3:26                         ` autorevert.el Luc Teirlinck
2004-03-21  6:46                           ` autorevert.el Eli Zaretskii
2004-03-22  2:44                             ` autorevert.el Luc Teirlinck
2004-03-22  6:51                               ` autorevert.el Eli Zaretskii
2004-03-22 19:39                                 ` autorevert.el Luc Teirlinck
2004-03-23 19:40                                   ` autorevert.el Eli Zaretskii
2004-03-23 20:09                                     ` autorevert.el Stefan Monnier
2004-03-24  4:10                                     ` autorevert.el Luc Teirlinck
2004-03-24  6:58                                       ` autorevert.el Eli Zaretskii
2004-03-24 18:03                                         ` autorevert.el Stefan Monnier
2004-03-25  6:56                                           ` autorevert.el Eli Zaretskii
2004-03-25 17:01                                             ` autorevert.el Stefan Monnier
2004-03-24 18:56                                         ` autorevert.el Luc Teirlinck
2004-03-25  6:20                                         ` autorevert.el Luc Teirlinck
2004-03-25  6:49                                           ` Luc Teirlinck [this message]
2004-03-25  7:21                                           ` autorevert.el Eli Zaretskii
2004-03-22 19:47                                 ` autorevert.el Luc Teirlinck
2004-03-22 16:23                               ` autorevert.el Stefan Monnier
2004-03-23  4:24                                 ` autorevert.el Eli Zaretskii
2004-03-21 19:22                           ` autorevert.el Richard Stallman
2004-03-16  5:06                 ` autorevert.el Luc Teirlinck
2004-03-05  4:25       ` autorevert.el Luc Teirlinck
2004-03-05  5:55       ` autorevert.el Luc Teirlinck
2004-03-04  5:34   ` autorevert.el 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=200403250649.i2P6nIH12878@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --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.