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-devel@gnu.org
Subject: Re: Question about composite.c
Date: Wed, 15 Apr 2020 00:43:59 +0200	[thread overview]
Message-ID: <CAHhDRB-fB62Pzo71x1BjuGoRzd5p6G1f+aGWWXdL1zpqGjZYcw@mail.gmail.com> (raw)
In-Reply-To: <CAHhDRB_9R=cgk5gLCOzd9NHofO5xg3B_bvZyx8hcohn+5izMpw@mail.gmail.com>

Hello,

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)

Question is : is there something I should do from elisp point of view
(as a user of eros, and composition-function-table) to avoid this
problem ? I'm still not sure about the code path that I'm following to
lead to this point. :(

I'm writing this from gmail, I wasn't able to paste the file in the
editor respecting the newlines, so I pushed it in a gist... I'd prefer
the code to be archived in the mailing list, but until I find a better
mail client than gmail online one, I won't be able to do it sorry.

For the time being, it is here
https://gist.github.com/gagbo/13239f12cfd6b90cce32b1c255f2553d (325
lines long)
Feel free to paste it in the conversation if you feel it is safer.
Someday I'll stop using Gmail I suppose.

Best regards
Gerry

Le mer. 22 janv. 2020 à 09:55, Gerry Agbobada <gagbobada@gmail.com> a écrit :
>
> > Can you show examples of those, if not their exhaustive list?
>
> Between iosevka, Fira Code and Cascadia Code, ligatures that may
> happen starting with * are :
> - *
> - **
> - ***
> - */
> - *>
> - *)
>
> iosevka : https://raw.githubusercontent.com/be5invis/Iosevka/master/images/ligations.png
> FiraCode : https://github.com/tonsky/FiraCode/blob/master/showcases/all_ligatures.png
> Cascadia : https://github.com/microsoft/cascadia-code/wiki/Coding-ligature-coverage
>
> > I don't see why it would be easier to access/modify a separate table.
>
> Fair enough, I'll probably remove the indeirection once I find out
> my elisp issue
>
> > If you post a complete reproduction recipe, starting from "emacs -Q",
> > perhaps I will be able to help you understand what is the immediate
> > cause of the problem.
> > [...]
> > I think the important part is to understand why Emacs is trying to
> > compose an empty string.
>
> I'm trying to do this to understand better yes. In my "bloated" emacs
> setup, I still have the "trying to compose an empty string" issue without
> prettify-symbols-mode, so I'll just continue playing with my short .el file
> until I can find a way to properly reproduce.
>
> Gerry



  reply	other threads:[~2020-04-14 22:43 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 [this message]
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
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=CAHhDRB-fB62Pzo71x1BjuGoRzd5p6G1f+aGWWXdL1zpqGjZYcw@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.