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: Mon, 13 Sep 2021 21:05:36 +0300 Message-ID: <83sfy8cpvz.fsf@gnu.org> References: <87czpgc1yb.fsf@noaa.gov> <83fsucipdz.fsf@gnu.org> <87tuirnwu0.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18777"; 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 Mon Sep 13 20:06:36 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 1mPqLk-0004dF-IX for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 20:06:36 +0200 Original-Received: from localhost ([::1]:35886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPqLj-0000Yc-CP for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 14:06:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPqLC-0000Ac-P4 for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 14:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPqLC-0004XD-H2 for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 14:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPqLC-0005dA-B4 for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 14:06: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: Mon, 13 Sep 2021 18:06: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.163155635621631 (code B ref 50506); Mon, 13 Sep 2021 18:06:02 +0000 Original-Received: (at 50506) by debbugs.gnu.org; 13 Sep 2021 18:05:56 +0000 Original-Received: from localhost ([127.0.0.1]:46780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPqL5-0005cp-NH for submit@debbugs.gnu.org; Mon, 13 Sep 2021 14:05:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPqL3-0005ca-SL for 50506@debbugs.gnu.org; Mon, 13 Sep 2021 14:05:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49916) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPqKw-0004LR-Gz; Mon, 13 Sep 2021 14:05:46 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3498 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 1mPqKv-0007tI-Mi; Mon, 13 Sep 2021 14:05:46 -0400 In-Reply-To: (message from Michael Gallagher - NOAA Affiliate on Mon, 13 Sep 2021 11:54:59 -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:214248 Archived-At: > From: Michael Gallagher - NOAA Affiliate > Date: Mon, 13 Sep 2021 11:54:59 -0600 > Cc: Eli Zaretskii , 50506@debbugs.gnu.org > > Eli, as far as your suggestions, these requirements make sense to me. I took a crack at modifying xdisp.c > and was able to display ascii characters by appending to lnum_buf before the numbers are displayed. > However, when I tried to hook that into the lisp code and add a variable so that it wouldn't be hardcoded (a > must, of course) I fell flat on my face. Converting between character lisp variables to the appropriate C types > is above my "undergrad CSCI refresher" pay grade. I wish I could be more helpful but if I were to be the one > to submit a pull request I would probably need someone to hold my hand. It's not too complicated. A character is just an integer in Emacs, and the way to get a C integer from a Lisp integer is by using the XFIXNAT macro. Look for the code which handles display-fill-column-indicator-mode, in particular how it takes the indicator character from Vdisplay_fill_column_indicator_character and adds it to a screen line. What you need to do is very similar.