From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Question about composite.c Date: Sat, 25 Apr 2020 15:44:06 +0300 Message-ID: <83zhaz7n1l.fsf@gnu.org> References: <83r1zsvfph.fsf@gnu.org> <83muagvcwg.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="109280"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Gerry Agbobada Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 25 14:45:10 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jSKBC-000SJE-87 for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Apr 2020 14:45:10 +0200 Original-Received: from localhost ([::1]:36336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSKBB-0003aQ-82 for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Apr 2020 08:45:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44896) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSKAN-0002r9-BV for emacs-devel@gnu.org; Sat, 25 Apr 2020 08:44:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54019) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSKAN-0004vX-34; Sat, 25 Apr 2020 08:44:19 -0400 Original-Received: from [176.228.60.248] (port=2609 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jSKAL-0003ok-LU; Sat, 25 Apr 2020 08:44:18 -0400 In-Reply-To: (message from Gerry Agbobada on Wed, 15 Apr 2020 00:43:59 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:247771 Archived-At: > From: Gerry Agbobada > 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?