all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 19846@debbugs.gnu.org, acm@muc.de
Subject: bug#19846: 25.0.50; Problem with auto-fill-mode and C mode
Date: Sun, 1 May 2022 11:35:56 +0000	[thread overview]
Message-ID: <Ym5wnNUf/qHOVi9F__9013.94075933553$1651405117$gmane$org@ACM> (raw)
In-Reply-To: <87a6c1pnt1.fsf@gnus.org>

Hello, Lars.

On Sun, May 01, 2022 at 12:08:58 +0200, Lars Ingebrigtsen wrote:
> martin rudalics <rudalics@gmx.at> writes:

> > Here the impact is felt immediately, probably because of the way I build
> > Emacs.  Inserting 72 spaces doesn't make much sense anyway, so this is
> > not what's bothering me.  But here inserting _any_ character with auto
> > filling turned on is a pain.  I'm usually typing 2 to 3 characters ahead
> > of what I see on screen.

> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)

> I tried reproducing this, but inserting characters normally in that doc
> string seems to be quite speedy.  It's not until I have about two
> hundred spaces at the start of the line that I start seeing hangs.

You've got a fast machine, perhaps.  :-)

> Are you still seeing these issues in recent Emacs versions?

I still see them.  What's more, I know exactly what's causing the hangs.

In forward-paragraph, a regular expression is formed by concatenating
the major mode's paragraph-start and paragraph-separate with a few other
things.  In CC Mode (at least), this gives rise to ill-formed regexps
with adjacent sub-expressions which each can match the empty string, or
arbitrary numbers of spaces.

When there fails to be a match, the regexp engine tries in every
possible way to find a match, and thus failing to find one takes a long
time.

I started work on a library to fix ill-formed regexps in 2015, and after
a long gap, recently re-started work on it.  Although there is still
quite a bit to do on it, I can see my way to finishing it.  This would
fix the cause of the bug properly.  Perhaps I may be able to make the
current state available on a git branch under scratch "soon".

So, can you leave this bug open, please?

> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2022-05-01 11:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 18:37 bug#19846: 25.0.50; Problem with auto-fill-mode and C mode martin rudalics
2015-02-13 17:07 ` Stefan Monnier
     [not found] ` <jwv4mqp91vo.fsf-monnier+emacsbugs@gnu.org>
2015-02-13 18:27   ` martin rudalics
     [not found] ` <mailman.19768.1423766347.1147.bug-gnu-emacs@gnu.org>
2015-02-14 11:48   ` Alan Mackenzie
2015-02-14 16:31     ` Alan Mackenzie
2015-02-14 18:21     ` martin rudalics
2022-05-01 10:08       ` Lars Ingebrigtsen
2022-05-01 11:35         ` Alan Mackenzie [this message]
     [not found]         ` <Ym5wnNUf/qHOVi9F@ACM>
2022-05-01 11:44           ` Lars Ingebrigtsen
2022-05-01 14:53             ` Alan Mackenzie
2022-05-01 14:55               ` Lars Ingebrigtsen

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='Ym5wnNUf/qHOVi9F__9013.94075933553$1651405117$gmane$org@ACM' \
    --to=acm@muc.de \
    --cc=19846@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /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.