From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Gallagher - NOAA Affiliate via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50506: 28.0.50; display-line-numbers equivalent for linum-format? Date: Mon, 13 Sep 2021 12:17:09 -0600 Message-ID: References: <87czpgc1yb.fsf@noaa.gov> <83fsucipdz.fsf@gnu.org> <87tuirnwu0.fsf@gnus.org> <83sfy8cpvz.fsf@gnu.org> Reply-To: Michael Gallagher - NOAA Affiliate Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000050406405cbe47b67" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1677"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50506@debbugs.gnu.org, Lars Ingebrigtsen To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 13 20:19:26 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 1mPqY9-0000H8-1t for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 20:19:25 +0200 Original-Received: from localhost ([::1]:41800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPqY7-0004oN-JN for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 14:19:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPqXm-0004o9-Lw for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 14:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35262) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPqXm-0004wG-E6 for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 14:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPqXm-0005w3-AI for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 14:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Gallagher - NOAA Affiliate Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Sep 2021 18:19: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.163155708722726 (code B ref 50506); Mon, 13 Sep 2021 18:19:02 +0000 Original-Received: (at 50506) by debbugs.gnu.org; 13 Sep 2021 18:18:07 +0000 Original-Received: from localhost ([127.0.0.1]:46798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPqWt-0005uU-CY for submit@debbugs.gnu.org; Mon, 13 Sep 2021 14:18:07 -0400 Original-Received: from mail-pl1-f170.google.com ([209.85.214.170]:41633) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPqWd-0005tW-F8 for 50506@debbugs.gnu.org; Mon, 13 Sep 2021 14:18:06 -0400 Original-Received: by mail-pl1-f170.google.com with SMTP id v2so2484430plp.8 for <50506@debbugs.gnu.org>; Mon, 13 Sep 2021 11:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=noaa.gov; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZR1F9aAl1ndtNVdwNsIne04nhk/MqDz7A4kKGREBdHk=; b=MK+xlSEglrsNPhggZcwMCnmZY5/sohUpKsAsCgRmAZpqPdNXsCy/7UFbI0+UzG17P9 nTqe3/7t5jBO1WsLTPpNs6YTvwRfirpBlwuhm/Q3nopqpmAi96ADHpkvPjfkTLbb5Msx +sOibgr5CAeAEHBPMvHmJzN01aCzqmgM66Kao8Fljy5sPo1U7uxTtfAUDo580bxgPm35 giibLDrA0AGx6kk8g/QAomYE9yLmoWitNwvNRULeCeePC8tvbyDL05ri5sghUcpp3owu fJr7G0do9huWG1QZg3KrgFJxmFF5GPc8slzZ8BiUCA4Koqo5zZSDPFnHXI1AMK/K4r+U RiJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZR1F9aAl1ndtNVdwNsIne04nhk/MqDz7A4kKGREBdHk=; b=tUI5gj4Fg1tklCnV5EP8vMNP5PdbWQ1LtGoTugldL7/++mJMMFbEkcA1H/MUU+gCIN I2wUR/7AGvVURAnlQg0yA6WdO7GS41vcvbUnjoun5ncWgbPq4KVqIO1eTIt5ZRf4aUqk 9tbuUrQXZJ0T2PeOp+Zd0dCLogDpluLrozIzYeEnpbB2I2FYljJA52fqH0c/wnuiB5iI wXlWGBU5VZ4amKDViAFlD15rx+Y+vw89ir6ziLEVFFAB724StZJNj0lm9+FwpoU4O/J9 +8WSMR5C308uZgyUmWbXsMONauxiYi+L56p7tgOoPr2A02QG7l/i3kuQEJk5k/KA5wZc d1Og== X-Gm-Message-State: AOAM5317ZGyxDiFVan4RI+EMCcdW37uK3ms1OGLQzCC+aP0ThIkHKOnX RbH2ak1woEe8BVwftq+g34sCqxHIiBr2OMyzrvOyGg== X-Google-Smtp-Source: ABdhPJxp8jzOcTzxzR0Hdxbo18HTQdoFcmSPc5y15WlIm1pl1PJZaWzm2YttvnJSPDo8IJmD1tRPH21jjg5TihqcefU= X-Received: by 2002:a17:90a:ec17:: with SMTP id l23mr956435pjy.142.1631557065362; Mon, 13 Sep 2021 11:17:45 -0700 (PDT) In-Reply-To: <83sfy8cpvz.fsf@gnu.org> 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:214249 Archived-At: --00000000000050406405cbe47b67 Content-Type: text/plain; charset="UTF-8" Funny enough, that's *exactly* what I tried to do, but I ran into problems getting the variable to display in customize-variable (a problem with what I put in cus-start.el?) and if I manually used setq it didn't seem to get translated correctly by the way I coded the macro. However, I'll try again next weekend and maybe you'll see a pull request from me sometime. Michael On Mon, Sep 13, 2021 at 12:05 PM Eli Zaretskii wrote: > > 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. > -- Michael Gallagher, PhD CIRES Research Scientist Polar Observations and Processes Team (ESRL/NOAA/PSD) 325 Broadway, Boulder, Colorado 80305 --00000000000050406405cbe47b67 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Funny enough, that's *exactly* what I tried to do= , but I ran into problems getting the variable to display in customize-vari= able (a problem with what I put in cus-start.el?) and if I manually used se= tq it didn't seem to get translated correctly by the way I coded the ma= cro.

However, I'll try again next weekend= and maybe you'll see a pull request from me sometime.
<= br>
Michael

On Mon, Sep 13, 2021 at 12:05 PM Eli Zaretsk= ii <eliz@gnu.org> wrote:
> From: Michael Galla= gher - NOAA Affiliate <michael.r.gallagher@noaa.gov>
> Date: Mon, 13 Sep 2021 11:54:59 -0600
> Cc: Eli Zaretskii <eliz@gnu.org>, 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 befo= re the numbers are displayed.
> However, when I tried to hook that into the lisp code and add a variab= le 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 c= ould 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.=C2=A0 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.


--
Michael Gallagher, PhD
CIRES Research Scientist
<= /div>
Polar Obser= vations and Processes Team (ESRL/NOAA/PSD)
325 Broadway, Boulder, Colorado 80305
--00000000000050406405cbe47b67--