From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: npostavs@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#36001: 26.2; compile-mode.el/compilation-mode spontaneous behaviour Date: Thu, 30 May 2019 12:35:50 -0400 Message-ID: <85ef4fdhnd.fsf@gmail.com> References: <20190530094936.GA22903@15inch.localdomain> <87a7f46tip.fsf@gmail.com> <20190530135828.GA111022@15inch.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="182286"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (windows-nt) Cc: 36001@debbugs.gnu.org, Noam Postavsky To: Evgeniy Dushistov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 30 18:36:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hWO2G-000lD8-CN for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 May 2019 18:36:12 +0200 Original-Received: from localhost ([127.0.0.1]:56584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWO2F-0005VD-8i for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 May 2019 12:36:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWO28-0005TG-FC for bug-gnu-emacs@gnu.org; Thu, 30 May 2019 12:36:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWO27-0002JM-6w for bug-gnu-emacs@gnu.org; Thu, 30 May 2019 12:36:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48380) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWO26-0002J7-VZ for bug-gnu-emacs@gnu.org; Thu, 30 May 2019 12:36:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hWO26-00007C-Rl for bug-gnu-emacs@gnu.org; Thu, 30 May 2019 12:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 May 2019 16:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36001 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 36001-submit@debbugs.gnu.org id=B36001.1559234162433 (code B ref 36001); Thu, 30 May 2019 16:36:02 +0000 Original-Received: (at 36001) by debbugs.gnu.org; 30 May 2019 16:36:02 +0000 Original-Received: from localhost ([127.0.0.1]:33689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hWO25-00006h-Fk for submit@debbugs.gnu.org; Thu, 30 May 2019 12:36:01 -0400 Original-Received: from mail-io1-f50.google.com ([209.85.166.50]:43740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hWO23-00006M-DS; Thu, 30 May 2019 12:35:59 -0400 Original-Received: by mail-io1-f50.google.com with SMTP id k20so5580219ios.10; Thu, 30 May 2019 09:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ASgz0MR7l1RY0Ev5GW7m/t07gl6CHHJK1aucBrGhoDQ=; b=hjYA+7IfELpEdOemFf1UwGtwue2VnfB0sFO2l6YPEeUteEuQYiaqX0NYJAdh9qxuAC H3SCaFhVN9RccZv28iQs5nlBDZqZ9fPg3aEDZamuhhTJW+StHTQ14Eg7NK7NJfq0jBhE WrywAZ2HTQAn9cURipKr6BC+gSwSOlKD049kE+VvJnkkvcxsN9ObLwHz/bTzjGwhfnA1 wnhGr2b6xgNFFK6xcRV3IXFkuj3sCFPR53hQQn8RZKifNkzOQntUsxcu5yYelgo2v8hs yPJwRSNPimEDWVi5SPrCNcecKc1xz2hoNfKdVJUB/270hIyLs2lrnBCGNlZmJC53KXkv 4j/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ASgz0MR7l1RY0Ev5GW7m/t07gl6CHHJK1aucBrGhoDQ=; b=XqpaUwEtzlUKfILRDS2JbowjaXK84RObn14qvIztVkyULhppNSasiIhAu5+K/Xz2Ik bkrH5cRaCbkkaEO8NboANK3SQHDXi/YaQwhDuZuqdgxoAhI6RiLarO86DE0d8pEIeF+N UKCbjFJDGFSxX0BHDZTe/+0PtiZ07haR/tMq/Y0NkXCIXJu5Jlxj4SShIVHbF+Uwyaxk ml6zR3xZZIFscDAbytY/Sc37fYVN6d4QFm5n/Y2vjcyho1h4nOboWqgxl7feMR1AuQ0m GERk0TXupsep8biBl6JuvtMC5pGk/JTBYge5cwdwaAlcTyI3UH8Tp69t6AAFcYUM1/xN OuGw== X-Gm-Message-State: APjAAAWdfw1QByuYYPQ9xpeQp63enRti2QuNKbQ6OMPu3j3YQAWgHT15 8TKjIcym4hl697rS3onKFu2Vqi+k X-Google-Smtp-Source: APXvYqwLHqNOLtg5IpWSfREZBQ6M4euVNyvkATFohsu03x4Adw0BtwIkIyYkwdfYCUghulUy2qzYGA== X-Received: by 2002:a6b:e50d:: with SMTP id y13mr2863442ioc.160.1559234153487; Thu, 30 May 2019 09:35:53 -0700 (PDT) Original-Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.51.196]) by smtp.gmail.com with ESMTPSA id n26sm1039906ioc.74.2019.05.30.09.35.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 May 2019 09:35:51 -0700 (PDT) In-Reply-To: <20190530135828.GA111022@15inch.localdomain> (Evgeniy Dushistov's message of "Thu, 30 May 2019 16:58:28 +0300") 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: 209.51.188.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:159926 Archived-At: --=-=-= Content-Type: text/plain merge 36001 25133 quit Evgeniy Dushistov writes: > the first error is not marked as error: > >> error... >> --> macroslib/src/lib.rs:428:27 > > I uses rust-mode, it adds some regexps to > compilation-error-regexp-alist-alist: > > https://github.com/rust-lang/rust-mode/blob/master/rust-mode.el Thanks, I attach a simple reproducer based on this, run as emacs -Q -l bug-36001-reproducer.el -f bug-36001-reproducer --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=bug-36001-reproducer.el Content-Description: bug reproducer (require 'compile) (defun bug-36001-reproducer () (interactive) (with-current-buffer (get-buffer-create "*test bug 36001*") (compilation-mode) (display-buffer (current-buffer)) (mapc (lambda (s) (let ((inhibit-read-only t)) (insert s)) (sit-for 0)) '(" Compiling rust_swig v0.4.0-pre (/home/evgeniy/bigdisk1/projects/rust-infra/swig/macroslib) " "error[E0599]: no method named `merge` found for type `typemap::TypeMap` in the current scope " " --> macroslib/src/lib.rs:428:27 | 428 | self.conv_map.merge(*code_id, code, target_pointer_width)?; | ^^^^^ help: did you mean: `merge2` | ::: macroslib/src/typemap.rs:81:1 | 81 | pub(crate) struct TypeMap { | ------------------------- method `merge` not found for this ")))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Copied from https://github.com/rust-lang/rust-mode/raw/master/rust-mode.el ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar rustc-compilation-regexps (let ((file "\\([^\n]+\\)") (start-line "\\([0-9]+\\)") (start-col "\\([0-9]+\\)")) (let ((re (concat "^\\(?:error\\|\\(warning\\)\\)[^-]+--> \\(" file ":" start-line ":" start-col "\\)"))) (cons re '(3 4 5 (1) 2)))) "Specifications for matching errors in rustc invocations. See `compilation-error-regexp-alist' for help on their format.") (defvar rustc-colon-compilation-regexps (let ((file "\\([^\n]+\\)") (start-line "\\([0-9]+\\)") (start-col "\\([0-9]+\\)")) (let ((re (concat "^ *::: " file ":" start-line ":" start-col ; ::: foo/bar.rs ))) (cons re '(1 2 3 0)))) ;; 0 for info type "Specifications for matching `:::` hints in rustc invocations. See `compilation-error-regexp-alist' for help on their format.") ;; Match test run failures and panics during compilation as ;; compilation warnings (defvar cargo-compilation-regexps '("^\\s-+thread '[^']+' panicked at \\('[^']+', \\([^:]+\\):\\([0-9]+\\)\\)" 2 3 nil nil 1) "Specifications for matching panics in cargo test invocations. See `compilation-error-regexp-alist' for help on their format.") (progn (add-to-list 'compilation-error-regexp-alist-alist (cons 'rustc rustc-compilation-regexps)) (add-to-list 'compilation-error-regexp-alist 'rustc) (add-to-list 'compilation-error-regexp-alist-alist (cons 'rustc-colon rustc-colon-compilation-regexps)) (add-to-list 'compilation-error-regexp-alist 'rustc-colon) (add-to-list 'compilation-error-regexp-alist-alist (cons 'cargo cargo-compilation-regexps)) (add-to-list 'compilation-error-regexp-alist 'cargo) (add-hook 'next-error-hook 'rustc-scroll-down-after-next-error)) --=-=-= Content-Type: text/plain The basic problem is that rust-mode is using a multiline regexp, so it's the same bug#25133. --=-=-=--