From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Rogers Newsgroups: gmane.emacs.devel Subject: RE: C-x C-v considered harmful Date: Sun, 5 Jul 2009 20:39:45 -0400 Message-ID: <19025.18385.166444.706321@rgr.rgrjr.com> References: <19020.2798.523236.406366@rgr.rgrjr.com> <72597301DECF498C8943373F597732A6@us.oracle.com> <19021.23100.86775.844823@rgr.rgrjr.com> <19022.27409.779079.636945@rgr.rgrjr.com> <19023.58051.10608.629206@rgr.rgrjr.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1246840831 9099 80.91.229.12 (6 Jul 2009 00:40:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Jul 2009 00:40:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 06 02:40:24 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 1MNcFs-0003Ws-Gs for ged-emacs-devel@m.gmane.org; Mon, 06 Jul 2009 02:40:24 +0200 Original-Received: from localhost ([127.0.0.1]:54862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNcFr-0007qE-Sq for ged-emacs-devel@m.gmane.org; Sun, 05 Jul 2009 20:40:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MNcFN-0007Oc-3l for emacs-devel@gnu.org; Sun, 05 Jul 2009 20:39:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MNcFI-0007OB-Dw for emacs-devel@gnu.org; Sun, 05 Jul 2009 20:39:52 -0400 Original-Received: from [199.232.76.173] (port=48929 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNcFI-0007O8-38 for emacs-devel@gnu.org; Sun, 05 Jul 2009 20:39:48 -0400 Original-Received: from rgrjr.com ([216.146.47.5]:35280) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MNcFH-0001mp-Dq for emacs-devel@gnu.org; Sun, 05 Jul 2009 20:39:47 -0400 Original-Received: from rgrjr.dyndns.org (c-66-30-196-77.hsd1.ma.comcast.net [66.30.196.77]) by rgrjr.com (Postfix on CentOS) with ESMTP id 9617F1600AA for ; Mon, 6 Jul 2009 00:39:46 +0000 (UTC) Original-Received: (qmail 22440 invoked by uid 89); 6 Jul 2009 00:39:46 -0000 Original-Received: from unknown (HELO rgr.rgrjr.com) (192.168.57.1) by home with SMTP; 6 Jul 2009 00:39:46 -0000 Original-Received: by rgr.rgrjr.com (Postfix, from userid 500) id 5BF334862E; Sun, 5 Jul 2009 20:39:45 -0400 (EDT) In-Reply-To: X-Mailer: VM viewmail-600 under 23.1.50.1 (i686-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:112057 Archived-At: From: "Drew Adams" Date: Sun, 5 Jul 2009 00:13:36 -0700 . . . > And as you mentioned, `find-alternate-file' tests `(and > (buffer-modified-p) (buffer-file-name))'. I agree with you that the > problem you are seeing is coming from `(buffer-file-name)' > being nil, and that removing that might be an improvement. > > As far as I am concerned, removing "(buffer-file-name)" would be > sufficient. We agree, modulo my wanting to be able to drop modified read-only buffers without warning. Another way to look at that is that those buffers typically do not have undo, which is another indication that we don't expect their contents to be something we want to worry about saving . . . That would be even better, isn't it? Absence of "undo" ought to be a more reliable indication of which buffers are considered unlikely to have state the user might regret trashing by accident. What do you think of querying only for modified buffers with undo enabled? I notice that this rule would query for Dired buffers, but only after the user has started marking files. And as soon as the user types "g", the (buffer-modified-p) flag is cleared again. This all strikes me as correct behavior. In any case, you have convinced me that "C-x k" and "C-x C-v" should have the same querying behavior. -- Bob