- ;; fetch the compilation-message while in the session-buffer.
- (let* ((msg (compilation-next-error 0 nil (point-min)))
- ;; FIXME: '--' indicates internal-only; use compile-goto-error
- (loc (compilation--message->loc msg)))
- (setq file (caar (compilation--loc->file-struct loc))
- line (caar (cddr (compilation--loc->file-struct loc)))
- column (1- (compilation--loc->col loc)))
+ ;; fetch the compilation-message while in the
+ ;; session-buffer. and call ada-goot-source outside the
+ ;; with-current-buffer above.
+ (compilation--ensure-parse (point-max))
+ (let* ((msg (compilation-next-error 0))
+ ;; IMPROVEME: '--' indicates internal-only. But we can't
+ ;; use compile-goto-error, because that displays the
+ ;; session-buffer.
+ (loc (compilation--message->loc msg)))
+ (setq target-file (caar (compilation--loc->file-struct loc))
+ target-line (caar (cddr (compilation--loc->file-struct loc)))
+ target-col (1- (compilation--loc->col loc))
+ )