[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46507: 26.1; bold attribute copied into enriched-mode text is not sa
From: |
Eli Zaretskii |
Subject: |
bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved |
Date: |
Sat, 13 Mar 2021 21:22:35 +0200 |
> From: Dan Hitt <dan.hitt@gmail.com>
> Date: Sat, 13 Mar 2021 10:47:23 -0800
> Cc: Tomas Nordin <tomasn@posteo.net>, 46507@debbugs.gnu.org
>
> Thanks for your work.
You are welcome.
> The debian system i originally used is unavailable, and i'm using xubuntu
> 20.04 now, emacs 26.3.
>
> Nevertheless, i would be happy to test if i can.
>
> I guess this means that i have to get a copy of your modified version of
> enriched.el, and instruct emacs to
> use that instead of /usr/share/emacs/26.3/lisp/textmodes/enriched.elc.
>
> So i need instructions on how to do all this in order to test.
Here's the patch which should fix the issue:
diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el
index c44b69c..e43370c 100644
--- a/lisp/textmodes/enriched.el
+++ b/lisp/textmodes/enriched.el
@@ -389,6 +389,8 @@ enriched-face-ans
(apply 'append (mapcar 'enriched-face-ans face)))
((let* ((fg (face-attribute face :foreground))
(bg (face-attribute face :background))
+ (weight (face-attribute face :weight))
+ (slant (face-attribute face :slant))
(props (face-font face t))
(ans (cdr (format-annotate-single-property-change
'face nil props enriched-translations))))
@@ -396,6 +398,10 @@ enriched-face-ans
(setq ans (cons (list "x-color" fg) ans)))
(unless (eq bg 'unspecified)
(setq ans (cons (list "x-bg-color" bg) ans)))
+ (if (eq weight 'bold)
+ (setq ans (cons (list "bold") ans)))
+ (if (eq slant 'italic)
+ (setq ans (cons (list "italic") ans)))
ans))))
;;;
- bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved, Tomas Nordin, 2021/03/07
- bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved, Dan Hitt, 2021/03/07
- bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved, Tomas Nordin, 2021/03/07
- bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved, Eli Zaretskii, 2021/03/07
- bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved, Dan Hitt, 2021/03/07
- bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved, Eli Zaretskii, 2021/03/08
- bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved, Eli Zaretskii, 2021/03/13
- bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved, Dan Hitt, 2021/03/13
- bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved,
Eli Zaretskii <=
- bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved, Dan Hitt, 2021/03/14
- bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved, Eli Zaretskii, 2021/03/14