From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: eliz@elta.co.il, jari.aalto@poboxes.com, emacs-devel@gnu.org
Subject: Re: Problems with latest CVS.
Date: Tue, 17 Feb 2004 19:10:36 -0600 (CST) [thread overview]
Message-ID: <200402180110.i1I1Aa915133@raven.dms.auburn.edu> (raw)
In-Reply-To: <200402180059.i1I0xw015086@raven.dms.auburn.edu> (message from Luc Teirlinck on Tue, 17 Feb 2004 18:59:58 -0600 (CST))
Latest patch. (Deletes two more functions and adds to a docstring.
No other changes.) I could commit if desired.
===File ~/autorevert-newdiff================================
*** autorevert.el.~1.21.~ Mon Feb 16 20:04:45 2004
--- autorevert.el Tue Feb 17 18:25:15 2004
***************
*** 158,164 ****
When non-nil, both file buffers and buffers with a custom
`revert-buffer-function' are reverted by Global Auto-Revert Mode.
! Use this option with care since it could lead to excessive reverts."
:group 'auto-revert
:type 'boolean)
--- 158,169 ----
When non-nil, both file buffers and buffers with a custom
`revert-buffer-function' are reverted by Global Auto-Revert Mode.
! Use this option with care since it could lead to excessive reverts.
! Note also that for some non-file buffers the check whether the
! buffer needs updating may be imperfect, due to efficiency
! considerations, and may not take all information listed in the
! buffer into account. Hence, a non-nil value for this option does
! not necessarily make manual updates useless for non-file buffers."
:group 'auto-revert
:type 'boolean)
***************
*** 260,312 ****
(not (memq major-mode
global-auto-revert-ignore-modes)))))
- (defun auto-revert-list-diff (a b)
- "Check if strings in list A differ from list B."
- (when (and a b)
- (setq a (sort a 'string-lessp))
- (setq b (sort b 'string-lessp))
- (let (elt1 elt2)
- (catch 'break
- (while (and (setq elt1 (and a (pop a)))
- (setq elt2 (and b (pop b))))
- (if (not (string= elt1 elt2))
- (throw 'break t)))))))
-
- (defun auto-revert-dired-file-list ()
- "Return list of dired files."
- (let (file list)
- (save-excursion
- (goto-char (point-min))
- (while (not (eobp))
- (if (setq file (dired-get-filename t t))
- (push file list))
- (forward-line 1)))
- list))
-
- (defun auto-revert-dired-changed-p ()
- "Check if dired buffer has changed."
- (when (and (stringp dired-directory)
- ;; Exclude remote buffers, would be too slow for user
- ;; modem, timeouts, network lag ... all is possible
- (not (string-match "@" dired-directory))
- (file-directory-p dired-directory))
- (let ((files (directory-files dired-directory))
- (dired (auto-revert-dired-file-list)))
- (or (not (eq (length files) (length dired)))
- (auto-revert-list-diff files dired)))))
-
(defun auto-revert-buffer-p ()
"Check if current buffer should be reverted."
! ;; - Always include dired buffers to list. It would be too expensive
;; to test the "revert" status here each time timer launches.
- ;; - Same for VC buffers.
(or (and (eq major-mode 'dired-mode)
(or (and global-auto-revert-mode
global-auto-revert-non-file-buffers)
! auto-revert-mode))
! (and (not (buffer-modified-p))
(auto-revert-vc-buffer-p))
! (and (not (buffer-modified-p))
(if (buffer-file-name)
(and (file-readable-p (buffer-file-name))
(not (verify-visited-file-modtime (current-buffer))))
--- 265,296 ----
(not (memq major-mode
global-auto-revert-ignore-modes)))))
(defun auto-revert-buffer-p ()
"Check if current buffer should be reverted."
! ;; - Always include VC buffers to list. It would be too expensive
;; to test the "revert" status here each time timer launches.
(or (and (eq major-mode 'dired-mode)
(or (and global-auto-revert-mode
global-auto-revert-non-file-buffers)
! auto-revert-mode)
! (not (buffer-modified-p))
! (stringp dired-directory)
! ;; Exclude remote buffers, would be too slow for user
! ;; modem, timeouts, network lag ... all is possible
! (not (string-match "@" dired-directory))
! (file-directory-p dired-directory)
! (file-readable-p dired-directory)
! (not (let ((attributes (file-attributes dired-directory))
! (modtime (visited-file-modtime)))
! (or (eq modtime 0)
! (not (eq (car attributes) t))
! (and (= (car (nth 5 attributes)) (car modtime))
! (= (nth 1 (nth 5 attributes)) (cdr modtime)))))))
! (and (not (eq major-mode 'dired-mode))
! (not (buffer-modified-p))
(auto-revert-vc-buffer-p))
! (and (not (eq major-mode 'dired-mode))
! (not (buffer-modified-p))
(if (buffer-file-name)
(and (file-readable-p (buffer-file-name))
(not (verify-visited-file-modtime (current-buffer))))
***************
*** 375,382 ****
(cond
((eq major-mode 'dired-mode)
;; Dired includes revert-buffer-function
! (when (and revert-buffer-function
! (auto-revert-dired-changed-p))
(setq revert t)))
((auto-revert-vc-buffer-p)
(when (auto-revert-handler-vc)
--- 359,365 ----
(cond
((eq major-mode 'dired-mode)
;; Dired includes revert-buffer-function
! (when revert-buffer-function
(setq revert t)))
((auto-revert-vc-buffer-p)
(when (auto-revert-handler-vc)
============================================================
next prev parent reply other threads:[~2004-02-18 1:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-16 22:37 Problems with latest CVS Luc Teirlinck
2004-02-16 22:47 ` Luc Teirlinck
2004-02-16 22:55 ` Luc Teirlinck
2004-02-17 2:49 ` Luc Teirlinck
2004-02-17 3:31 ` Luc Teirlinck
2004-02-17 6:43 ` Eli Zaretskii
2004-02-17 16:47 ` Luc Teirlinck
2004-02-17 19:53 ` Luc Teirlinck
2004-02-18 0:08 ` Luc Teirlinck
2004-02-18 0:59 ` Luc Teirlinck
2004-02-18 1:10 ` Luc Teirlinck [this message]
2004-02-17 1:37 ` Kim F. Storm
2004-02-17 2:05 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200402180110.i1I1Aa915133@raven.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
--cc=eliz@elta.co.il \
--cc=emacs-devel@gnu.org \
--cc=jari.aalto@poboxes.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).