From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#46507: 26.1; bold attribute copied into enriched-mode text is not saved Date: Sat, 13 Mar 2021 21:22:35 +0200 Message-ID: <83zgz6hn9g.fsf@gnu.org> References: <87mtvf3zdz.fsf@posteo.net> <87blbu4vl2.fsf@posteo.net> <83y2eysqyr.fsf@gnu.org> <83sg55ss4o.fsf@gnu.org> <83y2eribyt.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36183"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tomasn@posteo.net, 46507@debbugs.gnu.org To: Dan Hitt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 13 20:23:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lL9qv-0009Fi-8O for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Mar 2021 20:23:09 +0100 Original-Received: from localhost ([::1]:41684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lL9qt-00061k-Qk for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Mar 2021 14:23:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lL9qo-00061O-0W for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 14:23:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49147) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lL9qn-00042T-Pp for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 14:23:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lL9qn-0005kL-KD for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 14:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Mar 2021 19:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46507 X-GNU-PR-Package: emacs Original-Received: via spool by 46507-submit@debbugs.gnu.org id=B46507.161566335622059 (code B ref 46507); Sat, 13 Mar 2021 19:23:01 +0000 Original-Received: (at 46507) by debbugs.gnu.org; 13 Mar 2021 19:22:36 +0000 Original-Received: from localhost ([127.0.0.1]:60693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lL9qO-0005jh-JR for submit@debbugs.gnu.org; Sat, 13 Mar 2021 14:22:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lL9qM-0005jV-UV for 46507@debbugs.gnu.org; Sat, 13 Mar 2021 14:22:35 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40859) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lL9qH-00040t-P4; Sat, 13 Mar 2021 14:22:29 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2260 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lL9qH-00019x-5M; Sat, 13 Mar 2021 14:22:29 -0500 In-Reply-To: (message from Dan Hitt on Sat, 13 Mar 2021 10:47:23 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:202290 Archived-At: > From: Dan Hitt > Date: Sat, 13 Mar 2021 10:47:23 -0800 > Cc: Tomas Nordin , 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)))) ;;;