From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#23987: 24.5; Icy with Ggtags Problem Date: Thu, 21 Jul 2016 09:44:44 -0700 (PDT) Message-ID: <3010c050-4257-4c00-82be-9a0437e2a4cc@default> References: <87zipk2kq4.fsf@ram.bvr.dp.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1469121662 26758 80.91.229.3 (21 Jul 2016 17:21:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Jul 2016 17:21:02 +0000 (UTC) To: bvraghav@iitk.ac.in, 23987@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 21 19:20:48 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1bQHeR-0005Jl-AI for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Jul 2016 19:20:47 +0200 Original-Received: from localhost ([::1]:42263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQHeQ-0007B9-9L for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Jul 2016 13:20:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQH5v-00012M-UA for bug-gnu-emacs@gnu.org; Thu, 21 Jul 2016 12:45:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQH5q-0003iE-Qg for bug-gnu-emacs@gnu.org; Thu, 21 Jul 2016 12:45:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQH5q-0003i9-N4 for bug-gnu-emacs@gnu.org; Thu, 21 Jul 2016 12:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bQH5q-0003YD-Ft for bug-gnu-emacs@gnu.org; Thu, 21 Jul 2016 12:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jul 2016 16:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23987 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23987-submit@debbugs.gnu.org id=B23987.146911949813627 (code B ref 23987); Thu, 21 Jul 2016 16:45:02 +0000 Original-Received: (at 23987) by debbugs.gnu.org; 21 Jul 2016 16:44:58 +0000 Original-Received: from localhost ([127.0.0.1]:60591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQH5m-0003Xj-Fn for submit@debbugs.gnu.org; Thu, 21 Jul 2016 12:44:58 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:27890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQH5j-0003XT-Vf for 23987@debbugs.gnu.org; Thu, 21 Jul 2016 12:44:57 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u6LGilfO023238 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Jul 2016 16:44:47 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u6LGikdW018280 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Jul 2016 16:44:47 GMT Original-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u6LGijKN032631; Thu, 21 Jul 2016 16:44:45 GMT In-Reply-To: <87zipk2kq4.fsf@ram.bvr.dp.lan> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121393 Archived-At: > Error running timer `compilation-auto-jump': (error "Selecting > deleted buffer") This might, as supposed, be a ggtags issue. But I wonder if this isn't actually a `compile.el' issue. It seems like asking for trouble for any function (e.g. `compilation-auto-jump') that is invoked by an idle timer to be doing something based on evaluation of `(current-buffer)', in particular, without testing whether the result of that evaluation is a live buffer. In the present case, a user is apparently doing code completion. And in the case of Icicles, that can involve use of the minibuffer. I suspect that `compilation-auto-jump' should control itself, and act only in the buffer that it apparently expects to be acting in. Seems like fragile code. Any reason why an idle-timer function should assume something about what buffer is current or should not bother to check whether `(current-buffer)' is a live buffer? My guess is that this is not a ggtags or Icicles issue, but is just dumb behavior by `compilation-auto-jump'. This is my suggestion, FWIW: (defun compilation-auto-jump (buffer pos) (when (buffer-live-p buffer) ; <=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (with-current-buffer buffer (goto-char pos) (let ((win (get-buffer-window buffer 0))) (when win (set-window-point win pos))) (when compilation-auto-jump-to-first-error =09 (compile-goto-error))))) Seems like a no-brainer...