tecosaur / engrave-faces

Mirror of https://code.tecosaur.net/tec/engrave-faces
GNU General Public License v3.0
98 stars 5 forks source link

Fails to map the color "magenta" #19

Open nemethf opened 1 month ago

nemethf commented 1 month ago

Let's have a buffer with the content of /tmp/a.sh :

#!/bin/bash
echo $(date)

Here M-x engrave-faces-latex-buffer results in:

\color{EFD}\EFcd{\#}\EFc{!/bin/}\EFk{bash}
\EFb{echo} \$(\textcolor[HTML]{agenta}{date})

Note the missing "m" in the color name "agenta". The tex command should be something like \textcolor{magenta}{date}.

To reproduce the issue, it is enough to start from:

emacs -Q \
  -l ~/.emacs.d/elpa/engrave-faces-0.3.1/engrave-faces.elc \
  -l ~/.emacs.d/elpa/engrave-faces-0.3.1/engrave-faces-latex.elc \
  -l cl-extra \
  /tmp/a.sh

This is with "GNU Emacs 28.2" and "GNU Emacs 31.0.50".

Thanks.

tecosaur commented 1 month ago

That's a funky issue! Thanks for raising this, I'll try to reproduce it when I get a few moments spare.

nemethf commented 4 weeks ago

C-u C-x = on "date" shows that it has a face property of sh-quoted-exec, which is not in the default engrave-face-themes. The latest release of engrave-face handles this situation poorly as the original bug report demonstrated. However, it seems commit e541cf4366 fixed this issue.

Would it be possible to push a new version containing this fix to GNU ELPA? Thank you.