* How to refresh a buffer?
@ 2007-02-05 16:40 Vols
2007-02-05 16:55 ` HS
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Vols @ 2007-02-05 16:40 UTC (permalink / raw)
To: help-gnu-emacs
Hi, group,
I opened a file in Emacs and found it was read-only. I use the
terminal command "chmod +w file.cpp" to make it writable. After I
return to Emacs the file is still read-only. I have to close this file
and re-open it.
How to refresh this buffer? Thanks.
Vol
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to refresh a buffer?
2007-02-05 16:40 How to refresh a buffer? Vols
@ 2007-02-05 16:55 ` HS
2007-02-06 7:25 ` Piet van Oostrum
2007-02-05 17:08 ` Marc Tfardy
` (4 subsequent siblings)
5 siblings, 1 reply; 8+ messages in thread
From: HS @ 2007-02-05 16:55 UTC (permalink / raw)
To: help-gnu-emacs
Try this:
(defun reload-file ()
(interactive)
(find-file (buffer-name)))
You can also change if the BUFFER is read only with toggle-read-only.
If you find out a way of configuring emacs to tell you when a buffer
is modified, please tell me.
Cheers,
HS
On 5 fev, 13:40, "Vols" <volunte...@gmail.com> wrote:
> Hi, group,
>
> I opened a file in Emacs and found it was read-only. I use the
> terminal command "chmod +w file.cpp" to make it writable. After I
> return to Emacs the file is still read-only. I have to close this file
> and re-open it.
> How to refresh this buffer? Thanks.
>
> Vol
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to refresh a buffer?
2007-02-05 16:40 How to refresh a buffer? Vols
2007-02-05 16:55 ` HS
@ 2007-02-05 17:08 ` Marc Tfardy
2007-02-05 17:13 ` Pascal Bourguignon
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Marc Tfardy @ 2007-02-05 17:08 UTC (permalink / raw)
To: help-gnu-emacs
Vols schrieb:
> Hi, group,
>
> I opened a file in Emacs and found it was read-only. I use the
> terminal command "chmod +w file.cpp" to make it writable. After I
> return to Emacs the file is still read-only. I have to close this file
> and re-open it.
> How to refresh this buffer? Thanks.
M-x revert-buffer
regards
Marc
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to refresh a buffer?
2007-02-05 16:40 How to refresh a buffer? Vols
2007-02-05 16:55 ` HS
2007-02-05 17:08 ` Marc Tfardy
@ 2007-02-05 17:13 ` Pascal Bourguignon
2007-02-05 17:44 ` Drew Adams
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Pascal Bourguignon @ 2007-02-05 17:13 UTC (permalink / raw)
To: help-gnu-emacs
"Vols" <volunteers@gmail.com> writes:
> Hi, group,
>
> I opened a file in Emacs and found it was read-only. I use the
> terminal command "chmod +w file.cpp" to make it writable. After I
> return to Emacs the file is still read-only. I have to close this file
> and re-open it.
> How to refresh this buffer? Thanks.
M-x revert-buffer RET
--
__Pascal Bourguignon__ http://www.informatimago.com/
CONSUMER NOTICE: Because of the "uncertainty principle," it is
impossible for the consumer to simultaneously know both the precise
location and velocity of this product.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: How to refresh a buffer?
2007-02-05 16:40 How to refresh a buffer? Vols
` (2 preceding siblings ...)
2007-02-05 17:13 ` Pascal Bourguignon
@ 2007-02-05 17:44 ` Drew Adams
2007-02-05 18:41 ` David Hansen
2007-02-06 7:35 ` Mathias Dahl
5 siblings, 0 replies; 8+ messages in thread
From: Drew Adams @ 2007-02-05 17:44 UTC (permalink / raw)
To: Vols, help-gnu-emacs
> I opened a file in Emacs and found it was read-only. I use the
> terminal command "chmod +w file.cpp" to make it writable. After I
> return to Emacs the file is still read-only. I have to close this file
> and re-open it. How to refresh this buffer?
M-x revert-buffer
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to refresh a buffer?
2007-02-05 16:40 How to refresh a buffer? Vols
` (3 preceding siblings ...)
2007-02-05 17:44 ` Drew Adams
@ 2007-02-05 18:41 ` David Hansen
2007-02-06 7:35 ` Mathias Dahl
5 siblings, 0 replies; 8+ messages in thread
From: David Hansen @ 2007-02-05 18:41 UTC (permalink / raw)
To: help-gnu-emacs
On 5 Feb 2007 08:40:41 -0800 Vols wrote:
> I opened a file in Emacs and found it was read-only. I use the
> terminal command "chmod +w file.cpp" to make it writable. After I
> return to Emacs the file is still read-only. I have to close this file
> and re-open it.
> How to refresh this buffer? Thanks.
`toggle-read-only' C-x C-q is what you need. You don't need to chmod
the file then. Emacs will save it anyway (if it has the permission to
do so) after confirmation.
David
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to refresh a buffer?
2007-02-05 16:55 ` HS
@ 2007-02-06 7:25 ` Piet van Oostrum
0 siblings, 0 replies; 8+ messages in thread
From: Piet van Oostrum @ 2007-02-06 7:25 UTC (permalink / raw)
To: help-gnu-emacs
>>>>> "HS" <hugows@gmail.com> (H) wrote:
>H> Try this:
>H> (defun reload-file ()
>H> (interactive)
>H> (find-file (buffer-name)))
buffer-name => buffer-file-name (but revert-buffer is a better solution)
--
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet@vanoostrum.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to refresh a buffer?
2007-02-05 16:40 How to refresh a buffer? Vols
` (4 preceding siblings ...)
2007-02-05 18:41 ` David Hansen
@ 2007-02-06 7:35 ` Mathias Dahl
5 siblings, 0 replies; 8+ messages in thread
From: Mathias Dahl @ 2007-02-06 7:35 UTC (permalink / raw)
To: help-gnu-emacs
"Vols" <volunteers@gmail.com> writes:
> I opened a file in Emacs and found it was read-only. I use the
> terminal command "chmod +w file.cpp" to make it writable. After I
> return to Emacs the file is still read-only. I have to close this
> file and re-open it.
No need to close it. You can try C-x C-v, `find-alternate-file'. It
will prompt you for a new file but offer the current one, so you only
need to type RET to open it again.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-02-06 7:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-05 16:40 How to refresh a buffer? Vols
2007-02-05 16:55 ` HS
2007-02-06 7:25 ` Piet van Oostrum
2007-02-05 17:08 ` Marc Tfardy
2007-02-05 17:13 ` Pascal Bourguignon
2007-02-05 17:44 ` Drew Adams
2007-02-05 18:41 ` David Hansen
2007-02-06 7:35 ` 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).