all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: automatic dired update
Date: Tue, 06 Jan 2009 17:47:49 +0100	[thread overview]
Message-ID: <1231260534.515816@arno.fh-trier.de> (raw)
In-Reply-To: <1231150601.751645@arno.fh-trier.de>


d_zman@hotmail.com wrote:
 > If I add this to my lisp scripts called out in .emacs it doesn't
 > work.  If I load your lisp script by itself, it does.  How can I have
 > it load with my other lisp scipts, is there line I can add to
 > my .emacs file?
 >

I don't know why it's not working, but as someone mentioned in this
thread I was reinventing wheels. Use auto-revert-mode instead :

(add-to-list 'dired-mode-hook 'auto-revert-mode)

-ap

 >> (defun maybe-revert-dired-buffers ()
 >>    (walk-windows
 >>     #'(lambda (win)
 >>         (with-selected-window win
 >>           (when (eq major-mode 'dired-mode)
 >>             (let ((mod (gethash default-directory dired-file-modification-hash)))
 >>               (unless (and mod
 >>                            (equal mod (nth 5 (file-attributes default-directory))))
 >>                 (setq mod (nth 5 (file-attributes default-directory)))
 >>                 (puthash default-directory mod dired-file-modification-hash)
 >>                 (dired-revert))))))
 >>     'no-mini 'all-frames))
 >>
 >> (run-with-idle-timer 1 t 'maybe-revert-dired-buffers)
 >>
 >> This is polling the filesystem, plus I don't know if it is working
 >> on win32.
 >>
 >> -ap- Hide quoted text -
 >>
 >> - Show quoted text -
 >
 >



  reply	other threads:[~2009-01-06 16:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <91299a37-5cd2-4b3e-a7c3-381bdf7f69a5@q30g2000prq.googlegroups.com>
     [not found] ` <90548140-00a8-44f8-b8f0-6b4530f49933@v39g2000pro.googlegroups.com>
     [not found]   ` <ddd5bee8-c0ca-4cf6-8234-72ae447a362d@s1g2000prg.googlegroups.com>
2009-01-04 21:05     ` automatic dired update Xah Lee
2009-01-05  1:56       ` Drew Adams
2009-01-05  9:40         ` Paul R
2009-01-05 15:43           ` Drew Adams
     [not found]         ` <mailman.3996.1231148453.26697.help-gnu-emacs@gnu.org>
2009-01-05 10:15           ` Andreas Politz
2009-01-06 16:47             ` Andreas Politz [this message]
2009-01-06 22:27               ` Peter Dyballa
     [not found]               ` <mailman.4171.1231280855.26697.help-gnu-emacs@gnu.org>
2009-01-07  8:47                 ` Andreas Politz
2009-01-05 12:53       ` Michael Heerdegen

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=1231260534.515816@arno.fh-trier.de \
    --to=politza@fh-trier.de \
    --cc=help-gnu-emacs@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.