My mistake: toggle_line_numbers() applies to the current window.
When executed from ~/.qe/config, it applies to a dummy window and has no lasting effect. It it debatable whether this dummy window should get the default settings for all new windows…
In the mean time, you can try and add the same line to a `.qerc` file in you home directory: it should automatically make line numbers visible when you load a new file, but they might disappear when you select another file in the same window… For work is needed for these window properties to get set to meaningful defaults when a different buffer is attached to a window, I shall think about a good solution.
Thank you for your feedback
Chqrlie.
That does not produce an error, but does not work to turn them on, either.
On Fri, Sep 2, 2022, at 4:02 PM, Charlie Gordon wrote:
There is not, but you can add a line in your ~/.qe/config file:
toggle_line_numbers();
Chqrlie
Is there a variable that will force the line numbers on at startup, either global or .qerc ? Reading variables.c doesn’t seem like there is one.
On Fri, Sep 2, 2022, at 3:39 PM, Charlie Gordon wrote:
Indeed QE_STYLE_GUTTER is the style used for the line numbers:
/* line numbers */
if (ds->line_numbers) {
ds->style = QE_STYLE_GUTTER;
display_printf(ds, -1, -1, "%6d ", line_num + 1);
ds->style = 0;
}
with a default definition of
STYLE_DEF(QE_STYLE_GUTTER, "gutter", /* #f84400 on grey25 */
QERGB(0xf8, 0x44, 0x00), QERGB(0x3f, 0x3f, 0x3f), 0, 0)
Chqrlie.
What style element name is the numbers themselves? I figured out that “gutter” is the tray the numbers are in.
On Fri, Sep 2, 2022, at 2:43 PM, Charlie Gordon wrote:
Hello Marc,
You can toggle line numbers display with the toggle-line-numbers command bound to "C-x RET l” and "C-c l”
This command can be found with the apropos command: C-h a line RET
Enjoy!
Chqrlie
Can Qemacs number lines onscreen? I realize there’s a line counter in the mode line.
|