From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: xref and leaving "temporary" buffers open Date: Sat, 25 Jul 2015 10:28:12 +0200 Message-ID: <55B3489C.2070009@gmx.at> References: <55B2DC8F.3050305@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1437812922 24823 80.91.229.3 (25 Jul 2015 08:28:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jul 2015 08:28:42 +0000 (UTC) To: Dmitry Gutov , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 25 10:28:33 2015 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 1ZIuoq-0005X9-7w for ged-emacs-devel@m.gmane.org; Sat, 25 Jul 2015 10:28:32 +0200 Original-Received: from localhost ([::1]:47494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIuop-0007Bf-Jo for ged-emacs-devel@m.gmane.org; Sat, 25 Jul 2015 04:28:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIuom-0007BG-MX for emacs-devel@gnu.org; Sat, 25 Jul 2015 04:28:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIuoi-0000LS-NC for emacs-devel@gnu.org; Sat, 25 Jul 2015 04:28:28 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:55312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIuoi-0000Kq-CY for emacs-devel@gnu.org; Sat, 25 Jul 2015 04:28:24 -0400 Original-Received: from [91.113.4.83] ([91.113.4.83]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MMGWH-1ZHYRX0V6j-007z5C; Sat, 25 Jul 2015 10:28:22 +0200 In-Reply-To: <55B2DC8F.3050305@yandex.ru> X-Provags-ID: V03:K0:doXcf8EMyScrpMK8+9cPJe75UGNCpywanhqpJ3dHRjb82BCe8Z4 eWbATqj06zAUbaC4TSm/o4DYO0XMSZDck+Q4g1MICJejpG0/mC4QGkYipVc41XbJbyttd0M uWKpU/J7HkoSeL02VH+XMSIM+dTBIbGjXuTM1Av8Mw1Czw1qntVuBBTj35lhGm2e9FpxwhJ 1bH2myV07K3oj5CpWaDjQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:lMAvRmXilgI=:QWjRyGEGQgY2Vnv2a4ZwyW dT4f2V/bScbjPsQAS/FJkUuHjWVEibDQ1/fNDfe41yITCio8lIsAcDcIft9EZIedD1j8iiAiN uM2NNCGKaVwmgy1zVU56T8KZutdlsDZ6QZkGmDAS8W5Km+JAE7kpG2ZqGtUOP5C5aP891TSr4 QiXVfwfzvihKaUBDsvN61yzU7dqHmDm3wvgedmCIE9yXvhAAfG/sjga62Ola/0gX/FR28lu4W /NB5eEY1HxVOY3dithM217mdZBP2ySEh0HIkVf+8j89RO+B/uxevOG6HYW0L0rl8Q3BikqQjW +fvVAx79Ycpz8Q0wW50aeTF8r2vvci5FLd8P4zv1xFVd8rVgWZrnItmKukfgOON5NHvsbaMCN 26H9EUaBbvs3BtdIi2m2fTfzcIbpp2beAXurkU8kbaHMQW7FX+iYCZfteuG2IdWO93sSpPJf0 FZn1EfCDDaTUDi89uRaD2LYZqxbQvJl/6NmP9D448tvkvTepen6KQMgyBPgFHRXH/rzg9cgB2 fqTkpuDe4PpDrlEHa3ZXc4FO407UK5LtWzbHlTySLbiZGKd8RjSpSY2GfxJL0hlQGK62FtgGD lbj7AMsfe2QVxsUpJHk02AKRwz4eFukjpjoyJ1xTlZEtGMg0znaR0q6zIAsLWgjDQEtxhS3ih I1s5ykGYg7woxnz8DJINmYzEB80W1qUUtMFWUAO4U7ZPzNgM5pH0WmO2rsug54wqkyms= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.22 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:188060 Archived-At: > Should we disregard this issue and say that xref doesn't have to close > the buffers it needed to open during operation? I'd try to implement some sort of heuristics, like adding a buffer to some sort of a cache only after its file has been visited by an application (like xref) at least N times and removing a buffer from that cache if it has not been visited by an application (like xref) for at least T minutes. > Another problem with that might be the contents getting out of date: > what if the user doesn't have global-auto-revert-mode on? Then an > xref search might get erroneous results from those buffers. Would it > be allowed to call `revert-buffer' anywhere, as long as the buffer > doesn't have unsaved changes? This should be made customizable. > Certain other programs might have a project and all its files loaded, > but still display only a few of them as the ones the user is editing > (probably using tabs). Should Emacs have a similar distinction, > between loaded and open buffers? I think so. Each buffer should maintain a list of all the applications that visited its file and all operations on buffer lists should be aware of it. martin