emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] strike-through text in tables


From: Mark E. Shoulson
Subject: [PATCH] strike-through text in tables
Date: Thu, 5 Mar 2020 10:30:48 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1

Make a org-mode table.  In one of the cells of the table, have some text that is +struck out+.  Note that the struck-out text is default text color (black, for me), and not org-table text color (blue, for me).  It's even worse if you're running org-variable-pitch-mode, because the text also won't be set in a fixed-pitch face, and so will screw up the alignment of table text.  I found out why.


When org-do-emphasis-faces constructs the new face that it applies to the text, it passes the lookup value from the org-emphasis-alist to font-lock-prepend-text-property, which makes a list, composing it with the existing face.  This would fail for strike-though mode in a table, since the org-emphasis-alist lookup would return (:strike-through t), resulting in a face of (:strike-through t org-table), which is an invalid face, and then emacs has no choice but to render it unfaced.


Attaching a patch for the issue.  Rather than try to figure out how to make org-do-emphasis-faces somehow smart enough to deal with this situation (I'm not sure it's possible, in general), I took the easy way out and defined an org-strike-through face which can be used in org-empasis-alist.


Humbly submitted for your approval...


~mark

Attachment: 0001-org-faces.el-Add-org-strike-through-face.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]