all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Always reread some files
@ 2002-11-29 12:35 arthur.chereau
  0 siblings, 0 replies; 6+ messages in thread
From: arthur.chereau @ 2002-11-29 12:35 UTC (permalink / raw)


Hi,

I would like emacs not to ask "File ... changed on disk. Reread from disk ?" for some
files (*.log files): I always want to reread those files. I saw that it may be related
to verify-visited-file-modtime and making certain file names "magic", but I don't
understand how to do this. Could you help me please ?

------------------------------------------

Faites un voeu et puis Voila ! www.voila.fr

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Always reread some files
@ 2002-11-29 12:48 Victor Kirk
  0 siblings, 0 replies; 6+ messages in thread
From: Victor Kirk @ 2002-11-29 12:48 UTC (permalink / raw)


> I always want to reread those files.

auto-revert-mode

Vic
--
This message, including attachments, is intended only for the use by the
person(s) to whom it is addressed. It may contain information which is
privileged and confidential. Copying or use by anybody else is not
authorised. If you are not the intended recipient, please contact the sender
as soon as possible. The views expressed in this communication may not
necessarily be the views held by Serco Integrated Transport.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Always reread some files
@ 2002-11-29 14:25 arthur.chereau
  2002-11-29 15:42 ` Frédéric Bothamy
       [not found] ` <mailman.1038584611.10208.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: arthur.chereau @ 2002-11-29 14:25 UTC (permalink / raw)
  Cc: help-gnu-emacs

> > I always want to reread those files.
>
> auto-revert-mode
>

Unfortunately this doesn't work because the *.log files buffers are opened immediately after their modification, that is:
- I compile
- a .log file is created
- I open the .log file
- I recompile
- the .log file is modified
- I open the .log file buffer (immediately, so auto-revert is too slow for that)
- Emacs asks me if it should reread the .log file
- auto-revert reverts the file, but it's too late

That's why I would like to disable the revert question for all *.log files.

------------------------------------------

Faites un voeu et puis Voila ! www.voila.fr

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Always reread some files
  2002-11-29 14:25 arthur.chereau
@ 2002-11-29 15:42 ` Frédéric Bothamy
       [not found] ` <mailman.1038584611.10208.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Frédéric Bothamy @ 2002-11-29 15:42 UTC (permalink / raw)


* arthur.chereau <arthur.chereau@voila.fr> [2002-11-29 15:25] :
> > > I always want to reread those files.
> >
> > auto-revert-mode
> >
> 
> Unfortunately this doesn't work because the *.log files buffers are opened immediately after their modification, that is:
> - I compile
> - a .log file is created
> - I open the .log file
> - I recompile
> - the .log file is modified
> - I open the .log file buffer (immediately, so auto-revert is too slow for that)
> - Emacs asks me if it should reread the .log file
> - auto-revert reverts the file, but it's too late
> 
> That's why I would like to disable the revert question for all *.log files.

Maybe use the variable revert-without-query using a regexp like this :
".+\.log$" and set a lower auto-revert-interval (5 by default).

Fred

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Always reread some files
       [not found] <mailman.1038580049.4328.help-gnu-emacs@gnu.org>
@ 2002-12-02 22:20 ` Kevin Rodgers
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2002-12-02 22:20 UTC (permalink / raw)


arthur.chereau wrote:

>>>I always want to reread those files.
>>>
>>auto-revert-mode
>>
>>
> 
> Unfortunately this doesn't work because the *.log files buffers are opened immediately after their modification, that is:
> - I compile
> - a .log file is created
> - I open the .log file
> - I recompile
> - the .log file is modified
> - I open the .log file buffer (immediately, so auto-revert is too slow for that)


(setq auto-revert-interval 1)	; does 0.5 work, Speedy?


> - Emacs asks me if it should reread the .log file
> - auto-revert reverts the file, but it's too late
> 
> That's why I would like to disable the revert question for all *.log files.


-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Always reread some files
       [not found] ` <mailman.1038584611.10208.help-gnu-emacs@gnu.org>
@ 2002-12-02 22:26   ` Kevin Rodgers
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2002-12-02 22:26 UTC (permalink / raw)


Frédéric Bothamy wrote:

> * arthur.chereau <arthur.chereau@voila.fr> [2002-11-29 15:25] :
> 
>>>>I always want to reread those files.
>>>>
>>>auto-revert-mode
>>>
>>>
>>Unfortunately this doesn't work because the *.log files buffers are opened immediately after their modification, that is:
>>- I compile
>>- a .log file is created
>>- I open the .log file
>>- I recompile
>>- the .log file is modified
>>- I open the .log file buffer (immediately, so auto-revert is too slow for that)
>>- Emacs asks me if it should reread the .log file
>>- auto-revert reverts the file, but it's too late
>>
>>That's why I would like to disable the revert question for all *.log files.
>>
> 
> Maybe use the variable revert-without-query using a regexp like this :
> ".+\.log$" and set a lower auto-revert-interval (5 by default).


Or perhaps:

;; Warning: Untested!
(defadvice revert-buffer (before yes activate)
   "Always revert buffers visiting *.log files (without querying)."
   (if (and buffer-file-name (string-match "\\.log\\'" buffer-file-name))
       (setq unread-command-events '(?y ?e ?s ?\r))))

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-12-02 22:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-29 12:35 Always reread some files arthur.chereau
  -- strict thread matches above, loose matches on Subject: below --
2002-11-29 12:48 Victor Kirk
2002-11-29 14:25 arthur.chereau
2002-11-29 15:42 ` Frédéric Bothamy
     [not found] ` <mailman.1038584611.10208.help-gnu-emacs@gnu.org>
2002-12-02 22:26   ` Kevin Rodgers
     [not found] <mailman.1038580049.4328.help-gnu-emacs@gnu.org>
2002-12-02 22:20 ` Kevin Rodgers

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.