[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xref and leaving "temporary" buffers open

From: Dmitry Gutov
Subject: Re: xref and leaving "temporary" buffers open
Date: Wed, 29 Jul 2015 04:42:15 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]