[Top][All Lists]

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

Re: xref and leaving "temporary" buffers open

From: Eli Zaretskii
Subject: Re: xref and leaving "temporary" buffers open
Date: Sat, 25 Jul 2015 10:27:53 +0300

> From: Dmitry Gutov <address@hidden>
> Date: Sat, 25 Jul 2015 03:47:11 +0300
> Should we disregard this issue and say that xref doesn't have to close 
> the buffers it needed to open during operation?

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.

Is xref different?  If so, why?

> 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?

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.

> 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.

reply via email to

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