all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gerry Agbobada <gagbobada@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Question about composite.c
Date: Sat, 25 Apr 2020 15:29:45 +0200	[thread overview]
Message-ID: <CAHhDRB9ssNpuRbU8ttiVRRw0GGuU84oiG7qKqRMeSzpEceVchQ@mail.gmail.com> (raw)
In-Reply-To: <CAHhDRB-rSGoNUr1czyX6EfoSRTFFEpcT0o5sXhp_BWqGDuTEdg@mail.gmail.com>

I cannot reproduce the bug even with my complex example on master, but
still can reproduce it on 05089a4d (tip of emacs-27 last week).

Bissecting will take a while but I'll try to find what commit changed
the behaviour so I can understand a bit more.

Gerry AGBOBADA

Le sam. 25 avr. 2020 à 15:06, Gerry Agbobada <gagbobada@gmail.com> a écrit :
>
> > Is the overlay a necessary part of the problem?
> Yes, because it's the overlay that tries to print a composed "=>" combination.
>
>
> > Also, is it necessaryto define a separate char-table, instead of using
> > composition-function-table?
> > The example looks quite complex, and I wonder whether you could
> > prepare a simplified variant that only included the parts that are
> > necessary?  That would make debugging this issue much easier.
> I agree that it might still be a little complex. I'll try to work on
> this again to provide
> the minimum amount of basic elisp functions code, but it's a little hard for me
> to pindown the exact issue so I'm just making baby steps for the moment.
>
> > From this, I don't think I understand why the problem is triggered by
> > a '+' character.  If I do the following in "emacs -Q":
> The problem is not triggered by the '+' character but by eros-mode
> which will try to
> output an overlay on the cursor with the content "=> 5".
>
> > In what version of Emacs do you see these infloops, btw?
> I was at e1f0e0892 (tip of emacs-27 on Wed Mar 25 21:54:21 2020 +0200 )
> I will build from master right now to continue the investigation.
>
> Thanks for your time answering me
>
> Gerry AGBOBADA
>
> Le sam. 25 avr. 2020 à 14:44, Eli Zaretskii <eliz@gnu.org> a écrit :
> >
> > > From: Gerry Agbobada <gagbobada@gmail.com>
> > > Date: Wed, 15 Apr 2020 00:43:59 +0200
> > > Cc: emacs-devel@gnu.org
> > >
> > > It took me a good while, but I found a case where :
> > > - I can reproduce with =emacs -q=  (Reproducing infinite looping in
> > > composition_get_gstring with an empty non-nil string)
> > > - prettify-symbols-mode is not enabled
> > >
> > > The example includes the code of eros.el package, which creates an
> > > overlay when calling eval-last-sexp. The overlay is supposed to start
> > > with `=>`, and when I have this in my composition-function-table it
> > > triggers the loop.
> > > As explained in the file linked below, with the cursor on `(+ 3 2)|`
> > > I'd expect `C-x C-e` to create an overlay with `=> 5`. Instead, it
> > > loops indefinitely and the only way out is to kill -9 emacs (kill
> > > -USR2 doesn't help)
> >
> > Is the overlay a necessary part of the problem?  Also, is it necessary
> > to define a separate char-table, instead of using
> > composition-function-table?
> >
> > The example looks quite complex, and I wonder whether you could
> > prepare a simplified variant that only included the parts that are
> > necessary?  That would make debugging this issue much easier.
> >
> > > (let ((alist
> > >        '(
> > >          (?= . "=>") ; Matches =>
> > >          )))
> > >   (dolist (char-regexp alist)
> > >     (set-char-table-range other-composition-ligature-table (car char-regexp)
> > >                           `([,(cdr char-regexp) 0 font-shape-gstring]))))
> > >
> > > (set-char-table-parent other-composition-ligature-table composition-function-table)
> > >
> > > (setq-local composition-function-table other-composition-ligature-table)
> >
> > From this, I don't think I understand why the problem is triggered by
> > a '+' character.  If I do the following in "emacs -Q":
> >
> >   (set-char-table-range composition-function-table
> >                         #x3d
> >                         (list (vector "=>" 0 'compose-gstring-for-graphic)))
> >
> > and then type (+ 2 3)C-x C-e, I don't get any loop, and no characters
> > related to the => ligatures anywhere.  What am I missing?
> >
> > In what version of Emacs do you see these infloops, btw?



  reply	other threads:[~2020-04-25 13:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20 22:17 Question about composite.c Gerry Agbobada
2020-01-21 18:15 ` Eli Zaretskii
2020-01-21 18:57   ` Gerry Agbobada
2020-01-21 19:15     ` Eli Zaretskii
2020-01-22  8:55       ` Gerry Agbobada
2020-04-14 22:43         ` Gerry Agbobada
2020-04-15  1:10           ` Noam Postavsky
2020-04-15  7:39             ` Gerry Agbobada
2020-04-25 12:44           ` Eli Zaretskii
2020-04-25 13:06             ` Gerry Agbobada
2020-04-25 13:29               ` Gerry Agbobada [this message]
2020-04-25 13:53                 ` Gerry Agbobada
2020-04-25 15:23                   ` Eli Zaretskii
2020-04-25 15:32                     ` Gerry Agbobada

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=CAHhDRB9ssNpuRbU8ttiVRRw0GGuU84oiG7qKqRMeSzpEceVchQ@mail.gmail.com \
    --to=gagbobada@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.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.