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#2553: *vc-diff* buffers are read-only, but M-k works Date: Mon, 12 Sep 2011 21:26:03 -0400 Message-ID: References: <87k575jnwl.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1315877209 21258 80.91.229.12 (13 Sep 2011 01:26:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Sep 2011 01:26:49 +0000 (UTC) Cc: 2553@debbugs.gnu.org, Chong Yidong , David Reitter , emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 13 03:26:44 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R3Hlq-0007yW-R5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Sep 2011 03:26:42 +0200 Original-Received: from localhost ([::1]:48555 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3Hlq-0002Mr-B9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Sep 2011 21:26:42 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3Hln-0002M3-6N for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 21:26:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3Hlm-0004qB-8U for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 21:26:39 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3Hlm-0004q7-3E for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 21:26:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R3Hq1-0003qH-R7; Mon, 12 Sep 2011 21:31: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: Tue, 13 Sep 2011 01:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 2553 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 2553-submit@debbugs.gnu.org id=B2553.131587743213751 (code B ref 2553); Tue, 13 Sep 2011 01:31:01 +0000 Original-Received: (at 2553) by debbugs.gnu.org; 13 Sep 2011 01:30:32 +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 1R3HpX-0003ZX-BP for submit@debbugs.gnu.org; Mon, 12 Sep 2011 21:30:31 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3HpV-0003XV-KJ for 2553@debbugs.gnu.org; Mon, 12 Sep 2011 21:30:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAK2wbk5FxK3+/2dsb2JhbABCp295gVIBAQQBViMFCws0EhQYDSQuh1y3e4ZuBKAzhEM X-IronPort-AV: E=Sophos;i="4.68,371,1312171200"; d="scan'208";a="135965474" Original-Received: from 69-196-173-254.dsl.teksavvy.com (HELO ceviche.home) ([69.196.173.254]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 12 Sep 2011 21:26:03 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 4AA7C660B6; Mon, 12 Sep 2011 21:26:03 -0400 (EDT) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 11 Sep 2011 23:46:36 +0200") 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, 12 Sep 2011 21:31:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:51080 Archived-At: >> The purpose of making the vc-diff buffer read-only (2007-11-10 change to >> vc.el) was so that people can use the read-only diff-mode bindings like >> "k" and "p". However, it's counter-intuitive that undo does not work. >> Probably the easiest fix is to define a diff-undo command that lifts the >> read-only restriction temporarily. Any thoughts? > Perhaps a more general solution would be possible here. I think there > probably are other "mostly-read-only" modes where you have one or two > special commands that alter the buffer, anyway. Like with `M-k'. > Perhaps there could be a buffer-local variable like > `undo-read-only-buffer' that if set, would allow `undo' to work in these > cases. Or we could record in the buffer-undo-list the fact the the modification was done with inhibit-read-only bound to non-nil, and bind it similarly during the undo. Stefan