From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.bugs Subject: bug#57883: compilation-get-file-structure mishandles buffers Date: Wed, 10 Jan 2024 17:14:13 -0500 Message-ID: <9A0E0763-FF9E-490E-AD5A-8E91FE12B2FD@gmail.com> References: <87edw93qa6.fsf@gnus.org> <18051D5E-0D75-410C-A89C-2BF92BD0C471@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30292"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 57883-done@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 10 23:15:22 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rNgr4-0007gZ-N2 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Jan 2024 23:15:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNgqq-0003ug-Ir; Wed, 10 Jan 2024 17:15:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNgqm-0003uX-5a for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 17:15:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNgql-0000iE-Rq for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 17:15:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNgqk-0004uD-LA for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 17:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: JD Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jan 2024 22:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57883-done@debbugs.gnu.org id=D57883.170492487218666 (code D ref 57883); Wed, 10 Jan 2024 22:15:02 +0000 Original-Received: (at 57883-done) by debbugs.gnu.org; 10 Jan 2024 22:14:32 +0000 Original-Received: from localhost ([127.0.0.1]:43420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNgqF-0004r0-Sj for submit@debbugs.gnu.org; Wed, 10 Jan 2024 17:14:32 -0500 Original-Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132]:57363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNgqD-0004ql-5u for 57883-done@debbugs.gnu.org; Wed, 10 Jan 2024 17:14:29 -0500 Original-Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-5f75aee31d2so41745777b3.2 for <57883-done@debbugs.gnu.org>; Wed, 10 Jan 2024 14:14:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704924864; x=1705529664; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LCfkF2MNziNPhSk53pzL3pk4bk09iqUnxZ5ZhVsLl8k=; b=ZweWfcXvfhWO422cUmO9XximFsJIQQm3/lFZZ0xNC2ddX9Y62/+8nkSPNfZtmcz1As lFzsPIV5ZwQetoiruEKNhdPZ7e1Hm/ZF4sCFdBmNByGe+fcVkOzs4NiCBUYes1GvlVTA A7uESXLEDB8Djbc2fP/utBe9csSRoyo9UF0mtq7T7lMmPyAg7J4bKvd6OArQTzs6M9h0 VD+W0km47LlWCRE5uG7d+0iE53l/qF+qQxbTO2bOanRPO0AdWYirAM7WF2lkzlKUPJfv ox+z4efdjyv48hQ76/Wvb4fdOz9vtqqeP5beCXEYK38MsK7O+QWvYNIWr4vJJd/BjHy2 l+0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704924864; x=1705529664; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LCfkF2MNziNPhSk53pzL3pk4bk09iqUnxZ5ZhVsLl8k=; b=DZzg62v8HfYUUJ/Z7af918nHroPWL11oejMKReNzaI/z229SVi9dzTGYJDg0UksEBA i9Q3EL4QxIsuPkmdk01NNO2Btzz6FHh7WWwlXpyM5R9/17ca2s7Pnt3shejnmFLj+X94 3qicc9VI/B7ZaYjIGviyj+a0n5tNZUyvYs7i0wyrmV4Aml5tpl8+gCXSWIsBdoFZyR4q uDaYVbRUKOlsTiwdETdZKj3ftCKHOhxRXPf/20vnaY24f6y6kCrOh6irGYcae3yJ7oYv Msw2BNsLHp2lkE4GDD7Eku8ihzSW1ANTwvprvxt9gNjip5dCzVaKvkvjDcvgJ5ixe30B jxUA== X-Gm-Message-State: AOJu0YzPQA7GdEp1Nyt2wF6GFnl9rh7I4l4kxVsT1sjFEos0sgpZzu9o Dn6a2QOghm0r2LFi4mB1tWg= X-Google-Smtp-Source: AGHT+IGCPq7e5kWo3p7G3V7+c3QG+BlbdYf40N3ba6wrv7W+AN61F4NB4Edw6lX8E1rX0ONACNRaow== X-Received: by 2002:a81:a9c9:0:b0:5f6:e673:3f22 with SMTP id g192-20020a81a9c9000000b005f6e6733f22mr295117ywh.37.1704924864317; Wed, 10 Jan 2024 14:14:24 -0800 (PST) Original-Received: from smtpclient.apple ([131.183.131.33]) by smtp.gmail.com with ESMTPSA id v187-20020a0dd3c4000000b005de8c10f283sm1893980ywd.102.2024.01.10.14.14.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jan 2024 14:14:23 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3774.300.61.1.2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277835 Archived-At: Apologies, I had missed this request. The problem with your version of = the code is it doesn=E2=80=99t actually create any error text for = parse-errors to match. Here=E2=80=99s a small tweak to your code to do = this. It is still producing the same error in v29.1: (progn (require 'compile) (defun my/filename-function () (list (get-buffer (match-string 1)))) (defvar my/compilation-error-regexp `((,(rx line-start "Buffer \"" (group (+ (not "\""))) "\", " ; 1: buffer name "line" (+ space) (group (+ digit)) ; 2: line (* nonl) ?\n) my/filename-function 2 nil nil 1))) (with-current-buffer (get-buffer-create "*exhibit-compilation-error*") (erase-buffer) (compilation-setup) (setq compilation-error-regexp-alist my/compilation-error-regexp) (insert "Buffer \"*scratch*\", line 2\n") (compilation-parse-errors (point-min) (point-max)))) > On Jan 10, 2024, at 5:55=E2=80=AFAM, Stefan Kangas = wrote: >=20 > Stefan Kangas writes: >=20 >> reopen 57883 >> thanks >>=20 >> JD Smith writes: >>=20 >>> Thanks for the query. This is still an issue in Emacs 29 with emacs = -Q. >>=20 >> Thanks, reopened. >>=20 >>> Reproducer: The reproduction recipe was in the linked emacs-devel >>> = >>> thread. Here it is again (with Emacs 29 updates in [brackets]): >>=20 >> I've tried editing your recipe down into something that's a little = bit >> easier for me to work with. >>=20 >> All of this is pasted into an emacs -Q "*scratch*" buffer: >>=20 >> (progn >> (require 'compile) >> (defun my/filename-function () (list (get-buffer (match-string 1)))) >> (defvar my/compilation-error-regexp >> `((,(rx line-start >> "Buffer \"" (group (+ (not "\""))) "\", " ; 1: buffer name >> "line" (+ space) (group (+ digit)) ; 2: line >> (* nonl) ?\n) >> my/filename-function >> 2 >> nil nil 1))) >> (progn (compilation-setup) >> (setq compilation-error-regexp-alist = my/compilation-error-regexp) >> (compilation-parse-errors (point-min) (point-max))) >> (compilation-parse-errors (point-min) (point-max))) >>=20 >> But this doesn't give me any error when evaluating it either Emacs = 29.1 >> or current master. Did I miss something? Perhaps there is some step >> missing in my edited recipe? >=20 > More information was requested, but none was given within 4 months, so > I'm closing this bug. >=20 > If this is still an issue, please reply to this email (use "Reply to > all" in your email client) and we can reopen the bug report.