From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Occur stack Date: Thu, 16 Jan 2014 09:53:33 +0100 Message-ID: <874n5448aa.fsf@fencepost.gnu.org> References: <8738kq5xo5.fsf@yahoo.fr> <87ob3d645m.fsf@mail.jurta.org> <87a9ex8vi8.fsf@fencepost.gnu.org> <87eh49cfa8.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389862428 10489 80.91.229.3 (16 Jan 2014 08:53:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jan 2014 08:53:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 16 09:53:56 2014 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 1W3ii3-0000lU-4L for ged-emacs-devel@m.gmane.org; Thu, 16 Jan 2014 09:53:55 +0100 Original-Received: from localhost ([::1]:59131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3ii2-0007US-2P for ged-emacs-devel@m.gmane.org; Thu, 16 Jan 2014 03:53:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3ihz-0007Ty-2V for emacs-devel@gnu.org; Thu, 16 Jan 2014 03:53:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3ihx-0006e7-Om for emacs-devel@gnu.org; Thu, 16 Jan 2014 03:53:51 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3ihx-0006e3-LW for emacs-devel@gnu.org; Thu, 16 Jan 2014 03:53:49 -0500 Original-Received: from localhost ([127.0.0.1]:48904 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3ihx-0008RU-1o; Thu, 16 Jan 2014 03:53:49 -0500 Original-Received: by lola (Postfix, from userid 1000) id C3CF3E0497; Thu, 16 Jan 2014 09:53:33 +0100 (CET) In-Reply-To: <87eh49cfa8.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 16 Jan 2014 09:57:13 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:168519 Archived-At: Juri Linkov writes: >> For things like an occur or grep buffer, I don't think it is necessary >> to keep the actual contents around. They can be regenerated from >> scratch fast enough, so just keeping the history and possibly a somewhat >> robust cursor location should be enough. It becomes trickier with stuff >> like grep-find which may run for a while. Still, having the command >> history to some depth available conveniently is cheap and useful, >> certainly much cheaper than keeping the buffers. > > After editing an occur or grep buffer (e.g. removing unnecessary lines > with `flush-lines' or adding more highlighting with `highlight-regexp') > all such changes will be gone. Sure, as will changes due to editing the actual files or buffers. Of course, editing occur/grep buffers necessitates toggling the read-only flag so its presence/absence can be taken as an indicator for the preciousness of such a buffer. And of course, you can always rename-uniquely to save a buffer. My point, namely that an easibly accessible history regenerated transparently is much cheaper than buffers to keep around. -- David Kastrup