all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: JD Smith <jdtsmith@gmail.com>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 57883-done@debbugs.gnu.org
Subject: bug#57883: compilation-get-file-structure mishandles buffers
Date: Wed, 10 Jan 2024 17:14:13 -0500	[thread overview]
Message-ID: <9A0E0763-FF9E-490E-AD5A-8E91FE12B2FD@gmail.com> (raw)
In-Reply-To: <CADwFkm=J47kLaYTTOQyPbwRAa7Z9sEvrBgcy=PETK-aV68SsUA@mail.gmail.com>


Apologies, I had missed this request.  The problem with your version of the code is it doesn’t actually create any error text for parse-errors to match.  Here’s 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 AM, Stefan Kangas <stefankangas@gmail.com> wrote:
> 
> Stefan Kangas <stefankangas@gmail.com> writes:
> 
>> reopen 57883
>> thanks
>> 
>> JD Smith <jdtsmith@gmail.com> writes:
>> 
>>> Thanks for the query.  This is still an issue in Emacs 29 with emacs -Q.
>> 
>> Thanks, reopened.
>> 
>>> Reproducer: The reproduction recipe was in the linked emacs-devel
>>> <https://lists.gnu.org/archive/html/emacs-devel/2022-02/msg00496.html>
>>> thread.  Here it is again (with Emacs 29 updates in [brackets]):
>> 
>> I've tried editing your recipe down into something that's a little bit
>> easier for me to work with.
>> 
>> All of this is pasted into an emacs -Q "*scratch*" buffer:
>> 
>> (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)))
>> 
>> 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?
> 
> More information was requested, but none was given within 4 months, so
> I'm closing this bug.
> 
> 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.






  reply	other threads:[~2024-01-10 22:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-17 14:25 bug#57883: compilation-get-file-structure mishandles buffers JD Smith
2022-09-18 10:55 ` Lars Ingebrigtsen
2023-09-03  9:18   ` Stefan Kangas
2023-09-03 13:36     ` JD Smith
2023-09-03 18:27       ` Stefan Kangas
2024-01-10 10:55         ` Stefan Kangas
2024-01-10 22:14           ` JD Smith [this message]
2024-01-10 23:20             ` Stefan Kangas

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=9A0E0763-FF9E-490E-AD5A-8E91FE12B2FD@gmail.com \
    --to=jdtsmith@gmail.com \
    --cc=57883-done@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=stefankangas@gmail.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.