* How to configure emacs to prompt for revert modified buffer at once it was modified
@ 2007-08-20 14:51 Dmitry Bolshakov
2007-08-20 17:46 ` Sean Sieger
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Bolshakov @ 2007-08-20 14:51 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 443 bytes --]
Hi All
Some windows editors do it on activate its window. They prompt about "file
was modified by external program, reload?" Emacs prompt only when I type
something in modified buffer, but I would like to see that buffer was
modified just now. Is it possible to configure emacs in this way?
This feature usually called "auto detection of externally modified files" or
something like this
With best regards
Dmitry Bolshakov
[-- Attachment #1.2: Type: text/html, Size: 2853 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to configure emacs to prompt for revert modified buffer at once it was modified
2007-08-20 14:51 How to configure emacs to prompt for revert modified buffer at once it was modified Dmitry Bolshakov
@ 2007-08-20 17:46 ` Sean Sieger
2007-08-21 15:02 ` J. David Boyd
[not found] ` <mailman.5052.1187708590.32220.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 5+ messages in thread
From: Sean Sieger @ 2007-08-20 17:46 UTC (permalink / raw)
To: help-gnu-emacs
"Dmitry Bolshakov" <dmitry.bolshakov@bridge-quest.com> writes:
but I would like to see that buffer was modified just now.
M-x revert-buffer ?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to configure emacs to prompt for revert modified buffer at once it was modified
2007-08-20 17:46 ` Sean Sieger
@ 2007-08-21 15:02 ` J. David Boyd
[not found] ` <mailman.5052.1187708590.32220.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 5+ messages in thread
From: J. David Boyd @ 2007-08-21 15:02 UTC (permalink / raw)
To: help-gnu-emacs
Sean Sieger writes:
> "Dmitry Bolshakov" writes:
>
> but I would like to see that buffer was modified just now.
>
>
> M-x revert-buffer ?
auto-revert-mode is an interactive autoloaded Lisp function in `autorevert'.
(auto-revert-mode &optional arg)
Toggle reverting buffer when file on disk changes.
With arg, turn Auto Revert mode on if and only if arg is positive.
This is a minor mode that affects only the current buffer.
Use `global-auto-revert-mode' to automatically revert all buffers.
Use `auto-revert-tail-mode' if you know that the file will only grow
without being changed in the part that is already in the buffer.
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <mailman.5052.1187708590.32220.help-gnu-emacs@gnu.org>]
* Re: How to configure emacs to prompt for revert modified buffer at once it was modified
[not found] ` <mailman.5052.1187708590.32220.help-gnu-emacs@gnu.org>
@ 2007-08-21 16:08 ` Thien-Thi Nguyen
0 siblings, 0 replies; 5+ messages in thread
From: Thien-Thi Nguyen @ 2007-08-21 16:08 UTC (permalink / raw)
To: help-gnu-emacs
() david@adboyd.com (J. David Boyd)
() Tue, 21 Aug 2007 11:02:39 -0400
auto-revert-mode
below are some functions i use to monitor the .c file produced by a
(cute but buggy) scheme->C compiler. a file visited this way is thus
protected against wanton kill-buffer commands (which fly from my fingers
regularly w/o conscious thought). one less thing to worry about. of
course, you need to explicitly `C-x C-q' at some point, either that or
crash the computer. (exiting emacs also works, but who does that?!)
thi
____________________________________________
(defun bury-if-read-only ()
"If buffer is writable, return t, otherwise bury it and return nil.
This function is intended to added to `kill-buffer-query-functions'."
(cond ((not buffer-read-only))
(t (message "(Burying %s -- make writable to really kill.)"
(buffer-name))
(bury-buffer)
nil)))
(defun watch-file-preciously (filename)
(interactive "fFilename: ")
(find-file-read-only filename)
(add-hook 'kill-buffer-query-functions 'bury-if-read-only nil t)
(auto-revert-mode 1))
(global-set-key "\C-x\M-f" 'watch-file-preciously)
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <mailman.5008.1187621515.32220.help-gnu-emacs@gnu.org>]
* Re: How to configure emacs to prompt for revert modified buffer at once it was modified
[not found] <mailman.5008.1187621515.32220.help-gnu-emacs@gnu.org>
@ 2007-08-20 15:50 ` aartist
0 siblings, 0 replies; 5+ messages in thread
From: aartist @ 2007-08-20 15:50 UTC (permalink / raw)
To: help-gnu-emacs
On Aug 20, 10:51 am, "Dmitry Bolshakov" <dmitry.bolsha...@bridge-
quest.com> wrote:
> Hi All
>
> Some windows editors do it on activate its window. They prompt about "file
> was modified by external program, reload?" Emacs prompt only when I type
> something in modified buffer, but I would like to see that buffer was
> modified just now. Is it possible to configure emacs in this way?
>
> This feature usually called "auto detection of externally modified files" or
> something like this
>
> With best regards
>
> Dmitry Bolshakov
Check if auto-revert-mode and global-auto-revert-mode is what you
want.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-08-21 16:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-20 14:51 How to configure emacs to prompt for revert modified buffer at once it was modified Dmitry Bolshakov
2007-08-20 17:46 ` Sean Sieger
2007-08-21 15:02 ` J. David Boyd
[not found] ` <mailman.5052.1187708590.32220.help-gnu-emacs@gnu.org>
2007-08-21 16:08 ` Thien-Thi Nguyen
[not found] <mailman.5008.1187621515.32220.help-gnu-emacs@gnu.org>
2007-08-20 15:50 ` aartist
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.