From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50506: 28.0.50; display-line-numbers equivalent for linum-format? Date: Wed, 15 Sep 2021 19:53:30 +0300 Message-ID: <83a6kdbx11.fsf@gnu.org> References: <87czpgc1yb.fsf@noaa.gov> <83fsucipdz.fsf@gnu.org> <87tuirnwu0.fsf@gnus.org> <83sfy8cpvz.fsf@gnu.org> <83pmtccovd.fsf@gnu.org> <834kancb73.fsf@gnu.org> <83ilz1bzyx.fsf@gnu.org> <83ee9pby9t.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21811"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50506@debbugs.gnu.org, larsi@gnus.org To: Michael Gallagher - NOAA Affiliate Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 15 19:08:58 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mQYP3-0005MY-Ue for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Sep 2021 19:08:57 +0200 Original-Received: from localhost ([::1]:32792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQYP2-0002tk-Vd for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Sep 2021 13:08:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQYAd-0002ss-7J for bug-gnu-emacs@gnu.org; Wed, 15 Sep 2021 12:54:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQYAc-0006nw-VA for bug-gnu-emacs@gnu.org; Wed, 15 Sep 2021 12:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQYAc-0003rV-Kx for bug-gnu-emacs@gnu.org; Wed, 15 Sep 2021 12:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Sep 2021 16:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50506 X-GNU-PR-Package: emacs Original-Received: via spool by 50506-submit@debbugs.gnu.org id=B50506.163172482614723 (code B ref 50506); Wed, 15 Sep 2021 16:54:02 +0000 Original-Received: (at 50506) by debbugs.gnu.org; 15 Sep 2021 16:53:46 +0000 Original-Received: from localhost ([127.0.0.1]:53145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQYAL-0003pN-L8 for submit@debbugs.gnu.org; Wed, 15 Sep 2021 12:53:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQYAG-0003ow-1S for 50506@debbugs.gnu.org; Wed, 15 Sep 2021 12:53:44 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43624) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQYAA-0006Pw-HM; Wed, 15 Sep 2021 12:53:34 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1680 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQYAA-0006jn-4n; Wed, 15 Sep 2021 12:53:34 -0400 In-Reply-To: (message from Michael Gallagher - NOAA Affiliate on Wed, 15 Sep 2021 10:45:01 -0600) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:214416 Archived-At: > From: Michael Gallagher - NOAA Affiliate > Date: Wed, 15 Sep 2021 10:45:01 -0600 > Cc: Lars Ingebrigtsen , 50506@debbugs.gnu.org > > So, in concept then, as the display-line-numbers code operates now adding a separator character that > respects direction isn't possible because when maybe_produce_line_number is called the code doesn't yet > know the direction of the text. The correct fix is to somehow have the function call for generating the line > number glyphs after the buffer glyphs are computed... or to generate both L2R and R2L line numbers and > then let the code decide what to display once reversed_p is decided. Yes. > This is verified by the fact that if I make a check on paragraph_direction instead of embedding, the first line > number displays incorrectly because this flag has yet to be set. Exactly. > Either way, I hate to admit it, but any solution to that problem is way beyond my skillset and you'd have to > spend a lot of time checking/fixing any my work if I did make the attempt. The idea I had, which is somewhat ugly, is to rearrange the glyphs in the line-number part if the value of the reversed_p flag changes between the time the line number was produced and the time the first following glyph is produced in display_line.