From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#6447: 23.1; revert-buffer in *vc-diff* Date: Sat, 19 Jun 2010 17:52:47 +0300 Organization: JURTA Message-ID: <871vc3hyl8.fsf@mail.jurta.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1276959541 18076 80.91.229.12 (19 Jun 2010 14:59:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 19 Jun 2010 14:59:01 +0000 (UTC) Cc: 6447@debbugs.gnu.org To: Tom Tromey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 19 16:58:59 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OPzVa-0008B9-PE for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Jun 2010 16:58:59 +0200 Original-Received: from localhost ([127.0.0.1]:36904 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPzVa-0000Yp-Cn for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Jun 2010 10:58:58 -0400 Original-Received: from [140.186.70.92] (port=59136 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPzVR-0000Wv-81 for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2010 10:58:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPzVP-0007K4-Uj for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2010 10:58:49 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35240) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPzVP-0007Jz-TD for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2010 10:58:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OPzSk-0006OC-35; Sat, 19 Jun 2010 10:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Jun 2010 14:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6447 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6447-submit@debbugs.gnu.org id=B6447.127695931824537 (code B ref 6447); Sat, 19 Jun 2010 14:56:02 +0000 Original-Received: (at 6447) by debbugs.gnu.org; 19 Jun 2010 14:55:18 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPzS0-0006Ne-Jd for submit@debbugs.gnu.org; Sat, 19 Jun 2010 10:55:16 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3] helo=mx1.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPzRy-0006NE-4f for 6447@debbugs.gnu.org; Sat, 19 Jun 2010 10:55:14 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.99.175.cable.starman.ee [82.131.99.175]) by mx1.starman.ee (Postfix) with ESMTP id 0C8403F4188; Sat, 19 Jun 2010 17:55:06 +0300 (EEST) In-Reply-To: (Tom Tromey's message of "Thu, 17 Jun 2010 11:14:28 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 19 Jun 2010 10:56:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37865 Archived-At: > I typed '=' in a *vc-dir* buffer to get a diff. > It would be nice if revert-buffer in the *vc-diff* buffer re-ran the > same diff command. Like the command `diff' after calling `diff-mode' sets `revert-buffer-function' to lambda with its function arguments, `vc-diff-internal' could do the same: === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2010-06-11 19:09:57 +0000 +++ lisp/vc/vc.el 2010-06-19 14:51:14 +0000 @@ -1547,6 +1547,9 @@ (defun vc-diff-internal (async vc-filese (message "%s" (cdr messages)) nil) (diff-mode) + (set (make-local-variable 'revert-buffer-function) + `(lambda (ignore-auto noconfirm) + (vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose))) ;; Make the *vc-diff* buffer read only, the diff-mode key ;; bindings are nicer for read only buffers. pcl-cvs does the ;; same thing. -- Juri Linkov http://www.jurta.org/emacs/