From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: occur-hook changing the current buffer Date: Tue, 21 Jun 2005 23:40:49 -0400 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1119413082 29805 80.91.229.2 (22 Jun 2005 04:04:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Jun 2005 04:04:42 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 22 06:04:32 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DkwTU-0005b0-HG for ged-emacs-devel@m.gmane.org; Wed, 22 Jun 2005 06:04:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dkwa2-0001zc-NB for ged-emacs-devel@m.gmane.org; Wed, 22 Jun 2005 00:11:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DkwPO-00062j-AX for emacs-devel@gnu.org; Wed, 22 Jun 2005 00:00:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DkwPC-0005xW-Om for emacs-devel@gnu.org; Wed, 22 Jun 2005 00:00:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DkwPB-0005nz-CU for emacs-devel@gnu.org; Wed, 22 Jun 2005 00:00:01 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DkwAO-0002ez-9Q for emacs-devel@gnu.org; Tue, 21 Jun 2005 23:44:44 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1Dkw6b-0005U4-NA; Tue, 21 Jun 2005 23:40:49 -0400 Original-To: Juanma Barranquero In-reply-to: (message from Juanma Barranquero on Tue, 21 Jun 2005 04:00:39 +0200) 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:39275 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39275 Now, I can easily change my function to do the right thing, but I still feel that `occur-1' should be fixed by using `save-current-buffer' around the call to "(run-hooks 'occur-hook). The rationale being that setting the modified flag to nil on the wrong buffer can lead to data loss. You may as well install the patch. It can't hurt, and it can prevent confusion.