unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* revert-buffer without question?
@ 2005-02-24 14:39 Toni K. Trampert
  2005-02-24 14:57 ` Phillip Lord
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Toni K. Trampert @ 2005-02-24 14:39 UTC (permalink / raw)



hi,

i would like to use the function

   revert-buffer

without the  compulsive question
 "Revert buffer from file /home/tkk/temp/test (yes or no)"

how?

best regards,

                       t

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

* Re: revert-buffer without question?
  2005-02-24 14:39 revert-buffer without question? Toni K. Trampert
@ 2005-02-24 14:57 ` Phillip Lord
  2005-02-24 20:28   ` Toni K. Trampert
  2005-02-25  0:43 ` Enila Nero
  2005-03-07  6:36 ` Kyle Lee
  2 siblings, 1 reply; 7+ messages in thread
From: Phillip Lord @ 2005-02-24 14:57 UTC (permalink / raw)


>>>>> "Toni" == Toni K Trampert <tkt@robber.de> writes:

  Toni> hi,

  Toni> i would like to use the function

  Toni>    revert-buffer

  Toni> without the compulsive question
  Toni>  "Revert buffer from file /home/tkk/temp/test (yes or no)"

  Toni> how?


M-x auto-revert-buffer may be what you want. Or you can set
`revert-without-query'. Or you could define a new function

(defun revert-buffer-noask()
    (interactive)
    (revert-buffer nil t))


should do it. 

Phil

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

* Re: revert-buffer without question?
  2005-02-24 14:57 ` Phillip Lord
@ 2005-02-24 20:28   ` Toni K. Trampert
  2005-02-24 22:57     ` August
  2005-02-24 23:03     ` Kevin Rodgers
  0 siblings, 2 replies; 7+ messages in thread
From: Toni K. Trampert @ 2005-02-24 20:28 UTC (permalink / raw)



> (defun revert-buffer-noask()
>     (interactive)
>     (revert-buffer nil t))
> 
> 
> should do it. 
> 


It does it.

What is the meaning of the "nil t" construction?

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

* Re: revert-buffer without question?
  2005-02-24 20:28   ` Toni K. Trampert
@ 2005-02-24 22:57     ` August
  2005-02-24 23:03     ` Kevin Rodgers
  1 sibling, 0 replies; 7+ messages in thread
From: August @ 2005-02-24 22:57 UTC (permalink / raw)


On tor, 2005-02-24 at 21:28 +0100, Toni K. Trampert wrote:
> > (defun revert-buffer-noask()
> >     (interactive)
> >     (revert-buffer nil t))
> > 
> > 
> > should do it. 
> > 
> 
> 
> It does it.
> 
> What is the meaning of the "nil t" construction?

C-h f revert-buffer

-- 
August

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

* Re: revert-buffer without question?
  2005-02-24 20:28   ` Toni K. Trampert
  2005-02-24 22:57     ` August
@ 2005-02-24 23:03     ` Kevin Rodgers
  1 sibling, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2005-02-24 23:03 UTC (permalink / raw)


Toni K. Trampert wrote:
 >Phillip Lord wrote:
 >>(defun revert-buffer-noask()
 >>    (interactive)
 >>    (revert-buffer nil t))
 >>
 >>should do it.
 >
 > It does it.
 >
 > What is the meaning of the "nil t" construction?

,----[ C-h f revert-buffer RET ]
| revert-buffer is an interactive compiled Lisp function in `files'.
| (revert-buffer &optional IGNORE-AUTO NOCONFIRM PRESERVE-MODES)
|
| Replace current buffer text with the text of the visited file on disk.
| This undoes all changes since the file was visited or saved.
| With a prefix argument, offer to revert from latest auto-save file, if
| that is more recent than the visited file.
|
| This command also works for special buffers that contain text which
| doesn't come from a file, but reflects some other data base instead:
| for example, Dired buffers and buffer-list buffers.  In these cases,
| it reconstructs the buffer contents from the appropriate data base.
|
| When called from Lisp, the first argument is IGNORE-AUTO; only offer
| to revert from the auto-save file when this is nil.  Note that the
| sense of this argument is the reverse of the prefix argument, for the
| sake of backward compatibility.  IGNORE-AUTO is optional, defaulting
| to nil.
|
| Optional second argument NOCONFIRM means don't ask for confirmation at
| all.  (The local variable `revert-without-query', if non-nil, prevents
| confirmation.)
|
| Optional third argument PRESERVE-MODES non-nil means don't alter
| the files modes.  Normally we reinitialize them using `normal-mode'.
|
| If the value of `revert-buffer-function' is non-nil, it is called to
| do all the work for this command.  Otherwise, the hooks
| `before-revert-hook' and `after-revert-hook' are run at the beginning
| and the end, and if `revert-buffer-insert-file-contents-function' is
| non-nil, it is called instead of rereading visited file contents.
`----

-- 
Kevin Rodgers

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

* Re: revert-buffer without question?
  2005-02-24 14:39 revert-buffer without question? Toni K. Trampert
  2005-02-24 14:57 ` Phillip Lord
@ 2005-02-25  0:43 ` Enila Nero
  2005-03-07  6:36 ` Kyle Lee
  2 siblings, 0 replies; 7+ messages in thread
From: Enila Nero @ 2005-02-25  0:43 UTC (permalink / raw)


"Toni K. Trampert" <tkt@robber.de> writes:

> hi,
>
> i would like to use the function
>
>    revert-buffer
>
> without the  compulsive question
>  "Revert buffer from file /home/tkk/temp/test (yes or no)"
>

Others have answered your question.  For my purposes this is a better
to revert-buffer alternative:

find-alternate-file

Normally bound to C-x C-v

EN

> how?
>
> best regards,
>
>                        t

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

* Re: revert-buffer without question?
  2005-02-24 14:39 revert-buffer without question? Toni K. Trampert
  2005-02-24 14:57 ` Phillip Lord
  2005-02-25  0:43 ` Enila Nero
@ 2005-03-07  6:36 ` Kyle Lee
  2 siblings, 0 replies; 7+ messages in thread
From: Kyle Lee @ 2005-03-07  6:36 UTC (permalink / raw)


C-h k revert-without-query RET
-- 
Kyle

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

end of thread, other threads:[~2005-03-07  6:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-24 14:39 revert-buffer without question? Toni K. Trampert
2005-02-24 14:57 ` Phillip Lord
2005-02-24 20:28   ` Toni K. Trampert
2005-02-24 22:57     ` August
2005-02-24 23:03     ` Kevin Rodgers
2005-02-25  0:43 ` Enila Nero
2005-03-07  6:36 ` Kyle Lee

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).