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: Wed, 29 Jul 2015 04:42:15 +0300 Message-ID: <55B82F77.3090204@yandex.ru> References: <55B2DC8F.3050305@yandex.ru> <55B3489C.2070009@gmx.at> <55B390CE.6020104@yandex.ru> <55B3994A.5010709@gmx.at> <55B3A0B6.6080101@yandex.ru> <55B3B0FC.3080004@gmx.at> <55B3EDBD.8050409@yandex.ru> <55B4C439.1040909@gmx.at> <55B4E5B3.3000108@yandex.ru> <55B65610.7070308@gmx.at> <55B77C57.6010306@yandex.ru> 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 1438134169 16545 80.91.229.3 (29 Jul 2015 01:42:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jul 2015 01:42:49 +0000 (UTC) Cc: martin rudalics , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 29 03:42:39 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 1ZKGOD-0005HR-88 for ged-emacs-devel@m.gmane.org; Wed, 29 Jul 2015 03:42:37 +0200 Original-Received: from localhost ([::1]:32994 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKGOC-0004RS-CD for ged-emacs-devel@m.gmane.org; Tue, 28 Jul 2015 21:42:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKGO0-0004Pt-Hn for emacs-devel@gnu.org; Tue, 28 Jul 2015 21:42:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKGNv-0005Jh-IN for emacs-devel@gnu.org; Tue, 28 Jul 2015 21:42:24 -0400 Original-Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:33320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKGNv-0005JL-AQ for emacs-devel@gnu.org; Tue, 28 Jul 2015 21:42:19 -0400 Original-Received: by wicmv11 with SMTP id mv11so200182816wic.0 for ; Tue, 28 Jul 2015 18:42:18 -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=/2hf6W2pe7Mqr8VAnMj5HMSBy4M5uJhnuLvKbdVSE2c=; b=oOVWO0kwoXbfK2VkDLJ0CViKezPJGoBTJn1/lJ3AQ9uFXk8q2VlN7BWPuqBuGUef/n Up5ZAGsPu5NpcsaHfGwVmEOOHg0aPZJjAs3e73WFgBZOgqX7/DcqtL2Qqkkx3ilIm6Vl gwZ+Pqom0PFY3WtHuknvBaB7X886s27Wh57wyjkzQJDaI0r2+y18oSqkK9Tlq26dePj8 H+lsT4YFcdgtr/qqxgLmzlR5wWjDEr2IJoE6ZbWcLn3VF5ISVQ+BjMUU04KuDroF/0qO sVC407GCsUtlkU9iesPoUBfwngqasQ2pC7w8sh1l739UuBajQ1kakbdZx+gVAnknQ++V OOTg== X-Received: by 10.181.27.131 with SMTP id jg3mr662689wid.89.1438134138312; Tue, 28 Jul 2015 18:42:18 -0700 (PDT) Original-Received: from [10.9.0.103] (nat.webazilla.com. [78.140.128.228]) by smtp.googlemail.com with ESMTPSA id lg6sm35877150wjb.10.2015.07.28.18.42.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jul 2015 18:42:17 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22a 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:188153 Archived-At: On 07/29/2015 02:48 AM, Stefan Monnier wrote: > I can see something like this working: Right. There were more specific proposals in this thread. You might want to comment on those. > - set a buffer-local variable "buffer-file-incomplete" to a function > which performs the missing setup (e.g. set up VC status and stuff). > - ignore buffers with this var set to a non-nil value in things like > buffer completion. So, you'd limit the changes to the higher level, like read-buffer-to-switch and internal-complete-buffer-except? What about other interfaces we have for buffer switching? ido-make-buffer-list-1 calls buffer-list (that one's easy to change, since it's in the core), iflipb calls buffer-list, helm-buffers-list calls buffer-list. > - kill those buffers every once in a while. > > But I'm not sure the speed up will be ground breaking if we need to call > `syntax-propertize' anyway. As long as the buffer-file-incomplete function doesn't change the buffer contents, at least we won't have to call syntax-propertize multiple times. And depending on the file size, the overhead from vc-find-file-hook may become noticeable, too. In (find-file-noselect ".gitignore"), it takes more than half of the time (15 out of 25 ms), here.