From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Patch]: Allow overlay arrows to be inserted before the text at column zero rather than splatting it. Date: Sun, 18 Aug 2019 19:29:37 +0300 Message-ID: <83imqumo7i.fsf@gnu.org> References: <20190818134804.GA31509@ACM> <83mug6mtjy.fsf@gnu.org> <20190818161530.GB31509@ACM> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="105119"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 18 18:29:48 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hzO3w-000RFP-6s for ged-emacs-devel@m.gmane.org; Sun, 18 Aug 2019 18:29:48 +0200 Original-Received: from localhost ([::1]:42020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzO3v-00027Y-2s for ged-emacs-devel@m.gmane.org; Sun, 18 Aug 2019 12:29:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38295) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzO3o-00027R-Gw for emacs-devel@gnu.org; Sun, 18 Aug 2019 12:29:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hzO3o-0007b0-4C; Sun, 18 Aug 2019 12:29:40 -0400 Original-Received: from [176.228.60.248] (port=3443 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hzO3m-0004dt-UI; Sun, 18 Aug 2019 12:29:39 -0400 In-reply-to: <20190818161530.GB31509@ACM> (message from Alan Mackenzie on Sun, 18 Aug 2019 16:15:30 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239442 Archived-At: > Date: Sun, 18 Aug 2019 16:15:30 +0000 > Cc: emacs-devel@gnu.org > From: Alan Mackenzie > > > If you want the arrow be displayed before the line's text, why didn't > > you just put a before-string at the beginning of the line, instead of > > implementing this in the display engine? > > I think it was to be able to use the same interface that the overlay > arrow already uses, without having to reimplement a lot of it using > before-strings. I think it's a general consensus that the "overlay arrow" feature should be walked away of, and at some point should be deprecated. I'd prefer not to base new code on that kludge. > > AFAIU, that would give you most of the patch for free, e.g. you > > wouldn't need to mess with the set_cursor_from_row hair. > > Yes, there was set_cursor_from_row which I had to change. Somehow, only > partially initialised glyphs got into it; they pointed to lisp strings, > but with an offset of -1. This caused an error to be thrown, and the > surrounding internal_condition_case_1 reentered the redisplay code in a > loop, causing Emacs to hang. I'm not sure where they failed to get > initialised, but the function is probably better with the workaround I > put in. This might mean there's a bug in the code that generates those glyphs. One more reason not to implement this in the display code. > But it may be worthwhile to be able to use the overlay arrow > interface for "insertion type" arrows. Any particular reason why this might be worth our while? Because I don't see any. Thanks.