From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bvraghav@iitk.ac.in (B.V. Raghav) Newsgroups: gmane.emacs.bugs Subject: bug#23987: 24.5; Icy with Ggtags Problem Date: Fri, 22 Jul 2016 20:21:49 +0530 Organization: Indian Institute of Technology, Kanpur Message-ID: <871t2l67zu.fsf@ram.bvr.dp.lan> References: <87zipk2kq4.fsf@ram.bvr.dp.lan> <3010c050-4257-4c00-82be-9a0437e2a4cc@default> <87a8h96fnt.fsf@ram.bvr.dp.lan> <6bcabe89-33a6-4259-bb42-28f59497c255@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1469199292 7778 80.91.229.3 (22 Jul 2016 14:54:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Jul 2016 14:54:52 +0000 (UTC) Cc: 23987@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 22 16:54:44 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 1bQbqc-000714-5S for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jul 2016 16:54:42 +0200 Original-Received: from localhost ([::1]:47718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQbqX-0005Pv-WD for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jul 2016 10:54:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQbo7-0003I7-2A for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2016 10:52:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQbo2-0002Q8-0x for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2016 10:52:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQbo1-0002Q0-TP for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2016 10:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bQbo1-0005nv-Nt for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2016 10:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: bvraghav@iitk.ac.in (B.V. Raghav) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jul 2016 14:52:01 +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.146919911622299 (code B ref 23987); Fri, 22 Jul 2016 14:52:01 +0000 Original-Received: (at 23987) by debbugs.gnu.org; 22 Jul 2016 14:51:56 +0000 Original-Received: from localhost ([127.0.0.1]:33878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQbnv-0005nb-TQ for submit@debbugs.gnu.org; Fri, 22 Jul 2016 10:51:56 -0400 Original-Received: from mail2.iitk.ac.in ([202.3.77.186]:42881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQbnt-0005nQ-5T for 23987@debbugs.gnu.org; Fri, 22 Jul 2016 10:51:54 -0400 Original-Received: from smtp.cc.iitk.ac.in (smtp.cc.iitk.ac.in [172.31.1.22]) by mail2.iitk.ac.in (Postfix) with ESMTP id A7A5C1000129; Fri, 22 Jul 2016 20:21:49 +0530 (IST) Original-Received: from ram.bvr.dp.lan.iitk.ac.in (unknown [172.20.240.119]) (Authenticated sender: bvraghav) by smtp.cc.iitk.ac.in (Postfix) with ESMTPA id A613C48; Fri, 22 Jul 2016 20:21:49 +0530 (IST) In-Reply-To: <6bcabe89-33a6-4259-bb42-28f59497c255@default> (Drew Adams's message of "Fri, 22 Jul 2016 07:01:35 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) 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:121418 Archived-At: Drew Adams writes: >> > (defun compilation-auto-jump (buffer pos) >> > (when (buffer-live-p buffer) ; <======= > ... >> This function did not help the use case... > > Hm. I thought that the error reported was that some code tried > to use a buffer that was dead (killed). And that the code > that raised the error was invoked from `compilation-auto-jump' > (which is invoked from an idle timer). > > Error running timer `compilation-auto-jump': (error "Selecting > deleted buffer") > > Are you getting the _same_ error even after changing the code > as indicated? If so then I might not understand what's going > on. > Yes, I had thought the same, when I had included this in the init.el, in the end. Then I sent a print message, and it printed the message, but that was all. I had tried it with `emacs -Q', added ggtags, and icicles to the load path; copied the function to scratch buffer, and C-M-x But the same result! Now I am trying your suggestion, using the message instead of print. (defun compilation-auto-jump (buffer pos) "Override suggested by Drew Adams bug#23987 <23987@debbugs.gnu.org>" (message "Override for compilation-auto-jump called Buf:%s Pos:%s" buffer pos) (when (buffer-live-p buffer) ; <============= (with-current-buffer buffer (goto-char pos) (let ((win (get-buffer-window buffer 0))) (if win (set-window-point win pos))) (if compilation-auto-jump-to-first-error (compile-goto-error))))) Here is the output from the *Messages* buffer > For information about GNU Emacs and the GNU system, type C-h C-a. > Mark set > Function icicle-repeat-complex-command is already compiled > Quit [2 times] > Making completion list... > Ggtags mode enabled > Global found 1 definition > Override for compilation-auto-jump called Buf:*ggtags-global* Pos:208 > Quit > Global found 4 references > Override for compilation-auto-jump called Buf:*ggtags-global* Pos:230 > Global found 1 definition > Override for compilation-auto-jump called Buf:*ggtags-global* Pos:223 > is undefined > Quit > Turning OFF Icicle mode...done > Turning ON Icicle mode...done > Turning OFF Icicle mode...done > Turning ON Icicle mode...done > Turning ON Icicle mode...done > Computing completion candidates... > Quit > Computing completion candidates... > Global found 1 definition > Override for compilation-auto-jump called Buf:# Pos:229 > Computing completion candidates... > Turning OFF Icicle mode...done > Global found 1 definition > Override for compilation-auto-jump called Buf:*ggtags-global* Pos:229 Ggtags works as expected, before icy-mode, but with icy-mode switched on, the message flashes, saying called for a killed buffer. Then again after switching off icy-mode, invoking ggtags, for the same definition. Incidentally this happens only, for sole completions, for example, func_foo_bar, has single occurence as definition, then this failure happens. However for multiple completions, it works, seamlessly. On top of it, when I override the call to `ggtags-navigation-mode-cleanup' inside of `ggtags-global-handle-exit', as follows: (ggtags-navigation-mode-cleanup buf 0.25) instead of `0' /^^^^\-----here This function works for arbitrarily small numbers 0.006 etc. buf sometimes also does fail. There indeed is a jump to the definition, but a split window is left open at the bottom. This probably is a ggtags affair. Thanks, HTH -- (B.V. Raghav) Ph.D. Student, Design Programme, IIT Kanpur Ph: +91-9450988137 Email: bvraghav@gmail.com