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: Wed, 15 Jan 2014 10:06:07 +0100 Organization: Organization?!? Message-ID: <87a9ex8vi8.fsf@fencepost.gnu.org> References: <8738kq5xo5.fsf@yahoo.fr> <87ob3d645m.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389776798 5948 80.91.229.3 (15 Jan 2014 09:06:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 09:06:38 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 15 10:06:43 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 1W3MQq-0003GJ-2G for ged-emacs-devel@m.gmane.org; Wed, 15 Jan 2014 10:06:40 +0100 Original-Received: from localhost ([::1]:53056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3MQp-0000RZ-CY for ged-emacs-devel@m.gmane.org; Wed, 15 Jan 2014 04:06:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3MQg-0000RN-TF for emacs-devel@gnu.org; Wed, 15 Jan 2014 04:06:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3MQa-0002z4-R1 for emacs-devel@gnu.org; Wed, 15 Jan 2014 04:06:30 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:52508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3MQa-0002yi-Jb for emacs-devel@gnu.org; Wed, 15 Jan 2014 04:06:24 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W3MQY-0002jC-H5 for emacs-devel@gnu.org; Wed, 15 Jan 2014 10:06:22 +0100 Original-Received: from x2f5226b.dyn.telefonica.de ([2.245.34.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Jan 2014 10:06:22 +0100 Original-Received: from dak by x2f5226b.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Jan 2014 10:06:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: x2f5226b.dyn.telefonica.de X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:nSJKwbz0IRQ2Wj+6yu/YKv67yFE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:168447 Archived-At: Juri Linkov writes: >>> Yes, I can do this manually if I remember to do it, >> >> No need to do it by hand: >> >> (add-hook 'occur-hook 'rename-uniquely) > > Or (add-hook 'occur-hook (lambda () (occur-rename-buffer t))) > > In addition, for more convenience of switching related buffers > we could group occur buffers in the window-local tab-bar, > so it will display the history of *Occur* buffers. > In *Help* it could display the history of help topics, > in Dired the history of directories visited with `a' > (dired-find-alternate-file), etc. 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. -- David Kastrup