Subject: Re: bug#51689: emacs

From: Eli Zaretskii <[email-masked]>
Date: Thu, 18 Nov 2021 09:13:04 +0200

> Date: Wed, 17 Nov 2021 22:41:11 +0100
> From: Han Boetes <[email-masked]>
> Cc: [email-masked]
> 
> > > >  features
> > > 
> > > I used c-h v features to get this output, is that what you meant? If not, please help me getting the requested information.
> > 
> > Is this in "emacs -Q -nw"?  There should be a feature defined by some
> > file from lisp/term/ loaded for the terminal support, but I see no
> > such feature.
> 
> I still don't understand how I should provide the requested features.
> Could you elaborate on that?

  . emacs -Q -nw
  . in *scratch* type "features" (without the quotes)
  . go to the end of "features", after the final 's', and type C-j
  . if the list Emacs inserts into the buffer has ellipsis in it, go
    to that ellipsis and type RET
  . post the resulting list here

> I just searched a bit further, it also happens with "emacs -nw
> some-file" when there is no .emacs file present, or if it contains only:
> 
>     (custom-set-variables)
> 
> But if that .emacs contains just one setting like this:
> 
>     (custom-set-variables '(auto-insert-mode t))
> 
> The problem is gone. Fascinating!

I think at this point only running under a debugger will help us
efficiently.  So please act according to the instructions below, and
show the backtrace it produces:

  $ cd /path/to/emacs/src/
  $ gdb ./emacs
  GNU gdb (GDB) 11.1
  Copyright (C) 2021 Free Software Foundation, Inc.
  ...
  (gdb) source ./.gdbinit
  (gdb) break Fsignal
  (gdb) commands
  Type commands for breakpoint(s) 2, one per line.
  End with a line saying just "end".
  > pp error_symbol
  > pp data
  > end
  (gdb) run -Q -nw

When the breakpoint breaks, look at the error_symbol and data printed
by GDB; if the symbol are not "void-function", type "continue" at
GDB's prompt to run Emacs further.  When you eventually get symbol as
"void-function" and data that mentions regexp-opt-group, type:

  (gdb) thread apply all bt

This should produce both C-level backtrace and Lisp-level backtrace of
all the threads in Emacs.  Please post that here in its entirety.

(I hope you have GDB installed; if not, please install it.)

Thanks.