From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: wdired-change-to-wdired-mode needs a key binding in dired-mode Date: Wed, 25 Jul 2007 19:09:19 -0700 Message-ID: <200707260209.l6Q29JDL025423@oogie-boogie.ics.uci.edu> References: <200707240216.l6O2GiND022670@oogie-boogie.ics.uci.edu> <7dbe73ed0707232231w790d93f4o8b095a19bdc1757f@mail.gmail.com> <87bqe2493t.fsf@ambire.localdomain> <200707242306.l6ON6ZJ7019676@oogie-boogie.ics.uci.edu> <87y7h45hgv.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1185415934 9884 80.91.229.12 (26 Jul 2007 02:12:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Jul 2007 02:12:14 +0000 (UTC) Cc: Juri Linkov , mathias.dahl@gmail.com, ttn@gnuvola.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 26 04:12:11 2007 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 1IDspm-0001xk-S6 for ged-emacs-devel@m.gmane.org; Thu, 26 Jul 2007 04:12:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IDspm-0002PZ-BQ for ged-emacs-devel@m.gmane.org; Wed, 25 Jul 2007 22:12:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IDspi-0002PH-NH for emacs-devel@gnu.org; Wed, 25 Jul 2007 22:12:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IDsph-0002P5-9v for emacs-devel@gnu.org; Wed, 25 Jul 2007 22:12:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IDsph-0002P2-2v for emacs-devel@gnu.org; Wed, 25 Jul 2007 22:12:05 -0400 Original-Received: from oogie-boogie.ics.uci.edu ([128.195.1.41]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IDspg-00017w-Mr for emacs-devel@gnu.org; Wed, 25 Jul 2007 22:12:04 -0400 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by oogie-boogie.ics.uci.edu (8.13.6/8.13.6) with ESMTP id l6Q29JDL025423; Wed, 25 Jul 2007 19:09:20 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Wed\, 25 Jul 2007 20\:44\:42 -0400") Original-Lines: 27 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.84, required 5, autolearn=disabled, ALL_TRUSTED -1.44, J_CHICKENPOX_62 0.60) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: Solaris 9 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:75546 Archived-At: Stefan Monnier writes: > > I think `C-x C-q' is a good key binding, but it has one problem. > > For users who have a habit typing `C-x C-q' repeatedly to switch > > between editable and read-only states, typing `C-x C-q' in wdired mode > > will put the dired buffer into the confusing state: the mode line still > > says "Editable Dired", but the buffer is read-only now. Users who don't > > notice %%-characters in the mode line might have a hard time finding > > out what happened. > > Yes, there needs to be a bit more work to make the C-x C-q binding > work correctly. That's why I didn't add the binding when I originally > installed the wdired.el code. > > Now that the binding is added, let's fix the problem. Just so there's not confusion: the problem with the effects of C-x C-q in wdired more existed before the new key bindings was added. Now, what should C-x C-q do in wdired mode? How about this: if not buffer-modified-p switch back to dired-mode else print a warning that the user needs to either save her changes or cancel them