From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: *vc-diff* buffers are read-only, but M-k works Date: Sun, 11 Sep 2011 23:46:36 +0200 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 1315778109 21890 80.91.229.12 (11 Sep 2011 21:55:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 11 Sep 2011 21:55:09 +0000 (UTC) Cc: 2553@debbugs.gnu.org, David Reitter , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 11 23:55:05 2011 Return-path: Envelope-to: ged-emacs-devel@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 1R2rzU-0000N6-5i for ged-emacs-devel@m.gmane.org; Sun, 11 Sep 2011 23:55:04 +0200 Original-Received: from localhost ([::1]:45030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2rzT-00048z-LP for ged-emacs-devel@m.gmane.org; Sun, 11 Sep 2011 17:55:03 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:42588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2rzQ-00048p-Os for emacs-devel@gnu.org; Sun, 11 Sep 2011 17:55:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R2rzP-0006LE-OO for emacs-devel@gnu.org; Sun, 11 Sep 2011 17:55:00 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:38968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2rzP-0006Ks-HA for emacs-devel@gnu.org; Sun, 11 Sep 2011 17:54:59 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R2rzH-0001x6-8j; Sun, 11 Sep 2011 23:54:51 +0200 In-Reply-To: <87k575jnwl.fsf@cyd.mit.edu> (Chong Yidong's message of "Wed, 04 Mar 2009 10:41:46 -0500") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Alasdair Roberts's _Spoils_: "So Bored Was I (Dark Triad)" X-MailScanner-ID: 1R2rzH-0001x6-8j MailScanner-NULL-Check: 1316382891.51326@ghv0xpd9GUmPmdSUEo1VfA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143901 Archived-At: Chong Yidong writes: > 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. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/