From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: auto-revert-mode
Date: Wed, 15 Sep 2010 12:31:11 +0200 [thread overview]
Message-ID: <87vd672t8p.fsf@fh-trier.de> (raw)
In-Reply-To: jwvhbhrpfym.fsf-monnier+gnu.emacs.help@gnu.org
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>> (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.
>>>>
>>>
>>> Here is another solution:
>>>
>>> (add-to-list 'auto-mode-alist
>>> '("\\.foo\\'" (lambda () (auto-revert-mode 1)) t))
>
> In Emacs-24 you'll be able to just say
>
> (add-to-list 'auto-mode-alist '("\\.foo\\'" auto-revert-mode t))
>
>> With the sideeffect of inhibiting the proper major-mode for .foo files.
>> Maybe this calls for another variable `auto-minor-mode-alist'.
>
> No, the t he put at the end tells Emacs to keep looking for a major mode
But with the extension removed. At least that's how the 3rd value is
explained in the documentation.
-ap
next prev parent reply other threads:[~2010-09-15 10:31 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 ` auto-revert-mode Oleksandr Gavenko
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 ` Andreas Politz [this message]
[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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vd672t8p.fsf@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.