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: bug#2553: *vc-diff* buffers are read-only, but M-k works Date: Thu, 06 Oct 2011 23:59:02 +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 1317938481 11158 80.91.229.12 (6 Oct 2011 22:01:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 6 Oct 2011 22:01:21 +0000 (UTC) Cc: 2553@debbugs.gnu.org, Chong Yidong , David Reitter , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 07 00:01:12 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 1RBw06-0007QU-Ay for ged-emacs-devel@m.gmane.org; Fri, 07 Oct 2011 00:01:10 +0200 Original-Received: from localhost ([::1]:48585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBw05-0007AP-IQ for ged-emacs-devel@m.gmane.org; Thu, 06 Oct 2011 18:01:09 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBw03-0007AJ-Ml for emacs-devel@gnu.org; Thu, 06 Oct 2011 18:01:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBw02-0000aB-Fr for emacs-devel@gnu.org; Thu, 06 Oct 2011 18:01:07 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:42822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBw02-0000a2-2l for emacs-devel@gnu.org; Thu, 06 Oct 2011 18:01:06 -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 1RBvzu-0002ix-MP; Fri, 07 Oct 2011 00:00:58 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 12 Sep 2011 21:26:03 -0400") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) X-Now-Playing: Clogs's _The Creatures in the Garden of Lady Walton_: "On the Edge" X-MailScanner-ID: 1RBvzu-0002ix-MP MailScanner-NULL-Check: 1318543258.87945@iZUGlOC9J5vJj7fkVO2Xlg 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:144649 Archived-At: Stefan Monnier writes: >> 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. That would be even better, and is even more general. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/