* How to update a file
@ 2006-03-14 11:33 billy
2006-03-14 15:04 ` Maarten Bergvelt
0 siblings, 1 reply; 5+ messages in thread
From: billy @ 2006-03-14 11:33 UTC (permalink / raw)
I know if I do the C-x C-f and give it the same name as the file I
already have opened it will ask me if I want to update. Is there a way
I can just tell emacs to update the file that is my focus?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to update a file
2006-03-14 11:33 How to update a file billy
@ 2006-03-14 15:04 ` Maarten Bergvelt
2006-03-14 15:50 ` billy
0 siblings, 1 reply; 5+ messages in thread
From: Maarten Bergvelt @ 2006-03-14 15:04 UTC (permalink / raw)
In article <1142335993.417659.34910@z34g2000cwc.googlegroups.com>,
billy
wrote:
> I know if I do the C-x C-f and give it the same name as the file I
> already have opened it will ask me if I want to update. Is there a way
> I can just tell emacs to update the file that is my focus?
C-c C-f does not behave for me that way: I don't get asked
anything. What do you mean update? Maybe you have configured C-x C-f
in a strange way: check with C-h k.
--
Maarten Bergvelt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to update a file
2006-03-14 15:04 ` Maarten Bergvelt
@ 2006-03-14 15:50 ` billy
2006-03-14 15:57 ` Gordon Beaton
0 siblings, 1 reply; 5+ messages in thread
From: billy @ 2006-03-14 15:50 UTC (permalink / raw)
by update I mean that I have the file open for viewing/editing.
In a shell I execute a script that recreates the file. It changes, but
if I dont reopen the file again I do not see the new version.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to update a file
2006-03-14 15:50 ` billy
@ 2006-03-14 15:57 ` Gordon Beaton
2006-03-15 16:04 ` Mathias Dahl
0 siblings, 1 reply; 5+ messages in thread
From: Gordon Beaton @ 2006-03-14 15:57 UTC (permalink / raw)
On 14 Mar 2006 07:50:06 -0800, billy wrote:
> by update I mean that I have the file open for viewing/editing.
> In a shell I execute a script that recreates the file. It changes, but
> if I dont reopen the file again I do not see the new version.
M-x revert-buffer
or
C-x C-v <enter>
I use the following with find-alternate-file so I don't have to hunt
for my position in the file afterward re-visiting it:
(defadvice find-alternate-file (around restore-point activate)
"Restore current position when re-visiting same file"
(let ((saved-point (point))
(saved-window-start (window-start))
(saved-filename buffer-file-name))
ad-do-it
(if (equal saved-filename buffer-file-name)
(progn (goto-char saved-point)
(set-window-start (selected-window) saved-window-start)))))
(suggestions for improvements are welcome)
/gordon
--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to update a file
2006-03-14 15:57 ` Gordon Beaton
@ 2006-03-15 16:04 ` Mathias Dahl
0 siblings, 0 replies; 5+ messages in thread
From: Mathias Dahl @ 2006-03-15 16:04 UTC (permalink / raw)
Gordon Beaton <n.o.t@for.email> writes:
> M-x revert-buffer
> or
> C-x C-v <enter>
Or enable auto-revert-mode.
/Mathias
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-03-15 16:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-14 11:33 How to update a file billy
2006-03-14 15:04 ` Maarten Bergvelt
2006-03-14 15:50 ` billy
2006-03-14 15:57 ` Gordon Beaton
2006-03-15 16:04 ` Mathias Dahl
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).