unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Oleksandr Gavenko <gavenko@bifit.com.ua>
To: help-gnu-emacs@gnu.org
Subject: Re: auto-revert-mode
Date: Tue, 14 Sep 2010 12:17:39 +0300	[thread overview]
Message-ID: <i6nej5$hae$1@dough.gmane.org> (raw)
In-Reply-To: <i6nbfj$2gu$1@dough.gmane.org>

On 14.09.2010 11:24, Gary wrote:
> I know I can use M-x auto-revert-mode to turn this on manually on a per
> buffer basis, but is there any way to do so for all files matching the
> pattern ".*\.foo" (for example)? I tried adding it to the mode hook
> related to "foo" files but it didn't work for some reason.
>

(add-to-list
  'find-file-hook
  (lambda nil
    (when (equal (file-name-extension (buffer-file-name)) "log")
        (auto-revert-mode 1) ;; or (auto-revert-tail-mode 1) !!
        )))

I don't know more efficient way to do this.




  parent reply	other threads:[~2010-09-14  9:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14  8:24 auto-revert-mode Gary
2010-09-14  9:06 ` auto-revert-mode Deniz Dogan
2010-09-14  9:35   ` auto-revert-mode Gary
2010-09-14  9:17 ` Oleksandr Gavenko [this message]
2010-09-14  9:49   ` auto-revert-mode Gary
2010-09-14 18:32   ` auto-revert-mode Thamer Mahmoud
2010-09-14 19:33     ` auto-revert-mode Oleksandr Gavenko
2010-09-14 22:54       ` auto-revert-mode Thamer Mahmoud
2010-09-15  5:00         ` auto-revert-mode Deniz Dogan
     [not found]   ` <mailman.3.1284489201.20547.help-gnu-emacs@gnu.org>
2010-09-14 19:23     ` auto-revert-mode Andreas Politz
2010-09-15  8:31       ` auto-revert-mode Stefan Monnier
2010-09-15 10:29         ` auto-revert-mode Andreas Politz
2010-09-15 10:31         ` auto-revert-mode Andreas Politz
     [not found] ` <mailman.5.1284455865.12957.help-gnu-emacs@gnu.org>
2010-09-14 14:39   ` auto-revert-mode Stefan Monnier

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='i6nej5$hae$1@dough.gmane.org' \
    --to=gavenko@bifit.com.ua \
    --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.
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).