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: Sat, 4 Jul 2009 19:16:19 -0400 Message-ID: <19023.58051.10608.629206@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> 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 1246749406 20306 80.91.229.12 (4 Jul 2009 23:16:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jul 2009 23:16:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 05 01:16:38 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 1MNETD-0006hm-5h for ged-emacs-devel@m.gmane.org; Sun, 05 Jul 2009 01:16:35 +0200 Original-Received: from localhost ([127.0.0.1]:45848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNETC-0003Fm-6H for ged-emacs-devel@m.gmane.org; Sat, 04 Jul 2009 19:16:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MNET7-0003Ck-52 for emacs-devel@gnu.org; Sat, 04 Jul 2009 19:16:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MNET2-00034v-80 for emacs-devel@gnu.org; Sat, 04 Jul 2009 19:16:28 -0400 Original-Received: from [199.232.76.173] (port=50709 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNET2-00034V-2X for emacs-devel@gnu.org; Sat, 04 Jul 2009 19:16:24 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:24176) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MNET1-0004oA-Qg for emacs-devel@gnu.org; Sat, 04 Jul 2009 19:16:23 -0400 Original-Received: from rgrjr.com ([216.146.47.5]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MNET0-00026e-NF for emacs-devel@gnu.org; Sat, 04 Jul 2009 19:16:22 -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 D05221600E7 for ; Sat, 4 Jul 2009 23:16:20 +0000 (UTC) Original-Received: (qmail 28318 invoked by uid 89); 4 Jul 2009 23:16:20 -0000 Original-Received: from unknown (HELO rgr.rgrjr.com) (192.168.57.1) by home with SMTP; 4 Jul 2009 23:16:20 -0000 Original-Received: by rgr.rgrjr.com (Postfix, from userid 500) id 8A4124862E; Sat, 4 Jul 2009 19:16:19 -0400 (EDT) In-Reply-To: X-Mailer: VM viewmail-600 under 23.1.50.1 (i686-pc-linux-gnu) X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:112024 Archived-At: From: "Drew Adams" Date: Fri, 3 Jul 2009 15:23:51 -0700 . . . Does `C-x k' warn you the way you would like, when you use it in a *shell* buffer? If not, then that is the problem, not something else. It does indeed kill the *shell* buffer without prompting, which seems odd, given that it prompts for modified files. I notice that this code uses the C equivalent of "(and (buffer-modified-p) (buffer-file-name))", though it queries only if interactive, so a case could be made for dropping the the "(buffer-file-name)" for symmetry. But I have never had the problem of invoking "C-x k" by accident (that I recall), so I'm not sure such a case ought to be made. . . . 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. But I am really curious to know why Richard changed this in rev 1.192 to the current (and (buffer-modified-p) (buffer-file-name)) behavior. Richard, do you remember? I know this is asking a lot . . . -- Bob