From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Confusion about first-change-hook Date: Tue, 18 Dec 2012 20:59:38 +0100 Message-ID: <878v8vi11x.fsf@engster.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1355860793 17162 80.91.229.3 (18 Dec 2012 19:59:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Dec 2012 19:59:53 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 18 21:00:08 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tl3Kg-00039b-1a for ged-emacs-devel@m.gmane.org; Tue, 18 Dec 2012 21:00:06 +0100 Original-Received: from localhost ([::1]:54315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tl3KS-0003fK-Le for ged-emacs-devel@m.gmane.org; Tue, 18 Dec 2012 14:59:52 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tl3KP-0003f0-2T for emacs-devel@gnu.org; Tue, 18 Dec 2012 14:59:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tl3KO-00086A-0y for emacs-devel@gnu.org; Tue, 18 Dec 2012 14:59:48 -0500 Original-Received: from randomsample.de ([83.169.19.17]:40618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tl3KN-00083y-Nh for emacs-devel@gnu.org; Tue, 18 Dec 2012 14:59:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=gr70eF7kl2GSB+zeL7R2oqMB93PhZ1AEkjr0cGS+C7k=; b=OngQ6TTPVQ0qlUrRlinZmfHIzATX0hynTjq+ryyNrqSqgqT1O5FM996Cquk6x5Vbe49dUcGFhLKbAHtoA4/Rzn7eF5VU7gPjm5H4mRyMFt4eUwrRC9c8/MaUq0TdJ/rC; Original-Received: from dslc-082-083-045-171.pools.arcor-ip.net ([82.83.45.171] helo=spaten) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Tl3KH-00011d-3E for emacs-devel@gnu.org; Tue, 18 Dec 2012 20:59:41 +0100 User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux) Mail-Followup-To: emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 83.169.19.17 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155659 Archived-At: I wanted to do something very simple: Activate whitespace-mode only when I start editing a buffer. So I looked into the manual and found `first-change-hook', which seemed exactly what I wanted. However, I soon saw that whitespace-mode got immediately activated in my C++ buffers. The reason is that changing a text property apparently already counts as "changing the buffer". Is this really the desired behavior? If so, what else is there to achieve the above? Should I file a wishlist-bug for something like 'buffer-modified-hook'? -David