Emacs console mode. Mileage in Org mode is not displayed as expected.

I am using org-mode. Using the “+” symbol around the text, it correctly displays the graphical interface as pass-through text (example: + striked-through + ).

But this does not work in emacs console mode, the text does not appear crossed out: there is no difference with the default face.

My term knows how to display strokes as it correctly displays text with missing text with this test:

echo -e "\e[9mtest\e[0m" 

Thus, this means that emacs does not use SGR code to render text as a run.

Do you know any way to tell emacs to use punches in the console? Or is it at my end that something is not set?

+6
source share
1 answer

The virtual console (Linux) does not implement a breakthrough. Several terminal emulators do this, but they are usually not called a console. At best, emacs can display some other types of highlight, such as color.

The reference to the deleted pass sequence is ECMA-48. However, keep in mind the fact that it was created by the committee and does not constitute an existing practice. Rather, it is the basis for both existing and proposed implementations. Many of the functions described in it were not implemented (30 years later). You will not find breakdown as a standard terminfo (or termcap) feature, simply because some (if any) terminals have implemented this function. Read terminfo(5) : there is no way for this.

If you read emacs source code, it is easy to see that it does not support breakthrough. The emacs driver for term.c terminals uses termcap and lists the supported video attributes in bitmask :

 enum no_color_bit { NC_STANDOUT = 1 << 0, NC_UNDERLINE = 1 << 1, NC_REVERSE = 1 << 2, NC_ITALIC = 1 << 3, NC_DIM = 1 << 4, NC_BOLD = 1 << 5, NC_INVIS = 1 << 6, NC_PROTECT = 1 << 7 }; 

It also extracts many string capabilities using tgetstr ( see code ). There is no blow. While emacs hardcodes some of the colors slip away (to get around the termcap limitations), the driver does not contain anything that could break through.

Further reading:

+2
source

Source: https://habr.com/ru/post/970746/


All Articles