From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: *vc-diff* buffers are read-only, but M-k works Date: Wed, 4 Mar 2009 16:54:46 +0100 Message-ID: References: <87k575jnwl.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1236182122 16095 80.91.229.12 (4 Mar 2009 15:55:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Mar 2009 15:55:22 +0000 (UTC) Cc: David Reitter , 2553@emacsbugs.donarmstrong.com, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 04 16:56:37 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LetSI-0007wJ-2u for ged-emacs-devel@m.gmane.org; Wed, 04 Mar 2009 16:56:22 +0100 Original-Received: from localhost ([127.0.0.1]:37611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LetQw-0004w6-Pe for ged-emacs-devel@m.gmane.org; Wed, 04 Mar 2009 10:54:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LetQp-0004u2-AA for emacs-devel@gnu.org; Wed, 04 Mar 2009 10:54:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LetQm-0004qP-T8 for emacs-devel@gnu.org; Wed, 04 Mar 2009 10:54:50 -0500 Original-Received: from [199.232.76.173] (port=48141 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LetQm-0004qD-Gc for emacs-devel@gnu.org; Wed, 04 Mar 2009 10:54:48 -0500 Original-Received: from nf-out-0910.google.com ([64.233.182.185]:64053) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LetQl-0000yT-Nb for emacs-devel@gnu.org; Wed, 04 Mar 2009 10:54:47 -0500 Original-Received: by nf-out-0910.google.com with SMTP id b11so450430nfh.26 for ; Wed, 04 Mar 2009 07:54:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Fl6D34FN1mniRam0+fpZ2oagbHg32T2oNsAnU5Tck+w=; b=g+N/ciRtJz+mTBdt5cdp3KdDiPMApoXIvEUwnvgROWgLPokakw+g4ndmzs0H/XpANk dcbASHXEKOFSE89x9V9FpUbgwoJvX8O+5bx4K57KVoQvYkUHJORSIupSOUd0XxDk3AHB 0nt/pH5RQ1mYgUkx7oXYZ2xlxUiB/k59tuwM4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=f+Jqdn6VdAVfQKjD764DjxMa62FrZ7ELwGbleQm8lG1tNiAnXEjpjQMo8glnbVGQ8c jIMeoNSp+HPeTuGa6tsVvhWHghmy7qlwCEyinICMrwmk0gIYNZTV2HDBi9nZo1B83Nvd LcOL8tzQrKKLG1gpprw08+5PBVYVSRrcyVUec= Original-Received: by 10.210.112.4 with SMTP id k4mr5098213ebc.5.1236182086793; Wed, 04 Mar 2009 07:54:46 -0800 (PST) In-Reply-To: <87k575jnwl.fsf@cyd.mit.edu> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109447 Archived-At: On Wed, Mar 4, 2009 at 16:41, Chong Yidong wrote: >=C2=A0However, 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. =C2=A0Any thoughts? Most operations on diff-mode buffers do not change the buffer or are easily reversible (diff-reverse-direction, diff-unified->context, etc.). Making the buffer read-write is a C-x C-q away, if the user needs to use undo or normal editing commands. What is a bit of a pain is that the user cannot easily setup vc-diff to default to a read-write buffer, because there's no vc-diff-hook and `(setq buffer-read-only t)' is done after calling diff-mode, so diff-mode-hook isn't useful either. The only way right now (other than modifying the source) is to advise vc-diff. My 0.02=E2=82=AC Juanma