From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: xref and leaving "temporary" buffers open Date: Sat, 25 Jul 2015 10:27:53 +0300 Message-ID: <83vbd81yti.fsf@gnu.org> References: <55B2DC8F.3050305@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1437809287 6592 80.91.229.3 (25 Jul 2015 07:28:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jul 2015 07:28:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 25 09:28:02 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 1ZItsH-00072e-9d for ged-emacs-devel@m.gmane.org; Sat, 25 Jul 2015 09:28:01 +0200 Original-Received: from localhost ([::1]:47394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZItsG-0001TC-M5 for ged-emacs-devel@m.gmane.org; Sat, 25 Jul 2015 03:28:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZItsD-0001T4-9Q for emacs-devel@gnu.org; Sat, 25 Jul 2015 03:27:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZItsA-0005Bb-3F for emacs-devel@gnu.org; Sat, 25 Jul 2015 03:27:57 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:54881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIts9-0005B5-RS for emacs-devel@gnu.org; Sat, 25 Jul 2015 03:27:54 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NS1004008OKV200@mtaout28.012.net.il> for emacs-devel@gnu.org; Sat, 25 Jul 2015 10:28:03 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NS100KFJ8QRJRC0@mtaout28.012.net.il>; Sat, 25 Jul 2015 10:28:03 +0300 (IDT) In-reply-to: <55B2DC8F.3050305@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 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:188057 Archived-At: > From: Dmitry Gutov > 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.