From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: seberino@spawar.navy.mil (Christian Seberino) Newsgroups: gmane.emacs.help 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 Organization: http://groups.google.com Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3F70C451.6040603@yahoo.com> <3F748888.7060101@yahoo.com> NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1064967676 27069 80.91.224.253 (1 Oct 2003 00:21:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Oct 2003 00:21:16 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 01 02:21:15 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A4Ujy-0004nV-00 for ; Wed, 01 Oct 2003 02:21:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A4Ufd-0004I2-VH for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Sep 2003 20:16:45 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 60 Original-NNTP-Posting-Host: 198.253.72.211 Original-X-Trace: posting.google.com 1064966884 19153 127.0.0.1 (1 Oct 2003 00:08:04 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 1 Oct 2003 00:08:04 +0000 (UTC) Original-Xref: shelby.stanford.edu gnu.emacs.help:116979 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12906 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12906 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 . (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 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).