From: seberino@spawar.navy.mil (Christian Seberino)
Subject: Re: How make vc-diff and vc-revert-buffer NOT ask to save files but do it automatically?
Date: 30 Sep 2003 17:08:03 -0700 [thread overview]
Message-ID: <bf23f78f.0309301608.64a89ddf@posting.google.com> (raw)
In-Reply-To: 3F748888.7060101@yahoo.com
Kevin
Thanks! With your help I got vc-diff and vc-revert-buffer to NOT ask
me if I want to save buffer because it is now done automatically.
Can I please ask you how to avoid 1 more question in
vc-revert-buffer???
vc-revert-buffer seems to do a vc-diff command and then asks
a SECOND question something like... "Are you *sure* you want
to discard these changes?"
How hardcode answer to this SECOND question to be yes???
I read the emacs online doc on vc-revert-buffer like you suggested
but it had no clues. Here it is:
vc-revert-buffer is an interactive autoloaded Lisp function in `vc'.
It is bound to <menu-bar> <tools> <vc> <vc-revert-buffer>.
(vc-revert-buffer)
Revert the current buffer's file to the version it was based on.
This asks for confirmation if the buffer contents are not identical
to that version. This function does not automatically pick up newer
changes found in the master file; use M-x universal-argument M-x
vc-next-action to do so.
Any help greatly appreciated.
Chris
Kevin Rodgers <ihs_4664@yahoo.com> wrote in message news:<3F748888.7060101@yahoo.com>...
> Christian Seberino wrote:
>
> > I tried to wrap your code into my vc-diff wrapper and got an error message...
> >
> > (defun cs-vc-diff() (interactive)
> > (let ((unread-command-events '(?y ?e ?s)))
> > (vc-diff)) ; (call-interactively 'vc-diff)?
> > )
> >
> > Here is the error message...
> >
> > let: Wrong number of arguments: #[(historic &optional not-urgent)
> > ....etc.
>
> Why do you refuse to type `C-h f vc-diff'?
>
> | vc-diff is an interactive compiled Lisp function in `vc'.
> | (vc-diff HISTORIC &optional NOT-URGENT)
> |
> | Display diffs between file versions.
> | Normally this compares the current file and buffer with the most
> | recent checked in version of that file. This uses no arguments. With
> | a prefix argument HISTORIC, it reads the file name to use and two
> | version designators specifying which versions to compare. The
> | optional argument NOT-URGENT non-nil means it is ok to say no to
> | saving the buffer.
>
> So you probably want to run (vc-diff nil).
next prev parent reply other threads:[~2003-10-01 0:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-23 20:35 How make vc-diff and vc-revert-buffer NOT ask to save files but do it automatically? Christian Seberino
2003-09-23 21:10 ` Stefan Monnier
2003-09-23 22:08 ` Kevin Rodgers
2003-09-24 23:50 ` Christian Seberino
2003-09-25 15:27 ` Kevin Rodgers
2003-09-25 23:32 ` Christian Seberino
2003-09-26 18:42 ` Kevin Rodgers
2003-10-01 0:08 ` Christian Seberino [this message]
2003-10-01 0:24 ` Stefan Monnier
2003-10-01 14:58 ` Kevin Rodgers
2003-10-03 1:03 ` Christian Seberino
2003-10-03 8:51 ` Johan Bockgård
2003-10-06 22:44 ` Christian Seberino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf23f78f.0309301608.64a89ddf@posting.google.com \
--to=seberino@spawar.navy.mil \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).