2

https://orgmode.org/worg/org-tutorials/org4beginners.html You can make words *bold*, /italic/, _underlined_, =code= and ~verbatim~, and, if you must, +strike-through+.

How to strikethrough a word, when writing something in org mode

my env: emacs latest, -nw mode, terminal.app, macOS

2
  • Hum... Simply put + characters around the word? But this may not work inside a terminal. And actually just now I understand this is your question actually.
    – JeanPierre
    Jul 21, 2018 at 18:57
  • that didn't work, I mean visually I couldn't see the line Jul 21, 2018 at 19:01

4 Answers 4

3

Emacs 28 (master branch as of this writing) recently gained support for emitting the necessary ECMA-48 "Select Graphic Rendition" escape sequences in order to render faces with the 'strike-through' attribute on TTY frames.

If you're running a version of Emacs 28 that includes this commit, and your terminal's termcap/terminfo database entry has the smxx capability (included in more recent xterm terminfo sources) you should be able to see +strike-through+ rendered properly in Org mode documents inside of TTY frames.

3
  • nice job whoever did it Sep 18, 2020 at 21:41
  • print -n -- '\e[9m' works on my terminal; Does it need other stuff in its terminfo as well? The 24-bit colors also need some custom terminfo, so it would be good if there was an official source that released a complete terminfo.
    – HappyFace
    Apr 20, 2021 at 17:31
  • @HappyFace: I made a custom terminfo that has both the 24-bit color entries as well as the entries for strike-through. The strike-through entries look like: smxx=\E[9m, rmxx=\E[29m,
    – spud
    Apr 21, 2021 at 16:30
1

I want to supplement JaenPierre's answer.

The evaluation of the following elisp code in the *scratch* buffer gives stricken-through text in Emacs with a GUI and non-stricken-through text in Emacs in terminal mode.

(insert (propertize "hello world" 'font-lock-face '(:strike-through t)))

On the first glance it looks like :strike-through is not supported on vt100 compatible terminals.

But in principle vt100 supports stricken-through text and the following elisp code returns (("unspecified" . unspecified) ("t" . t) ("nil")) in a vt100 compatible terminal.

(face-valid-attribute-values :strike-through)

AFAIK the cons ("t" . t) in the return value says that stricken-through text should be supported. So at the second glance it looks more like a bug in Emacs.

2
  • yay I found a bug in emacs, my first one Jul 21, 2018 at 20:58
  • @american-ninja-warrior You can try to issue a bug-report by M-x report-emacs-bug with the above information and look what the guys at [email protected] answer about the problem. Maybe I am wrong and it is not a bug but expected behavior.
    – Tobias
    Jul 21, 2018 at 21:12
0

The appearance of text in emacs is controlled by faces, describing various aspects of the display of characters. The elisp manual says:

37.12.1 Face Attributes

“Face attributes” determine the visual appearance of a face. The following table lists all the face attributes, their possible values, and their effects.

...

Some of these attributes are meaningful only on certain kinds of displays. If your display cannot handle a certain attribute, the attribute is ignored.

...

‘:strike-through’ Whether or not characters should be strike-through, and in what color.

In your case the "display" is your text terminal and it seems to not support:strike-through. I don't know if any text terminal supports it, for example xterm does not.

0

You could mark a word or a sentence and press C-c C-x C-f. After that you can select your action. If you hit the + key, that selected word or sentence will be crossed out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.