From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: xref and leaving "temporary" buffers open Date: Tue, 28 Jul 2015 16:30:55 +0300 Message-ID: <55B7840F.3010608@yandex.ru> References: <55B2DC8F.3050305@yandex.ru> <83vbd81yti.fsf@gnu.org> <55B38E95.5060902@yandex.ru> <83h9os1gbx.fsf@gnu.org> <55B39C3A.9070107@yandex.ru> <83egjw1ez7.fsf@gnu.org> <55B3A6AD.6030008@yandex.ru> <83bnf01cly.fsf@gnu.org> <55B3B428.5080301@yandex.ru> <83a8uk1aef.fsf@gnu.org> <55B3B91A.2000509@yandex.ru> <83615819bd.fsf@gnu.org> <55B3C14D.9020005@yandex.ru> <55B3D2C8.3090606@gmx.at> <55B3D5A8.6090904@yandex.ru> <87fv49qzc7.fsf@spindle.srvr.nix> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1438090280 8689 80.91.229.3 (28 Jul 2015 13:31:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2015 13:31:20 +0000 (UTC) Cc: martin rudalics , Eli Zaretskii , emacs-devel@gnu.org To: Nix Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 28 15:31:15 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 1ZK4yQ-0000X3-Mw for ged-emacs-devel@m.gmane.org; Tue, 28 Jul 2015 15:31:14 +0200 Original-Received: from localhost ([::1]:58777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK4yP-000736-Uc for ged-emacs-devel@m.gmane.org; Tue, 28 Jul 2015 09:31:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK4yK-0006z1-BI for emacs-devel@gnu.org; Tue, 28 Jul 2015 09:31:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK4yB-0002b7-B2 for emacs-devel@gnu.org; Tue, 28 Jul 2015 09:31:08 -0400 Original-Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:34025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK4yB-0002aY-4M; Tue, 28 Jul 2015 09:30:59 -0400 Original-Received: by wibud3 with SMTP id ud3so180973139wib.1; Tue, 28 Jul 2015 06:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=ndKFMzFokgpLooLjMISFgY0PA10KDCmhLVTi8F+QGhQ=; b=EwsLxTDWgkKCXCcaZJ4dSRQMZ4VJdC0XOVfZ4uYYtYrObKHWp/NuHiOgNTJhAjQzc6 r9VCn5lvGNMdUGFbpsPhwhr0IXnKgJ2erdOHW4ueyceHx3BhQw0YXMOFjYU9lQfFnzOo ylW9nfO6IcwsUc2hz3c9yMM2Xxq/6mSknHF7kBv5d7+jjZdptAIzWH1ZFF0yRzypxyp1 83asUzLRbTmRcJzgu+PtRnfcoqpeiyQymiJjYtd+Ps/DHWnirmpLZlklTUN4Rtbj5R6/ 6tGpymKkoLwQYwQSQn+fvXQw0k7gnJ9b8kXCoiPAjHXTk/Vj5g4U24e8hPDBYFwOWwu2 J6dw== X-Received: by 10.194.221.71 with SMTP id qc7mr65980644wjc.9.1438090258455; Tue, 28 Jul 2015 06:30:58 -0700 (PDT) Original-Received: from [192.168.0.185] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by smtp.googlemail.com with ESMTPSA id di7sm19050955wib.23.2015.07.28.06.30.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jul 2015 06:30:57 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 In-Reply-To: <87fv49qzc7.fsf@spindle.srvr.nix> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::235 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:188125 Archived-At: On 07/27/2015 08:34 PM, Nix wrote: > FWIW, there are existing packages which automatically kill buffers that > weren't modified for a certain period of time and are no longer > displayed in any frame (using the buffer-modified-tick). If you combine > that with a modification such that the comparatively limited set of > commands that explicitly open buffers on user request set a buffer-local > 'persistent-buffer' variable in them, you can then arrange to > automatically erase all non-persistent buffers without touching the > packages that open such buffers. I think we'd rather move into the direction of other packages using the "hidden buffers" facility, thus indicating that their buffers can actually be cleaned up. Cleaning those up will cause issues already: I'm sure someone, somewhere will use find-file-hidden, don't mark the returned buffer as persistent, save a reference to it, and then try to use it later. > (However, this would tend to break > third-party modes that open lots of extra buffers -- but how many of > those are there? It's mostly things, like Gnus, that implement whole > multi-buffer applications inside Emacs, I think. There seem to be > arguments in favour both of the local variable to mark temporariness and > the local variable to mark *non*-temporariness...) A variable to mark temporariness might help a lot, actually. As long as it very obvious to the caller, so that we don't end up with heaps of hidden buffers, without any of them marked as temporary.