From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6447: 23.1; revert-buffer in *vc-diff* Date: Mon, 02 Aug 2010 11:26:02 +0200 Message-ID: References: <871vc3hyl8.fsf@mail.jurta.org> <87631ekjpw.fsf@stupidchicken.com> <87y6e46r37.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280741900 2601 80.91.229.12 (2 Aug 2010 09:38:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2010 09:38:20 +0000 (UTC) Cc: 6447@debbugs.gnu.org To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 02 11:38:16 2010 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 1OfrTG-0005NO-CH for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 11:38:10 +0200 Original-Received: from localhost ([127.0.0.1]:33599 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfrTF-0001oO-PA for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 05:38:09 -0400 Original-Received: from [140.186.70.92] (port=59732 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfrT6-0001lI-7G for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 05:38:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfrT5-0002oi-3p for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 05:38:00 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57005) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfrT5-0002oe-1l for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 05:37:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OfrIT-0002Vb-Sr; Mon, 02 Aug 2010 05:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Aug 2010 09:27:01 +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.12807411669634 (code B ref 6447); Mon, 02 Aug 2010 09:27:01 +0000 Original-Received: (at 6447) by debbugs.gnu.org; 2 Aug 2010 09:26:06 +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 1OfrHa-0002VL-JP for submit@debbugs.gnu.org; Mon, 02 Aug 2010 05:26:06 -0400 Original-Received: from impaqm4.telefonica.net ([213.4.138.4]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfrHY-0002Uy-W9 for 6447@debbugs.gnu.org; Mon, 02 Aug 2010 05:26:05 -0400 Original-Received: from IMPmailhost6.adm.correo ([10.20.102.127]) by IMPaqm4.telefonica.net with bizsmtp id pJxf1e00b2kvMAa3QMS5kL; Mon, 02 Aug 2010 11:26:05 +0200 Original-Received: from ceviche.home ([83.61.38.247]) by IMPmailhost6.adm.correo with BIZ IMP id pMS31e0055KwfZf1mMS3HH; Mon, 02 Aug 2010 11:26:05 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id CDAD666125; Mon, 2 Aug 2010 11:26:02 +0200 (CEST) In-Reply-To: (Dan Nicolaescu's message of "Fri, 09 Jul 2010 16:51:54 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 02 Aug 2010 05:27:01 -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:39142 Archived-At: >>>> 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. >>> >>> Looks like a fine idea, please go ahead. >> >> Done. > It would be nice to also have revert-buffer bound to "g" in this case, > that would make this feature easier to use (and consistent with what > we do for other modes). Fine by me (tho only when the diff-mode buffer is read-only, of course, it would be rather awkward for editing otherwise). Stefan