Re: Line Numbers

Charlie Gordon <[email protected]> Sat, 3 Sep 2022 01:02:22 +0200
Newsgroups gmane.editors.qemacs.devel
Message-ID <[email protected]>
--Apple-Mail=_2588167D-39E7-4E59-8612-6996677F4DD1
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

There is not, but you can add a line in your ~/.qe/config file:

toggle_line_numbers();

Chqrlie

> On 3 Sep 2022, at 00:46, Marc Wilson <[email protected]> wrote:
>=20
> Is there a variable that will force the line numbers on at startup, =
either global or .qerc ?  Reading variables.c doesn=E2=80=99t seem like =
there is one.
>=20
> --=20
> Marc Wilson
> [email protected] <mailto:[email protected]>
>=20
>=20
> On Fri, Sep 2, 2022, at 3:39 PM, Charlie Gordon wrote:
>> Indeed QE_STYLE_GUTTER is the style used for the line numbers:
>>=20
>>     /* line numbers */
>>     if (ds->line_numbers) {
>>         ds->style =3D QE_STYLE_GUTTER;
>>         display_printf(ds, -1, -1, "%6d  ", line_num + 1);
>>         ds->style =3D 0;
>>     }
>>=20
>> with a default definition of
>>=20
>>     STYLE_DEF(QE_STYLE_GUTTER, "gutter", /* #f84400 on grey25 */
>>               QERGB(0xf8, 0x44, 0x00), QERGB(0x3f, 0x3f, 0x3f), 0, 0)
>>=20
>> Chqrlie.
>>=20
>>> On 3 Sep 2022, at 00:34, Marc Wilson <[email protected] =
<mailto:[email protected]>> wrote:
>>>=20
>>> What style element name is the numbers themselves?  I figured out =
that =E2=80=9Cgutter=E2=80=9D is the tray the numbers are in.
>>>=20
>>> --=20
>>> Marc Wilson
>>> [email protected] <mailto:[email protected]>
>>>=20
>>>=20
>>> On Fri, Sep 2, 2022, at 2:43 PM, Charlie Gordon wrote:
>>>> Hello Marc,
>>>>=20
>>>> You can toggle line numbers display with the toggle-line-numbers =
command bound to "C-x RET l=E2=80=9D and "C-c l=E2=80=9D
>>>>=20
>>>> This command can be found with the apropos command: C-h a line RET
>>>>=20
>>>> Enjoy!
>>>>=20
>>>> Chqrlie
>>>>=20
>>>>> On 2 Sep 2022, at 20:15, Marc Wilson <[email protected] =
<mailto:[email protected]>> wrote:
>>>>>=20
>>>>> Can Qemacs number lines onscreen?  I realize there=E2=80=99s a =
line counter in the mode line.
>>>>>=20
>>>>> --=20
>>>>> Marc Wilson
>>>>> [email protected] <mailto:[email protected]>

--Apple-Mail=_2588167D-39E7-4E59-8612-6996677F4DD1
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">There is not, but you can add a line in your ~/.qe/config =
file:<div class=3D""><br class=3D""></div><div =
class=3D"">toggle_line_numbers();</div><div class=3D""><br =
class=3D""></div><div class=3D"">Chqrlie</div><div class=3D""><br =
class=3D""><div><blockquote type=3D"cite" class=3D""><div class=3D"">On =
3 Sep 2022, at 00:46, Marc Wilson &lt;<a =
href=3D"mailto:[email protected]" class=3D"">[email protected]</a>&gt; =
wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div =
style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D"">Is =
there a variable that will force the line numbers on at startup, either =
global or .qerc ? &nbsp;Reading variables.c doesn=E2=80=99t seem like =
there is one.</div><div style=3D"font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px;" class=3D""><br class=3D""></div><div =
id=3D"sig39065985" style=3D"font-family: Helvetica; font-size: 12px; =
font-style: normal; font-variant-caps: normal; font-weight: normal; =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px;" class=3D""><div =
class=3D"signature">--&nbsp;<br class=3D""></div><div =
class=3D"signature">Marc Wilson<br class=3D""></div><div =
class=3D"signature"><a href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a><br class=3D""></div></div><div =
style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><br=
 class=3D""></div><div style=3D"font-family: Helvetica; font-size: 12px; =
font-style: normal; font-variant-caps: normal; font-weight: normal; =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px;" class=3D""><br class=3D""></div><div =
style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D"">On =
Fri, Sep 2, 2022, at 3:39 PM, Charlie Gordon wrote:<br =
class=3D""></div><blockquote type=3D"cite" id=3D"qt" style=3D"font-family:=
 Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: normal; letter-spacing: normal; orphans: auto; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; =
-webkit-text-stroke-width: 0px; word-wrap: break-word;" class=3D""><div =
class=3D"">Indeed QE_STYLE_GUTTER is the style used for the line =
numbers:<br class=3D""></div><div class=3D"qt-"><br class=3D""></div><div =
class=3D"qt-"><div class=3D"qt-">&nbsp; &nbsp; /* line numbers */<br =
class=3D""></div><div class=3D"qt-">&nbsp; &nbsp; if =
(ds-&gt;line_numbers) {<br class=3D""></div><div class=3D"qt-">&nbsp; =
&nbsp; &nbsp; &nbsp; ds-&gt;style =3D QE_STYLE_GUTTER;<br =
class=3D""></div><div class=3D"qt-">&nbsp; &nbsp; &nbsp; &nbsp; =
display_printf(ds, -1, -1, "%6d &nbsp;", line_num + 1);<br =
class=3D""></div><div class=3D"qt-">&nbsp; &nbsp; &nbsp; &nbsp; =
ds-&gt;style =3D 0;<br class=3D""></div><div class=3D"qt-">&nbsp; &nbsp; =
}<br class=3D""></div><div class=3D"qt-"><br class=3D""></div><div =
class=3D"qt-">with a default definition of<br class=3D""></div><div =
class=3D"qt-"><br class=3D""></div><div class=3D"qt-"><div =
class=3D"qt-">&nbsp; &nbsp; STYLE_DEF(QE_STYLE_GUTTER, "gutter", /* =
#f84400 on grey25 */<br class=3D""></div><div class=3D"qt-">&nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QERGB(0xf8, 0x44, 0x00), =
QERGB(0x3f, 0x3f, 0x3f), 0, 0)<br class=3D""></div></div><div =
class=3D"qt-"><br class=3D""></div><div class=3D"qt-">Chqrlie.<br =
class=3D""></div><div class=3D"qt-"><br class=3D""></div><div =
class=3D""><blockquote type=3D"cite" class=3D"qt-"><div class=3D"qt-">On =
3 Sep 2022, at 00:34, Marc Wilson &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"qt-">[email protected]</a>&gt; wrote:<br class=3D""></div><div =
class=3D""><br class=3D""></div><div class=3D"qt-"><div class=3D"qt-" =
style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">What style =
element name is the numbers themselves? &nbsp;I figured out that =
=E2=80=9Cgutter=E2=80=9D is the tray the numbers are in.<br =
class=3D""></div><div class=3D"qt-" style=3D"font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant-caps: normal; =
font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br =
class=3D""></div><div id=3D"qt-sig39065985" class=3D"qt-" =
style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div =
class=3D"qt-signature">--&nbsp;<br class=3D""></div><div =
class=3D"qt-signature">Marc Wilson<br class=3D""></div><div =
class=3D"qt-signature"><a href=3D"mailto:[email protected]" =
class=3D"qt-">[email protected]</a><br class=3D""></div></div><div =
class=3D"qt-" style=3D"font-family: Helvetica; font-size: 12px; =
font-style: normal; font-variant-caps: normal; font-weight: normal; =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px;"><br class=3D""></div><div class=3D"qt-" =
style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br =
class=3D""></div><div class=3D"qt-" style=3D"font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant-caps: normal; =
font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Fri, Sep 2, 2022, =
at 2:43 PM, Charlie Gordon wrote:<br class=3D""></div><blockquote =
type=3D"cite" id=3D"qt-qt" class=3D"qt-" style=3D"font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word;"><div class=3D"qt-qt-">Hello Marc,<br class=3D""></div><div =
class=3D"qt-qt-"><br class=3D""></div><div class=3D"qt-qt-">You can =
toggle line numbers display with the toggle-line-numbers command bound =
to "C-x RET l=E2=80=9D and "C-c l=E2=80=9D<br class=3D""></div><div =
class=3D"qt-qt-"><br class=3D""></div><div class=3D"qt-qt-">This command =
can be found with the apropos command: C-h a line RET<br =
class=3D""></div><div class=3D"qt-qt-"><br class=3D""></div><div =
class=3D"qt-qt-">Enjoy!<br class=3D""></div><div class=3D"qt-qt-"><br =
class=3D""></div><div class=3D"qt-qt-">Chqrlie<br class=3D""></div><div =
class=3D"qt-qt-"><div class=3D"qt-"><br class=3D""></div><div =
class=3D"qt-qt-"><div class=3D"qt-"><blockquote type=3D"cite" =
class=3D"qt-qt-"><div class=3D"qt-qt-">On 2 Sep 2022, at 20:15, Marc =
Wilson &lt;<a href=3D"mailto:[email protected]" =
class=3D"qt-qt-">[email protected]</a>&gt; wrote:<br =
class=3D""></div><div class=3D"qt-"><br class=3D""></div><div =
class=3D"qt-qt-"><div class=3D"qt-qt-" style=3D"font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant-caps: normal; =
font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px;">Can Qemacs number =
lines onscreen? &nbsp;I realize there=E2=80=99s a line counter in the =
mode line.<br class=3D""></div><div class=3D"qt-qt-" style=3D"font-family:=
 Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br =
class=3D""></div><div id=3D"qt-qt-sig39065985" class=3D"qt-qt-" =
style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div =
class=3D"qt-qt-signature">--&nbsp;<br class=3D""></div><div =
class=3D"qt-qt-signature">Marc Wilson<br class=3D""></div><div =
class=3D"qt-qt-signature"><a href=3D"mailto:[email protected]" =
class=3D"qt-qt-">[email protected]</a></div></div></div></blockquote></di=
v></div></div></blockquote></div></blockquote></div></div></blockquote></d=
iv></blockquote></div><br class=3D""></div></body></html>=

--Apple-Mail=_2588167D-39E7-4E59-8612-6996677F4DD1--