From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#360: whitespace.el: auto-cleanup on kill prevents killing read-only buffers Date: Thu, 05 Jun 2008 00:26:11 -0400 Message-ID: References: Reply-To: Stefan Monnier , 360@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1212641247 27183 80.91.229.12 (5 Jun 2008 04:47:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Jun 2008 04:47:27 +0000 (UTC) To: 360@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 05 06:48:08 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K47OP-0004wM-BJ for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Jun 2008 06:48:05 +0200 Original-Received: from localhost ([127.0.0.1]:37354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K47Nc-0001XP-H8 for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Jun 2008 00:47:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K47NW-0001V4-JO for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2008 00:47:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K47NU-0001QE-2j for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2008 00:47:09 -0400 Original-Received: from [199.232.76.173] (port=42890 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K47NT-0001Q1-RW for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2008 00:47:07 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:36652) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K47NT-0001XN-Du for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2008 00:47:07 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m554l5eD016588; Wed, 4 Jun 2008 21:47:05 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m554Z3bc013143; Wed, 4 Jun 2008 21:35:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 05 Jun 2008 04:35:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 360 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 360-submit@emacsbugs.donarmstrong.com id=B360.121263997611888 (code B ref 360); Thu, 05 Jun 2008 04:35:03 +0000 Original-Received: (at 360) by emacsbugs.donarmstrong.com; 5 Jun 2008 04:26:16 +0000 Original-Received: from ceviche.home (206-248-132-168.dsl.teksavvy.com [206.248.132.168]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m554QBMV011882 for <360@emacsbugs.donarmstrong.com>; Wed, 4 Jun 2008 21:26:13 -0700 Original-Received: by ceviche.home (Postfix, from userid 20848) id 7C414B4023; Thu, 5 Jun 2008 00:26:11 -0400 (EDT) In-Reply-To: (Reuben Thomas's message of "Wed, 4 Jun 2008 15:52:19 +0100 (BST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Thu, 05 Jun 2008 00:47:09 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:18257 Archived-At: >> I have whitespace-global-mode on and have it set to auto-cleanup on >> kill. This stops read-only buffers from being killed, as auto-cleanup >> tries to clean them up, gets an error, and aborts the kill. >> >> The old whitespace mode used to check to see if it was being called in >> a read-only buffer, and didn't try to clean up under those circumstances. >> >> I'm using Emacs 23.0.60.1, but as far as I can tell the problem still >> exists in CVS head. > This problem can be fixed by wrapping the body of whitespace-clean in > (unless buffer-read-only). I don't know if that fix has problems, but it at > least works for me. That would probably fix the problem, but now I wonder: why on earth would someone worry about whitespace when killing a buffer? Why would you want to strip whitespace just microseconds before throwing away this piece of data anyway? Stefan