[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: Sat, 25 Jul 2015 16:26:45 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0

On 07/25/2015 10:27 AM, Eli Zaretskii wrote:

How is xref different from Grep or Gid in this regard?  Or from
"M-x gdb", for that matter?  They leave behind buffers that have
names like "*gid foobar*" and "*gdb myprog*", and never look back.

No, these are fine.

What I'm talking about, are file buffers that xref commands need to open, to read their contents. Such as xref-find-references; see, it can use Grep to find textual matches, but it cannot verify that the beginning and the end of the match are symbol boundaries without using the corresponding major mode, its syntax table, *and* its syntax-propertize-function. Basically, the only sane solution is to open each buffer and verify.

The question is, should they be killed afterwards.

I see no reason why not.  Some commands already save the buffer
(perhaps after asking for confirmation) to have the file on disk
consistent with what Emacs has, and this is no different.

Hmm yes. I wonder if it'll be appropriate to simply call (auto-revert-handler) if each buffer visited for this purpose.

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'm not sure I understand how this distinction will come into play, or
why is it relevant to the issue at hand.  Please elaborate.

Hopefully, this is clear now.

reply via email to

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