all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: bvraghav@iitk.ac.in (B.V. Raghav)
To: Drew Adams <drew.adams@oracle.com>
Cc: 23987@debbugs.gnu.org
Subject: bug#23987: 24.5; Icy with Ggtags Problem
Date: Fri, 22 Jul 2016 20:21:49 +0530	[thread overview]
Message-ID: <871t2l67zu.fsf@ram.bvr.dp.lan> (raw)
In-Reply-To: <6bcabe89-33a6-4259-bb42-28f59497c255@default> (Drew Adams's message of "Fri, 22 Jul 2016 07:01:35 -0700 (PDT)")

Drew Adams <drew.adams@oracle.com> 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
> <backtab> 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:#<killed buffer> 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





      reply	other threads:[~2016-07-22 14:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14 17:27 bug#23987: 24.5; Icy with Ggtags Problem B.V. Raghav
2016-07-20  7:42 ` Glenn Morris
2016-07-21 16:44 ` Drew Adams
2016-07-22 12:06   ` B.V. Raghav
2016-07-22 14:01     ` Drew Adams
2016-07-22 14:51       ` B.V. Raghav [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871t2l67zu.fsf@ram.bvr.dp.lan \
    --to=bvraghav@iitk.ac.in \
    --cc=23987@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.