GNU bug report logs - #23987
24.5; Icy with Ggtags Problem

Previous Next

Package: emacs;

Reported by: bvraghav <at> iitk.ac.in (B.V. Raghav)

Date: Thu, 14 Jul 2016 17:29:02 UTC

Severity: minor

Found in version 24.5

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Forwarded to https://github.com/leoliu/ggtags/issues/89

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: bvraghav <at> iitk.ac.in, 23987 <at> debbugs.gnu.org
Subject: bug#23987: 24.5; Icy with Ggtags Problem
Date: Thu, 21 Jul 2016 09:44:44 -0700 (PDT)
>    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) ; <===========================
    (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
	 (compile-goto-error)))))

Seems like a no-brainer...




This bug report was last modified 8 years and 363 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.