GNU bug report logs - #66261
Disassembling a regexp's bytecode

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Fri, 29 Sep 2023 02:30:02 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 66261 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 66261 <at> debbugs.gnu.org
Subject: Re: bug#66261: Disassembling a regexp's bytecode
Date: Fri, 29 Sep 2023 18:06:13 +0300
> Date: Thu, 28 Sep 2023 22:28:16 -0400
> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> - First, in order to easily use the same code between REGEX_EMACS_DEBUG
>   and my new `re--describe-compiled`, I need to print sometimes to
>   `stderr` and sometimes to a string, which I do using `open_memstream`.
>   AFAIK `open_memstream` is not directly available in Windows (and
>   maybe under some other Unixes either, tho it's in POSIX-2008, IIUC).
>   Could someone help me get an `opem_memstream` emulation working
>   (maybe via gnulib)?

Gnulib doesn't have such an emulation, AFAICT.

Why cannot you fall back to temporary files when open_memstream is not
available?

> - I'm thinking of always providing this function.  Another option would
>   be to do it under the control of a compilation flag, tho it doesn't
>   seem worth adding a new flag just for that.  I guess we could
>   reuse REGEX_EMACS_DEBUG (tho it's too invasive IMO), or
>   ENABLE_CHECKING, but I'd rather just always offer the function.
>   After all, it might encourage users to look more carefully at their
>   regexps and maybe even to help us improve our regexp engine, who knows.

I would suggest to have it under ENABLE_CHECKING first, and only
remove the condition if there's a demand.  (I assume that most people
who debug regexps build Emacs with --enable-checking.)




This bug report was last modified 1 year and 287 days ago.

Previous Next


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