From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: occur-hook changing the current buffer Date: Tue, 21 Jun 2005 23:34:09 -0400 Message-ID: <87slzbqd6r.fsf-monnier+emacs@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1119413012 29684 80.91.229.2 (22 Jun 2005 04:03:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Jun 2005 04:03:32 +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:03:30 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DkwS8-0005Kz-Fo for ged-emacs-devel@m.gmane.org; Wed, 22 Jun 2005 06:03:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DkwYg-0001V7-NM for ged-emacs-devel@m.gmane.org; Wed, 22 Jun 2005 00:09:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DkwSk-0007Gy-OE for emacs-devel@gnu.org; Wed, 22 Jun 2005 00:03:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DkwSi-0007Fx-JH for emacs-devel@gnu.org; Wed, 22 Jun 2005 00:03:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DkwPP-0005nz-Bx for emacs-devel@gnu.org; Wed, 22 Jun 2005 00:00:15 -0400 Original-Received: from [209.226.175.54] (helo=tomts10-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dkw39-0002PF-KF for emacs-devel@gnu.org; Tue, 21 Jun 2005 23:37:15 -0400 Original-Received: from alfajor ([67.71.119.247]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050622033409.GLIO26102.tomts10-srv.bellnexxia.net@alfajor>; Tue, 21 Jun 2005 23:34:09 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id B1472D732C; Tue, 21 Jun 2005 23:34:09 -0400 (EDT) Original-To: Juanma Barranquero In-Reply-To: (Juanma Barranquero's message of "Wed, 22 Jun 2005 00:26:37 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:39274 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39274 >> Sounds like a serious bug. Such bugs can lead to loss of data. > Does that mean that you agree that occur mode should run occur-hook via No, it means I agree that your code is buggy and should thus be fixed. > (save-current-buffer > (run-hooks 'occur-hook)) Once your code is fixed this is not needed any more. If the occur-hook is expected to set-buffer in most/many cases, it might make sense, but otherwise it doesn't. Stefan