From unknown Tue Jun 17 20:18:19 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#19903 <19903@debbugs.gnu.org> To: bug#19903 <19903@debbugs.gnu.org> Subject: Status: 24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"' Reply-To: bug#19903 <19903@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:18:19 +0000 retitle 19903 24.4; Emacs fails to save enriched buffer with error message = `wrong-type-argument symbolp "bold"' reassign 19903 emacs submitter 19903 Jorge severity 19903 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 19 12:52:35 2015 Received: (at submit) by debbugs.gnu.org; 19 Feb 2015 17:52:35 +0000 Received: from localhost ([127.0.0.1]:48865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOVH7-0005cZ-Hq for submit@debbugs.gnu.org; Thu, 19 Feb 2015 12:52:34 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37091) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOUhc-0004kV-GT for submit@debbugs.gnu.org; Thu, 19 Feb 2015 12:15:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOUha-000315-9h for submit@debbugs.gnu.org; Thu, 19 Feb 2015 12:15:52 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOUha-00030q-4W for submit@debbugs.gnu.org; Thu, 19 Feb 2015 12:15:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOUhX-0002rK-VB for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 12:15:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOUhS-0002pQ-U7 for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 12:15:47 -0500 Received: from mail-lb0-x231.google.com ([2a00:1450:4010:c04::231]:39563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOUhS-0002mh-Eb for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 12:15:42 -0500 Received: by lbvn10 with SMTP id n10so1152291lbv.6 for ; Thu, 19 Feb 2015 09:15:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=vNRouNCGH+oG8Ih8pchvuUWQWqEIkIYy9waQoUaHPew=; b=aKYllmYpKgSRQW00qs277kODqRtdTR3rQj/maSqTHQI93rTW4zQp9eq+pB/63X4GXj sqH7JviYZZdUr1Xps0McegKO1dJN1w/v2rflBqRBYFqIlcIhpN+yV5SyfEVy9efmoPK4 E7qSjaIts/aE+HYOEjn0oU/V8DWpomitp5dcYFE2uI4+KGE0ljvbfl5kjvKUhbXvmq0P k1gfM+M6yCrh+OTGN4tYwlR/2fVWwvD+gtJPP1co1AA+FBtFagLIGSEt+0+MdqwLbNx+ +Rpql8Zvk5Djd3uNGoaYKATFHBaQUdRXSgbW4C//6K+3V3s9jO9LZ0b23w75GlGUBIBO lbtw== MIME-Version: 1.0 X-Received: by 10.152.37.69 with SMTP id w5mr1089375laj.15.1424366140944; Thu, 19 Feb 2015 09:15:40 -0800 (PST) Received: by 10.152.230.98 with HTTP; Thu, 19 Feb 2015 09:15:40 -0800 (PST) Date: Thu, 19 Feb 2015 15:15:40 -0200 X-Google-Sender-Auth: 0kIN3TfIbJIlhuMkrTZ3LD_EXAk Message-ID: Subject: 24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"' From: Jorge To: bug-gnu-emacs@gnu.org Content-Type: multipart/mixed; boundary=089e0160ac88dccdfd050f74159a X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 19 Feb 2015 12:52:32 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e0160ac88dccdfd050f74159a Content-Type: text/plain; charset=UTF-8 Download the attached files to the same directory. In GNU Bash, with that directory current, run emacs -Q --script bug_script.el &> bug_output.txt I ran the above command for emacs versions 24.4.1 and 24.4.90. The output is in `bug_output_24.4.1.txt' and `bug_output_24.4.90.txt' respectively. The bug manifests in both tested Emacs versions. To compose the initial draft of this bug report, I ran emacs -Q -l bug_script.el and then called `report-emacs-bug' with the enriched buffer that fails to be saved as the current buffer. So, the input file (`enriched_bug_orig.txt') is in enriched mode, and consists of one `0' followed by newlines. I expected Emacs to write the buffer to `enriched_bug_edited.txt', make the `0' bold, and save the buffer. In practice, Emacs does make the `0' bold, but then fails to save the buffer. The second line of bug_script.el is `(toggle-debug-on-error)' so Emacs should have provided useful information. In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2) of 2015-01-15 on jorge-Notebook-HP-G42 Windowing system distributor `The X.Org Foundation', version 11.0.11600000 System Description: Ubuntu 14.10 Configured using: `configure --prefix=/usr/local/emacs' Important settings: value of $LC_MONETARY: pt_BR.UTF-8 value of $LC_NUMERIC: pt_BR.UTF-8 value of $LC_TIME: pt_BR.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: enriched-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t use-hard-newlines: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x o C-x o C-x C-f ~ / D e s k t r a b a l h o C-x o M-x r e p o r t - e m C-g C-x o C-x 3 C-x o C-x C-f C-g C-x b C-f C-SPC C-e C-b M-w C-x o M-x r e p o r t - e m Recent messages: Note: file is write protected Saving file /home/jorge/tmp/emacs_enriched_bug/enriched_bug_edited.txt... Enriched: encoding document... Wrote /home/jorge/tmp/emacs_enriched_bug/enriched_bug_edited.txt Saving file /home/jorge/tmp/emacs_enriched_bug/enriched_bug_edited.txt... Enriched: encoding document... Entering debugger... Enriched: decoding document... Indenting... Quit [2 times] Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils help-mode easymenu debug disp-table enriched cus-start cus-load time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 83013 6903) (symbols 48 18640 0) (miscs 40 67 174) (strings 32 11108 4144) (string-bytes 1 292848) (vectors 16 9828) (vector-slots 8 391654 14920) (floats 8 72 382) (intervals 56 263 1) (buffers 960 16) (heap 1024 41562 939)) --089e0160ac88dccdfd050f74159a Content-Type: text/plain; charset=US-ASCII; name="enriched_bug_orig.txt" Content-Disposition: attachment; filename="enriched_bug_orig.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i6ce59vq0 Q29udGVudC1UeXBlOiB0ZXh0L2VucmljaGVkClRleHQtV2lkdGg6IDcwCgowCgo= --089e0160ac88dccdfd050f74159a Content-Type: text/x-emacs-lisp; charset=US-ASCII; name="bug_script.el" Content-Disposition: attachment; filename="bug_script.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i6ce59xb1 KHByaW50IChlbWFjcy12ZXJzaW9uKSkKKHRvZ2dsZS1kZWJ1Zy1vbi1lcnJvcikKKGZpbmQtZmls ZSAiZW5yaWNoZWRfYnVnX29yaWcudHh0IikKKHdyaXRlLWZpbGUgImVucmljaGVkX2J1Z19lZGl0 ZWQudHh0IikKKGZhY2VtZW51LXNldC1mYWNlICJib2xkIiAxIDIpCihzYXZlLWJ1ZmZlciAwKQo= --089e0160ac88dccdfd050f74159a Content-Type: text/plain; charset=US-ASCII; name="bug_output_24.4.1.txt" Content-Disposition: attachment; filename="bug_output_24.4.1.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i6ce59xk2 CkRlYnVnIG9uIEVycm9yIGVuYWJsZWQgZ2xvYmFsbHkKRW5yaWNoZWQ6IGRlY29kaW5nIGRvY3Vt ZW50Li4uCkluZGVudGluZy4uLgoKU2F2aW5nIGZpbGUgL2hvbWUvam9yZ2UvdG1wL2VtYWNzX2Vu cmljaGVkX2J1Zy9lbnJpY2hlZF9idWdfZWRpdGVkLnR4dC4uLgpFbnJpY2hlZDogZW5jb2Rpbmcg ZG9jdW1lbn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ZyBhdCBidWZmZXIgcG9zaXRpb24gMTcwCiAgbG9hZC13aXRoLWNvZGUtY29udmVyc2lvbigi L2hvbWUvam9yZ2UvdG1wL2VtYWNzX2VucmljaGVkX2J1Zy9idWdfc2NyaXB0LmVsIiAiL2hvbWUv am9yZ2UvdG1wL2VtYWNzX2VucmljaGVkX2J1Zy9idWdfc2NyaXB0LmVsIiBuaWwgdCkKICBsb2Fk KCIvaG9tZS9qb3JnZS90bXAvZW1hY3NfZW5yaWNoZWRfYnVnL2J1Z19zY3JpcHQuZWwiIG5pbCB0 IHQpCiAgY29tbWFuZC1saW5lLTEoKCItc2NyaXB0bG9hZCIgImJ1Z19zY3JpcHQuZWwiKSkKICBj b21tYW5kLWxpbmUoKQogIG5vcm1hbC10b3AtbGV2ZWwoKQoKRW5yaWNoZWQ6IGVuY29kaW5nIGRv Y3VtZW50Li4uCkF1dG8tc2F2aW5nICAqRm9ybWF0IFRlbXAgMCo6IFdyb25nIHR5cGUgYXJndW1l bnQ6IHN5bWJvbHAsICJib2xkIgpBdXRvLXNhdmluZyAgKkZvcm1hdCBUZW1wIDAqOiBXcm9uZyB0 eXBlIGFyZ3VtZW50OiBzeW1ib2xwLCAiYm9sZCIKQXV0by1zYXZpbmcgICpGb3JtYXQgVGVtcCAw KjogV3JvbmcgdHlwZSBhcmd1bWVudDogc3ltYm9scCwgImJvbGQiCgoiR05VIEVtYWNzIDI0LjQu MSAoeDg2XzY0LXVua25vd24tbGludXgtZ251LCBHVEsrIFZlcnNpb24gMy4xMi4yKQogb2YgMjAx NS0wMS0xNSBvbiBqb3JnZS1Ob3RlYm9vay1IUC1HNDIiCg== --089e0160ac88dccdfd050f74159a Content-Type: text/plain; charset=US-ASCII; name="bug_output_24.4.90.txt" Content-Disposition: attachment; filename="bug_output_24.4.90.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i6ce59xp3 CkRlYnVnIG9uIEVycm9yIGVuYWJsZWQgZ2xvYmFsbHkKRW5yaWNoZWQ6IGR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74159a-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 19 13:48:15 2015 Received: (at 19903) by debbugs.gnu.org; 19 Feb 2015 18:48:15 +0000 Received: from localhost ([127.0.0.1]:48898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOW90-0006wv-K9 for submit@debbugs.gnu.org; Thu, 19 Feb 2015 13:48:14 -0500 Received: from fely.am-1.org ([78.47.74.50]:44634) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOW8x-0006wj-Ig for 19903@debbugs.gnu.org; Thu, 19 Feb 2015 13:48:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=TuoLtmZIpsKX4gLsfb6dsc9DisLBXxNXvckU0BGq7Ng=; b=PN80jf6GZM8EN592+Wpn66PTnPnK+Zes0aU5hEknMD4sYdw0m9Sw+g78dQaU12AYKGO1S9VjM0ilSBAwakmGDCMFVyT8BOUP33twwVBDAvK6TCMrio/iu4+9C85cYRJLjutY80Gmr/EubL94qCB8TKhVbXVvIzr1Zb1yqUd7HkM=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YOW8v-0005B1-1P; Thu, 19 Feb 2015 18:48:09 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YOW8o-0006Gl-Cj; Fri, 20 Feb 2015 01:48:02 +0700 From: Ivan Shmakov To: 19903@debbugs.gnu.org, Jorge Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode References: Mail-Followup-To: 19903@debbugs.gnu.org Date: Thu, 19 Feb 2015 18:48:01 +0000 In-Reply-To: (Jorge's message of "Thu, 19 Feb 2015 15:15:40 -0200") Message-ID: <87sie168m6.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 19903 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) >>>>> Jorge writes: [=E2=80=A6] > (print (emacs-version)) > (toggle-debug-on-error) > (find-file "enriched_bug_orig.txt") > (write-file "enriched_bug_edited.txt") > (facemenu-set-face "bold" 1 2) > (save-buffer 0) Could you please try and report if the error is still signalled if the code above is changed to use the 'bold symbol instead of a "bold" string? [=E2=80=A6] > Enriched: encoding document... > Debugger entered--Lisp error: (wrong-type-argument symbolp "bold") > internal-get-lisp-face-attribute("bold" :foreground nil) > face-attribute("bold" :foreground) > enriched-face-ans("bold") > enriched-encode-other-face(nil "bold") Unless I be mistaken, faces are ought to be symbols, not strings, so this error appears entirely reasonable. [=E2=80=A6] --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 20 03:27:01 2015 Received: (at 19903-done) by debbugs.gnu.org; 20 Feb 2015 08:27:01 +0000 Received: from localhost ([127.0.0.1]:49082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOivM-0001dr-Sn for submit@debbugs.gnu.org; Fri, 20 Feb 2015 03:27:01 -0500 Received: from mtaout24.012.net.il ([80.179.55.180]:46034) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOivK-0001di-S9 for 19903-done@debbugs.gnu.org; Fri, 20 Feb 2015 03:27:00 -0500 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NK2007009ECBU00@mtaout24.012.net.il> for 19903-done@debbugs.gnu.org; Fri, 20 Feb 2015 10:18:37 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NK2002VM9R1BL50@mtaout24.012.net.il>; Fri, 20 Feb 2015 10:18:37 +0200 (IST) Date: Fri, 20 Feb 2015 10:27:13 +0200 From: Eli Zaretskii Subject: Re: bug#19903: 24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"' In-reply-to: X-012-Sender: halo1@inter.net.il To: Jorge Message-id: <83sie1kmxq.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 19903-done Cc: 19903-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 19 Feb 2015 15:15:40 -0200 > From: Jorge > > Download the attached files to the same directory. In GNU Bash, with that > directory current, run > emacs -Q --script bug_script.el &> bug_output.txt > > I ran the above command for emacs versions 24.4.1 and 24.4.90. The output > is in `bug_output_24.4.1.txt' and `bug_output_24.4.90.txt' respectively. The > bug manifests in both tested Emacs versions. > To compose the initial draft of this bug report, I ran > emacs -Q -l bug_script.el > and then called `report-emacs-bug' with the enriched buffer that fails to be > saved as the current buffer. > > So, the input file (`enriched_bug_orig.txt') is in enriched mode, and consists > of one `0' followed by newlines. I expected Emacs to write the buffer to > `enriched_bug_edited.txt', make the `0' bold, and save the buffer. In > practice, Emacs does make the `0' bold, but then fails to save the buffer. The > second line of bug_script.el is `(toggle-debug-on-error)' so Emacs should have > provided useful information. > [...] > (print (emacs-version)) > (toggle-debug-on-error) > (find-file "enriched_bug_orig.txt") > (write-file "enriched_bug_edited.txt") > (facemenu-set-face "bold" 1 2) <<<<<<<<<<<<<<<<<<<<<<< > (save-buffer 0) That's a cockpit error: the marked line should have said (facemenu-set-face 'bold 1 2) instead. Then this script will work and do what you expect. A face is represented by its symbol, not by its string name. I'm therefore closing this bug. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 20 03:51:59 2015 Received: (at 19903-done) by debbugs.gnu.org; 20 Feb 2015 08:51:59 +0000 Received: from localhost ([127.0.0.1]:49088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOjJX-0002G8-7k for submit@debbugs.gnu.org; Fri, 20 Feb 2015 03:51:59 -0500 Received: from mail-lb0-f181.google.com ([209.85.217.181]:44658) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOjJT-0002Fy-Oo for 19903-done@debbugs.gnu.org; Fri, 20 Feb 2015 03:51:56 -0500 Received: by lbiz12 with SMTP id z12so4858785lbi.11 for <19903-done@debbugs.gnu.org>; Fri, 20 Feb 2015 00:51:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:cc:content-type; bh=542ybOlFHOZdrWZFoqY5sKA4sbjMtdi4mw57Vmjsbak=; b=Splwk7DQS3G52ddjoc1A8Je/oqsMc24dQNdfxYbckIVaMVtqLITBAwJYgiBAHh+cXQ Iww/f1nN5jlxMPCemiFlrdiYlA1nYat/EsPkiIt45Tf/y86SxX1VbxuLtlqQj2TwMaLy yrq4dwnhHJlTlLmLnLGVuRNidMz1/LLkTFhMNhKyXR1mKD97/MoaToL81rTyPVumiGrP O91KDKlZwOyO8VNShT9WRWgzy3YVzG0/x7q9h73WFX1FQxEp7Nuzw0luRlvac3GcpAJr OHBsu/5nHxZ9Ki3MowLr5B0N9kl0M+ajpvl9SltruMrZUXjAyfw+8X0itRx4i0XYCML2 aO1g== MIME-Version: 1.0 X-Received: by 10.112.163.229 with SMTP id yl5mr2251820lbb.60.1424422314556; Fri, 20 Feb 2015 00:51:54 -0800 (PST) Received: by 10.152.230.98 with HTTP; Fri, 20 Feb 2015 00:51:54 -0800 (PST) Date: Fri, 20 Feb 2015 06:51:54 -0200 X-Google-Sender-Auth: npGSr9dxsawm820BdAFzO0MRQ6s Message-ID: Subject: Re: bug#19903: 24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"' From: Jorge To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19903-done Cc: 19903-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Fri, Feb 20, 2015 at 6:27 AM, Eli Zaretskii wrote: > That's a cockpit error: the marked line should have said > > (facemenu-set-face 'bold 1 2) > > instead. Then this script will work and do what you expect. Thank you very much for the clarification. I just corrected my code. However, it seems to me that the current behavior is not user-friendly. (facemenu-set-face "bold" 1 2) _does_ make the text bold, without any warning - which makes it appear that the call was successful - but then we get an error when we try to save the buffer. Generally, it is best for errors to be detected as close to their source as possible. What do you think? Regards From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 20 04:12:22 2015 Received: (at 19903) by debbugs.gnu.org; 20 Feb 2015 09:12:22 +0000 Received: from localhost ([127.0.0.1]:49107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOjdE-0002jW-Lc for submit@debbugs.gnu.org; Fri, 20 Feb 2015 04:12:22 -0500 Received: from fely.am-1.org ([78.47.74.50]:44790) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOjdB-0002jM-QK for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 04:12:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=9rI39hDVdDXmIUMCmqWTJ/hsdgMSbUHRcoSH3dnKiCQ=; b=ARgK6zG/Vg+3gqigAnEHpMakrzYb6yWu16v/ii1hm16NrG1P7IUzlt18f/07qPFP1QbgNnSUyez1yD875qeSBbEdbIB4Pty6uWy4fCtUkxD+g1Yqt2JHQmOSJeWEFE9NjIa5u1aL7KIvw/r2XA/yWMVfexAIxY+q6yjruPOjgtQ=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YOjd9-0004jE-I6 for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 09:12:15 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YOjd3-0000Za-2o for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 16:12:09 +0700 From: Ivan Shmakov To: 19903@debbugs.gnu.org Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode References: Mail-Followup-To: 19903@debbugs.gnu.org Date: Fri, 20 Feb 2015 09:12:08 +0000 In-Reply-To: (Jorge's message of "Fri, 20 Feb 2015 06:51:54 -0200") Message-ID: <87pp953q1j.fsf_-_@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 19903 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) >>>>> Jorge writes: [=E2=80=A6] > However, it seems to me that the current behavior is not > user-friendly. (facemenu-set-face "bold" 1 2) _does_ make the text > bold, without any warning =E2=80=93 which makes it appear that the call = was > successful =E2=80=93 but then we get an error when we try to save the bu= ffer. The facemenu-set-face command is essentially a call to facemenu-add-new-face, followed by a call to facemenu-add-face. Curiously enough, the former implements explicit support for string arguments: $ git archive --format=3Dtar c4e2be4587ec -- lisp/facemenu.el \ | tar -xO | nl -ba ; # 2015-02-16 07:22:46 +0000=20 =E2=80=A6 785 (defun facemenu-add-new-face (face) 786 "Add FACE (a face) to the Face menu if `facemenu-listed-faces' say= s so. 787 This is called whenever you create a new face, and at other times." 788 (let* (name 789 symbol =E2=80=A6 792 function menu-val) 793 (if (symbolp face) 794 (setq name (symbol-name face) 795 symbol face) 796 (setq name face 797 symbol (intern name))) > Generally, it is best for errors to be detected as close to their > source as possible. What do you think? If string faces are rendered just the same as symbol ones, I=E2=80=99d rather wonder if either facemenu-add-face should silently =E2=80=98intern=E2=80=99 all the strings it gets before use, /or/ face-att= ribute should do that. (Or perhaps both.) --=20 FSF associate member #7257 np. Transformation =E2=80=94 David Modica B6A0= 230E 334A From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 20 05:03:05 2015 Received: (at 19903) by debbugs.gnu.org; 20 Feb 2015 10:03:05 +0000 Received: from localhost ([127.0.0.1]:49136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOkQK-0003vZ-1Q for submit@debbugs.gnu.org; Fri, 20 Feb 2015 05:03:04 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:52007) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOkQH-0003v0-7j for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 05:03:02 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NK200800ECSOB00@a-mtaout20.012.net.il> for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 12:02:59 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NK20082CEKYBFB0@a-mtaout20.012.net.il>; Fri, 20 Feb 2015 12:02:59 +0200 (IST) Date: Fri, 20 Feb 2015 12:03:15 +0200 From: Eli Zaretskii Subject: Re: bug#19903: 24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"' In-reply-to: X-012-Sender: halo1@inter.net.il To: Jorge Message-id: <83oaoolx24.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 19903 Cc: 19903@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Fri, 20 Feb 2015 06:51:54 -0200 > From: Jorge > Cc: 19903-done@debbugs.gnu.org > > On Fri, Feb 20, 2015 at 6:27 AM, Eli Zaretskii wrote: > > That's a cockpit error: the marked line should have said > > > > (facemenu-set-face 'bold 1 2) > > > > instead. Then this script will work and do what you expect. > Thank you very much for the clarification. I just corrected my code. > However, it seems to me that the current behavior is not > user-friendly. (facemenu-set-face "bold" 1 2) _does_ make the text > bold, without any warning - which makes it appear that the call was > successful - but then we get an error when we try to save the buffer. > Generally, it is best for errors to be detected as close to their > source as possible. What do you think? facemenu-set-face calls several other functions, some of which accept face names, some don't. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 20 05:07:32 2015 Received: (at 19903) by debbugs.gnu.org; 20 Feb 2015 10:07:32 +0000 Received: from localhost ([127.0.0.1]:49141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOkUe-00041g-As for submit@debbugs.gnu.org; Fri, 20 Feb 2015 05:07:32 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:52752) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOkUZ-00041V-B6 for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 05:07:31 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NK200800EQZPW00@a-mtaout20.012.net.il> for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 12:07:26 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NK2008I3ESEEV70@a-mtaout20.012.net.il>; Fri, 20 Feb 2015 12:07:26 +0200 (IST) Date: Fri, 20 Feb 2015 12:07:42 +0200 From: Eli Zaretskii Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode In-reply-to: <87pp953q1j.fsf_-_@violet.siamics.net> X-012-Sender: halo1@inter.net.il To: Ivan Shmakov Message-id: <83lhjslwup.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT References: <87pp953q1j.fsf_-_@violet.siamics.net> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 19903 Cc: 19903@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Ivan Shmakov > Date: Fri, 20 Feb 2015 09:12:08 +0000 > > If string faces are rendered just the same as symbol ones, > I’d rather wonder if either facemenu-add-face should silently > ‘intern’ all the strings it gets before use, /or/ face-attribute > should do that. (Or perhaps both.) Patches to do that are welcome. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 20 12:19:05 2015 Received: (at 19903) by debbugs.gnu.org; 20 Feb 2015 17:19:06 +0000 Received: from localhost ([127.0.0.1]:49677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOrEH-00005X-98 for submit@debbugs.gnu.org; Fri, 20 Feb 2015 12:19:05 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:60798) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOrEG-00005Q-4L for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 12:19:04 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkwUAPOG1lTO+LI//2dsb2JhbABbgwaDX0+FBMBlBAICgQ1EAQEBAQEBfIQNAQQBIzMjEAsaAhgOAgIUGA0kiDgIuDKVcQEBAQcBAQEBHoEhjiQzB4JogUIFiiefS4FFIoQMIIJzAQEB X-IPAS-Result: AkwUAPOG1lTO+LI//2dsb2JhbABbgwaDX0+FBMBlBAICgQ1EAQEBAQEBfIQNAQQBIzMjEAsaAhgOAgIUGA0kiDgIuDKVcQEBAQcBAQEBHoEhjiQzB4JogUIFiiefS4FFIoQMIIJzAQEB X-IronPort-AV: E=Sophos;i="5.09,536,1418101200"; d="scan'208";a="111022987" Received: from 206-248-178-63.dsl.teksavvy.com (HELO pastel.home) ([206.248.178.63]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Feb 2015 12:19:03 -0500 Received: by pastel.home (Postfix, from userid 20848) id 545751775; Fri, 20 Feb 2015 12:18:38 -0500 (EST) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode Message-ID: References: <87pp953q1j.fsf_-_@violet.siamics.net> <83lhjslwup.fsf@gnu.org> Date: Fri, 20 Feb 2015 12:18:38 -0500 In-Reply-To: <83lhjslwup.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 20 Feb 2015 12:07:42 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 19903 Cc: 19903@debbugs.gnu.org, Ivan Shmakov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> If string faces are rendered just the same as symbol ones, I think that's a misfeature. >> I=E2=80=99d rather wonder if either facemenu-add-face should silently >> =E2=80=98intern=E2=80=99 all the strings it gets before use, /or/ face-a= ttribute >> should do that. (Or perhaps both.) I think interning would be good, indeed, tho I would prefer if it emitted some kind of warning instead of doing it silently, to try and stop this bad habit. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 20 13:56:41 2015 Received: (at 19903) by debbugs.gnu.org; 20 Feb 2015 18:56:41 +0000 Received: from localhost ([127.0.0.1]:49696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOskj-0003id-8G for submit@debbugs.gnu.org; Fri, 20 Feb 2015 13:56:41 -0500 Received: from fely.am-1.org ([78.47.74.50]:44987) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOskh-0003iU-0d for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 13:56:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=4/GTaQhJEMRzGwpVr+LVEpuLp37FRqbwJwca3zJpN+I=; b=fbKSS+ngKlcMv+R34KAUGj+GhhtDA//YcDvH4J2oF6V42HKbcQJC0cr/4ECaJd06gIagmcyoYLJ1sIq+47MURVxEbEWhlvcY3Ptldp65LTnt7o3Ow5WVxhALUUkOHHEn6QRyM95Eub0h02T6yugCzs/ey7A2hj5ctKsSLXOqEAQ=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YOskg-0001QE-8J for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 18:56:38 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YOskY-0001vC-Mt for 19903@debbugs.gnu.org; Sat, 21 Feb 2015 01:56:30 +0700 From: Ivan Shmakov To: 19903@debbugs.gnu.org Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode References: <87pp953q1j.fsf_-_@violet.siamics.net> <83lhjslwup.fsf@gnu.org> Mail-Followup-To: 19903@debbugs.gnu.org Date: Fri, 20 Feb 2015 18:56:30 +0000 In-Reply-To: (Stefan Monnier's message of "Fri, 20 Feb 2015 12:18:38 -0500") Message-ID: <87h9ug4dk1.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 19903 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> Stefan Monnier writes: >> If string faces are rendered just the same as symbol ones, > I think that's a misfeature. I=E2=80=99m not familiar with the Emacs display code, so I have no opinion on this. >> I=E2=80=99d rather wonder if either facemenu-add-face should silently >> =E2=80=98intern=E2=80=99 all the strings it gets before use, /or/ face-= attribute >> should do that. (Or perhaps both.) > I think interning would be good, indeed, tho I would prefer if it > emitted some kind of warning instead of doing it silently, to try and > stop this bad habit. Please consider the patch MIMEd. --=20 FSF associate member #7257 np. Night Prowler =E2=80=94 AC/DC =E2=80=A6 3= 013 B6A0 230E 334A --=-=-= Content-Type: text/diff Content-Disposition: inline --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -702,6 +702,9 @@ defun facemenu-add-face (face &optional start end) text property. Otherwise, selecting the default face would not have any effect. See `facemenu-remove-face-function'." (interactive "*xFace: \nr") + (when (stringp face) + (warn "Face %S is a string; interning" face) + (setq face (intern face))) (cond ((and (eq face 'default) (not (eq facemenu-remove-face-function t))) --- a/lisp/faces.el +++ b/lisp/faces.el @@ -402,6 +402,9 @@ defun face-attribute (face attribute &optional frame inherit) value of `default' for INHERIT; this will resolve any unspecified or relative values by merging with the `default' face (which is always completely specified)." + (when (stringp face) + (message "Face %S is a string; interning" face) + (setq face (intern face))) (let ((value (internal-get-lisp-face-attribute face attribute frame))) (when (and inherit (face-attribute-relative-p attribute value)) ;; VALUE is relative, so merge with inherited faces --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 20 14:56:04 2015 Received: (at 19903) by debbugs.gnu.org; 20 Feb 2015 19:56:05 +0000 Received: from localhost ([127.0.0.1]:49715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOtgC-00056z-K4 for submit@debbugs.gnu.org; Fri, 20 Feb 2015 14:56:04 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:39581) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOtgA-00056r-7b for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 14:56:02 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AroTAPOG1lTO+LI//2dsb2JhbABbgwaDX4VTwGUEAgKBDUQBAQEBAQF8hA0BBVYzCzQSFBgNiGTOIwEBCAIgj38WhBQFiiefS4FFIoQMIIJzAQEB X-IPAS-Result: AroTAPOG1lTO+LI//2dsb2JhbABbgwaDX4VTwGUEAgKBDUQBAQEBAQF8hA0BBVYzCzQSFBgNiGTOIwEBCAIgj38WhBQFiiefS4FFIoQMIIJzAQEB X-IronPort-AV: E=Sophos;i="5.09,536,1418101200"; d="scan'208";a="111038394" Received: from 206-248-178-63.dsl.teksavvy.com (HELO pastel.home) ([206.248.178.63]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Feb 2015 14:56:01 -0500 Received: by pastel.home (Postfix, from userid 20848) id EAE23138E; Fri, 20 Feb 2015 14:55:35 -0500 (EST) From: Stefan Monnier To: 19903@debbugs.gnu.org Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode Message-ID: References: <87pp953q1j.fsf_-_@violet.siamics.net> <83lhjslwup.fsf@gnu.org> <87h9ug4dk1.fsf@violet.siamics.net> Date: Fri, 20 Feb 2015 14:55:35 -0500 In-Reply-To: <87h9ug4dk1.fsf@violet.siamics.net> (Ivan Shmakov's message of "Fri, 20 Feb 2015 18:56:30 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 19903 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > + (warn "Face %S is a string; interning" face) [...] > + (message "Face %S is a string; interning" face) Why `warn' in one and `message' in the other? These could end up spewing a lot of warnings at times, so it's a bit risky, but if such uses are sufficiently rare it might be OK. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 20 16:09:46 2015 Received: (at 19903) by debbugs.gnu.org; 20 Feb 2015 21:09:46 +0000 Received: from localhost ([127.0.0.1]:49724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOupV-0006nl-P5 for submit@debbugs.gnu.org; Fri, 20 Feb 2015 16:09:46 -0500 Received: from fely.am-1.org ([78.47.74.50]:45034) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOupT-0006nc-Rv for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 16:09:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=M5Ue7Beob+PNkvwnKPaB+y+yr2o8AXLyjp682jT2aU8=; b=UMMh0Z7g+R20WsjqPmOeV0PkNhpG1MmHGB87t8uQJPlk7XUb1v/aimqPamZ7obdwug6B33CKZo1CilRuFaYLYtko7ZFrlhp/lkqof/L3dMvCqAjHBeQo+Y9jbDcNMbfZ6KNi9DsN1ZoVPE1JxldJuxUvKzKiwEpOjWCqez7KsQ0=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YOupS-0002Oa-DE for 19903@debbugs.gnu.org; Fri, 20 Feb 2015 21:09:42 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YOupL-0002LA-UH for 19903@debbugs.gnu.org; Sat, 21 Feb 2015 04:09:36 +0700 From: Ivan Shmakov To: 19903@debbugs.gnu.org Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode References: <87pp953q1j.fsf_-_@violet.siamics.net> <83lhjslwup.fsf@gnu.org> <87h9ug4dk1.fsf@violet.siamics.net> Mail-Followup-To: 19903@debbugs.gnu.org Date: Fri, 20 Feb 2015 21:09:35 +0000 In-Reply-To: (Stefan Monnier's message of "Fri, 20 Feb 2015 14:55:35 -0500") Message-ID: <87d25447e8.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 19903 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) >>>>> Stefan Monnier writes: >> + (warn "Face %S is a string; interning" face) >> + (message "Face %S is a string; interning" face) > Why `warn' in one and `message' in the other? By the time we hit this in =E2=80=98face-attribute=E2=80=99, the point at = which the sub-setandard string-named face was introduced is presumably long gone, so there=E2=80=99s no good reason to use =E2=80=98warn=E2=80=99. On the contrary, =E2=80=98facemenu-add-face=E2=80=99 is likely to be invok= ed either directly by the user, or as part of some other interactive command. Should the call result in a warning, the user would probably be able to gather enough context from his or her actions immediately preceding the warning. > These could end up spewing a lot of warnings at times, so it's a bit > risky, but if such uses are sufficiently rare it might be OK. At least so I hope. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 21 06:12:57 2015 Received: (at 19903) by debbugs.gnu.org; 21 Feb 2015 11:12:57 +0000 Received: from localhost ([127.0.0.1]:49873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YP7zV-0001Zc-3p for submit@debbugs.gnu.org; Sat, 21 Feb 2015 06:12:57 -0500 Received: from fely.am-1.org ([78.47.74.50]:45181) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YP7zS-0001ZT-8o for 19903@debbugs.gnu.org; Sat, 21 Feb 2015 06:12:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=DbhNj/tHxP9yTt7XKEKrvkkqh+RceHKYOvIcNVIcJwI=; b=evqchtz4JOVPtZUBqM6kS0J0Xc+DzgExyxJ6vQWK8cSG344Ec042/MFDkip2KuPpNqpUZM2isTHBlK+SZ24+a/Q5ZlNFlS5mMEpyh7gKt7C0bFMMPl8Ccs495nv03ZhPwfQMYgbALInYa2M4GHkJ6Wejaas2hWS7ZDiyUSmuzrw=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YP7zR-0001ax-Gu for 19903@debbugs.gnu.org; Sat, 21 Feb 2015 11:12:53 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YP7zI-0003q3-K1 for 19903@debbugs.gnu.org; Sat, 21 Feb 2015 18:12:44 +0700 From: Ivan Shmakov To: 19903@debbugs.gnu.org Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode References: <87pp953q1j.fsf_-_@violet.siamics.net> <83lhjslwup.fsf@gnu.org> <87h9ug4dk1.fsf@violet.siamics.net> <87d25447e8.fsf@violet.siamics.net> Mail-Followup-To: 19903@debbugs.gnu.org Date: Sat, 21 Feb 2015 11:12:44 +0000 In-Reply-To: <87d25447e8.fsf@violet.siamics.net> (Ivan Shmakov's message of "Fri, 20 Feb 2015 21:09:35 +0000") Message-ID: <874mqf4ixf.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 19903 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> Ivan Shmakov writes: >>>>> Stefan Monnier writes: >>> + (warn "Face %S is a string; interning" face) >>> + (message "Face %S is a string; interning" face) >> Why `warn' in one and `message' in the other? > By the time we hit this in =E2=80=98face-attribute=E2=80=99, the point a= t which the > sub-setandard string-named face was introduced is presumably long > gone, so there=E2=80=99s no good reason to use =E2=80=98warn=E2=80=99. =E2=80=A6 Or, on a second thought, =E2=80=98message=E2=80=99, either. Giv= en that =E2=80=98face-attribute=E2=80=99 has no idea of where the caller got this = face from, there=E2=80=99s simply no way for it to provide any helpful message at this point. (Say, =E2=80=9CFace "bold", as found at position 42 in #, is a string; interning=E2=80=9D.) Now, given that there=E2=80=99s a number of =E2=80=9Cinternal=E2=80=9D fun= ctions (such as =E2=80=98internal-lisp-face-p=E2=80=99, for instance) which accept stri= ng face names just fine, I wonder if it makes sense to just change =E2=80=98internal-get-lisp-face-attribute=E2=80=99 accordingly? An untest= ed patch is hereby MIMEd. [=E2=80=A6] --=20 FSF associate member #7257 np. Fear of the Dark =E2=80=94 Iron Maiden B6A0= 230E 334A --=-=-= Content-Type: text/diff Content-Disposition: inline --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3570,15 +3570,18 @@ the result will be absolute, otherwise it will be relative. */) DEFUN ("internal-get-lisp-face-attribute", Finternal_get_lisp_face_attribute, Sinternal_get_lisp_face_attribute, 2, 3, 0, - doc: /* Return face attribute KEYWORD of face SYMBOL. -If SYMBOL does not name a valid Lisp face or KEYWORD isn't a valid + doc: /* Return face attribute KEYWORD of face FACE. +FACE should be a symbol or string. +If FACE does not name a valid Lisp face or KEYWORD isn't a valid face attribute name, signal an error. -If the optional argument FRAME is given, report on face SYMBOL in that -frame. If FRAME is t, report on the defaults for face SYMBOL (for new +If the optional argument FRAME is given, report on face FACE in that +frame. If FRAME is t, report on the defaults for face FACE (for new frames). If FRAME is omitted or nil, use the selected frame. */) - (Lisp_Object symbol, Lisp_Object keyword, Lisp_Object frame) + (Lisp_Object face, Lisp_Object keyword, Lisp_Object frame) { struct frame *f = EQ (frame, Qt) ? NULL : decode_live_frame (frame); + Lisp_Object symbol = (STRINGP (face) ? intern (SSDATA (face)) + : face); Lisp_Object lface = lface_from_face_name (f, symbol, true), value = Qnil; CHECK_SYMBOL (symbol); --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 21 06:42:47 2015 Received: (at 19903) by debbugs.gnu.org; 21 Feb 2015 11:42:48 +0000 Received: from localhost ([127.0.0.1]:49887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YP8SN-0002KZ-GB for submit@debbugs.gnu.org; Sat, 21 Feb 2015 06:42:47 -0500 Received: from mtaout28.012.net.il ([80.179.55.184]:55159) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YP8SK-0002KO-1S for 19903@debbugs.gnu.org; Sat, 21 Feb 2015 06:42:45 -0500 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NK400E00DS5JX00@mtaout28.012.net.il> for 19903@debbugs.gnu.org; Sat, 21 Feb 2015 13:41:06 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NK400DZ6DSITD00@mtaout28.012.net.il>; Sat, 21 Feb 2015 13:41:06 +0200 (IST) Date: Sat, 21 Feb 2015 13:42:41 +0200 From: Eli Zaretskii Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode In-reply-to: <874mqf4ixf.fsf@violet.siamics.net> X-012-Sender: halo1@inter.net.il To: Ivan Shmakov Message-id: <83lhjrcwy6.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT References: <87pp953q1j.fsf_-_@violet.siamics.net> <83lhjslwup.fsf@gnu.org> <87h9ug4dk1.fsf@violet.siamics.net> <87d25447e8.fsf@violet.siamics.net> <874mqf4ixf.fsf@violet.siamics.net> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 19903 Cc: 19903@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Ivan Shmakov > Date: Sat, 21 Feb 2015 11:12:44 +0000 > > Now, given that there’s a number of “internal” functions (such > as ‘internal-lisp-face-p’, for instance) which accept string > face names just fine, I wonder if it makes sense to just change > ‘internal-get-lisp-face-attribute’ accordingly? An untested > patch is hereby MIMEd. I don't think internal functions should cater to UI issues, unless they are themselves interactive. If we keep this confined to interactive functions, how many such functions in facemenu.el will have to be changed? If not too many, I'm inclined to keep this there. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 25 01:20:49 2015 Received: (at 19903) by debbugs.gnu.org; 25 Feb 2015 06:20:49 +0000 Received: from localhost ([127.0.0.1]:57170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQVKy-0004V6-PM for submit@debbugs.gnu.org; Wed, 25 Feb 2015 01:20:49 -0500 Received: from fely.am-1.org ([78.47.74.50]:46051) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQVKx-0004Uw-3H for 19903@debbugs.gnu.org; Wed, 25 Feb 2015 01:20:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=PtKl4t+UYuWZejlk6RHu/uKoTdOsH0lq/LVB0+JooBY=; b=R/K94q2e05pFf4bVxKJYX/Kig29ZY4cX8t5e7DLt2y78aukAOxP2oSEngWJrQ1YyW38BBG1557HUvlY7NyQ6z5lbuqN/2yX7GzTCD3G4x+ThLVg4oEcLYjNh6IBKwol2aVQQfZzI+ZZMGdu6MGA4dV3/HuZlTfhvMZgMG8Spd4A=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YQVKt-0004AV-UR for 19903@debbugs.gnu.org; Wed, 25 Feb 2015 06:20:44 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YQVKn-0005En-9E for 19903@debbugs.gnu.org; Wed, 25 Feb 2015 13:20:37 +0700 From: Ivan Shmakov To: 19903@debbugs.gnu.org Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode References: <87pp953q1j.fsf_-_@violet.siamics.net> <83lhjslwup.fsf@gnu.org> <87h9ug4dk1.fsf@violet.siamics.net> <87d25447e8.fsf@violet.siamics.net> <874mqf4ixf.fsf@violet.siamics.net> <83lhjrcwy6.fsf@gnu.org> Mail-Followup-To: 19903@debbugs.gnu.org Date: Wed, 25 Feb 2015 06:20:36 +0000 In-Reply-To: <83lhjrcwy6.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 Feb 2015 13:42:41 +0200") Message-ID: <87sidu3423.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 19903 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) >>>>> Eli Zaretskii writes: >>>>> From: Ivan Shmakov Date: Sat, 21 Feb 2015 11:12:44 +0000 >> Now, given that there=E2=80=99s a number of =E2=80=9Cinternal=E2=80=9D = functions (such as >> =E2=80=98internal-lisp-face-p=E2=80=99, for instance) which accept stri= ng face names >> just fine, I wonder if it makes sense to just change >> =E2=80=98internal-get-lisp-face-attribute=E2=80=99 accordingly? An unt= ested patch >> is hereby MIMEd. > I don't think internal functions should cater to UI issues, unless > they are themselves interactive. I=E2=80=99m unsure where you see an UI issue here? The issue, as originally reported, is that face-attribute fails to handle string-named faces, which are considered perfectly valid by the rest of Emacs (including, say, facep and the display engine.) That is: the user accidentally sets 'face to a string, and is surprised to find that while the result is displayed just fine, some part of Emacs (namely, enriched-mode) breaks instantly. From there, we can go different ways, including: =E2=80=A2 bury our head in the sand and pretend there=E2=80=99s no issue; =E2=80=A2 patch one or two of the functions which can be used to add such faces =E2=80=93 to either silently (or not so) replace them with the respective symbol-named ones, /or/ to signal an error; this won=E2=80=99t prevent, however, the use of put-text-property and the likes of it to achieve that same effect; =E2=80=A2 begin to slowly deprecate string-named faces; I guess we=E2=80= =99d rather have the display engine log the cases of their use, at least once per buffer, to highlight the affected code and thus ease the migration =E2=80=93 from this undocumented feature to the documented lack thereof; =E2=80=A2 accept string-named faces as valid and make sure that this applies uniformly throughout the code; my latest patch changes internal-get-lisp-face-attribute to achieve this, but I=E2=80=99m fine with applying an earlier one instead, which similarly changes face-attribute. > If we keep this confined to interactive functions, how many such > functions in facemenu.el will have to be changed? If not too many, > I'm inclined to keep this there. I believe that facemenu-add-face is the only function which can be used to add a string-named face /interactively/, as it reads an arbitrary Lisp form for the face. (See also #18369.) The original report, however, was concerned with the use of facemenu-add-face from Lisp, and there=E2=80=99re still a plenty of ways to hit this issue apart from using facemenu-add-face with a string argument. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 25 11:06:49 2015 Received: (at 19903) by debbugs.gnu.org; 25 Feb 2015 16:06:49 +0000 Received: from localhost ([127.0.0.1]:57917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQeU4-00054W-JA for submit@debbugs.gnu.org; Wed, 25 Feb 2015 11:06:48 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:47265) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQeU1-00054E-Jh for 19903@debbugs.gnu.org; Wed, 25 Feb 2015 11:06:47 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NKC00D004FJGV00@a-mtaout20.012.net.il> for 19903@debbugs.gnu.org; Wed, 25 Feb 2015 18:06:38 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NKC00D7B4R1FF50@a-mtaout20.012.net.il>; Wed, 25 Feb 2015 18:06:38 +0200 (IST) Date: Wed, 25 Feb 2015 18:06:50 +0200 From: Eli Zaretskii Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode In-reply-to: <87sidu3423.fsf@violet.siamics.net> X-012-Sender: halo1@inter.net.il To: Ivan Shmakov Message-id: <83vbiq561x.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT References: <87pp953q1j.fsf_-_@violet.siamics.net> <83lhjslwup.fsf@gnu.org> <87h9ug4dk1.fsf@violet.siamics.net> <87d25447e8.fsf@violet.siamics.net> <874mqf4ixf.fsf@violet.siamics.net> <83lhjrcwy6.fsf@gnu.org> <87sidu3423.fsf@violet.siamics.net> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 19903 Cc: 19903@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Ivan Shmakov > Date: Wed, 25 Feb 2015 06:20:36 +0000 > > > I don't think internal functions should cater to UI issues, unless > > they are themselves interactive. > > I’m unsure where you see an UI issue here? The issue, as > originally reported, is that face-attribute fails to handle > string-named faces, which are considered perfectly valid by the > rest of Emacs (including, say, facep and the display engine.) Accepting strings instead of symbols is a convenience feature for users, so it's a UI issue. > From there, we can go different ways, including: > > • bury our head in the sand and pretend there’s no issue; I don't think anybody suggested that; I certainly didn't. If you are now suggesting it, then no, I don't think we should. > • patch one or two of the functions which can be used to add > such faces – to either silently (or not so) replace them with > the respective symbol-named ones, /or/ to signal an error; > this won’t prevent, however, the use of put-text-property and > the likes of it to achieve that same effect; I don't see why we need to spread this so wide. Making facemenu.el behave consistently sounds good enough, and will solve the original report. > > If we keep this confined to interactive functions, how many such > > functions in facemenu.el will have to be changed? If not too many, > > I'm inclined to keep this there. > > I believe that facemenu-add-face is the only function which can > be used to add a string-named face /interactively/, as it reads > an arbitrary Lisp form for the face. (See also #18369.) Yes, but how many don't? > > The original report, however, was concerned with the use of > facemenu-add-face from Lisp, and there’re still a plenty of ways > to hit this issue apart from using facemenu-add-face with a > string argument. I don't think we need to consider them. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 25 12:10:29 2015 Received: (at 19903) by debbugs.gnu.org; 25 Feb 2015 17:10:29 +0000 Received: from localhost ([127.0.0.1]:58008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQfTg-0006vt-Pn for submit@debbugs.gnu.org; Wed, 25 Feb 2015 12:10:29 -0500 Received: from fely.am-1.org ([78.47.74.50]:46286) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQfTe-0006ve-6K for 19903@debbugs.gnu.org; Wed, 25 Feb 2015 12:10:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=hwNEO6NGZf1d68rLR+9CJk2CJBun12xPUULhP+njcpw=; b=KxekKJGfZr/vE6d6jws8Ian6NUjjPCqEBIxMoU0jHjdfi1K6MaZB7/X3OI2Cfjv81DGsU/2PmWYwGlm6iUnWZ4/37TYWmIXQV1K+F+5/4YzWRNQ6/hmIfZi52YTHlKfoIxDNiRhUh4iWrJ/UTYS5ISbwGknuTWeh8BDGfy/uEEg=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YQfTZ-0002QQ-8p for 19903@debbugs.gnu.org; Wed, 25 Feb 2015 17:10:21 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YQfTR-0008CD-Tl for 19903@debbugs.gnu.org; Thu, 26 Feb 2015 00:10:14 +0700 From: Ivan Shmakov To: 19903@debbugs.gnu.org Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode References: <87pp953q1j.fsf_-_@violet.siamics.net> <83lhjslwup.fsf@gnu.org> <87h9ug4dk1.fsf@violet.siamics.net> <87d25447e8.fsf@violet.siamics.net> <874mqf4ixf.fsf@violet.siamics.net> <83lhjrcwy6.fsf@gnu.org> <87sidu3423.fsf@violet.siamics.net> <83vbiq561x.fsf@gnu.org> Mail-Followup-To: 19903@debbugs.gnu.org Date: Wed, 25 Feb 2015 17:10:13 +0000 In-Reply-To: <83vbiq561x.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Feb 2015 18:06:50 +0200") Message-ID: <87egpd3oju.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 19903 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) >>>>> Eli Zaretskii writes: >>>>> From: Ivan Shmakov Date: Wed, 25 Feb 2015 06:20:36 +0000 >>> I don't think internal functions should cater to UI issues, unless >>> they are themselves interactive. >> I=E2=80=99m unsure where you see an UI issue here? The issue, as origi= nally >> reported, is that face-attribute fails to handle string-named faces, >> which are considered perfectly valid by the rest of Emacs >> (including, say, facep and the display engine.) > Accepting strings instead of symbols is a convenience feature > for users, so it's a UI issue. Could you please elaborate on this? Specifically, does this apply to the interactive or non-interactive use (or both) of facemenu-add-face? [=E2=80=A6] >>> If we keep this confined to interactive functions, how many such >>> functions in facemenu.el will have to be changed? If not too many, >>> I'm inclined to keep this there. >> I believe that facemenu-add-face is the only function which can be >> used to add a string-named face /interactively/, as it reads an >> arbitrary Lisp form for the face. (See also #18369.) > Yes, but how many don't? One another (facemenu-set-face) uses read-face-name, which in turn explicitly passes user input through =E2=80=98intern=E2=80=99. Then, facemenu-set-face-from-menu uses last-command-event (when called interactively), assumes it=E2=80=99s a symbol, and uses it either as a face directly /or/ (should its name begin with fg: or bg:) as the cdr for a cons cell face. (The facemenu-set-foreground and facemenu-set-background commands rely on this.) Per my reading of the code, no other command there accepts user-specified faces when used interactively. [=E2=80=A6] --=20 FSF associate member #7257 np. Coming Home =E2=80=94 Iron Maiden B6A0 230= E 334A From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 25 12:43:51 2015 Received: (at 19903) by debbugs.gnu.org; 25 Feb 2015 17:43:51 +0000 Received: from localhost ([127.0.0.1]:58033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQfzy-0007jZ-Ob for submit@debbugs.gnu.org; Wed, 25 Feb 2015 12:43:51 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:63738) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQfzv-0007jL-W8 for 19903@debbugs.gnu.org; Wed, 25 Feb 2015 12:43:49 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NKC00E008X45100@a-mtaout20.012.net.il> for 19903@debbugs.gnu.org; Wed, 25 Feb 2015 19:43:40 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NKC00DCT98SWX90@a-mtaout20.012.net.il>; Wed, 25 Feb 2015 19:43:40 +0200 (IST) Date: Wed, 25 Feb 2015 19:43:52 +0200 From: Eli Zaretskii Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode In-reply-to: <87egpd3oju.fsf@violet.siamics.net> X-012-Sender: halo1@inter.net.il To: Ivan Shmakov Message-id: <83pp8x6g4n.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT References: <87pp953q1j.fsf_-_@violet.siamics.net> <83lhjslwup.fsf@gnu.org> <87h9ug4dk1.fsf@violet.siamics.net> <87d25447e8.fsf@violet.siamics.net> <874mqf4ixf.fsf@violet.siamics.net> <83lhjrcwy6.fsf@gnu.org> <87sidu3423.fsf@violet.siamics.net> <83vbiq561x.fsf@gnu.org> <87egpd3oju.fsf@violet.siamics.net> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 19903 Cc: 19903@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Ivan Shmakov > Date: Wed, 25 Feb 2015 17:10:13 +0000 > > >>>>> Eli Zaretskii writes: > >>>>> From: Ivan Shmakov Date: Wed, 25 Feb 2015 06:20:36 +0000 > > >>> I don't think internal functions should cater to UI issues, unless > >>> they are themselves interactive. > > >> I’m unsure where you see an UI issue here? The issue, as originally > >> reported, is that face-attribute fails to handle string-named faces, > >> which are considered perfectly valid by the rest of Emacs > >> (including, say, facep and the display engine.) > > > Accepting strings instead of symbols is a convenience feature > > for users, so it's a UI issue. > > Could you please elaborate on this? Specifically, does this > apply to the interactive or non-interactive use (or both) of > facemenu-add-face? Both. > >>> If we keep this confined to interactive functions, how many such > >>> functions in facemenu.el will have to be changed? If not too many, > >>> I'm inclined to keep this there. > > >> I believe that facemenu-add-face is the only function which can be > >> used to add a string-named face /interactively/, as it reads an > >> arbitrary Lisp form for the face. (See also #18369.) > > > Yes, but how many don't? > > One another (facemenu-set-face) uses read-face-name, which in > turn explicitly passes user input through ‘intern’. > > Then, facemenu-set-face-from-menu uses last-command-event (when > called interactively), assumes it’s a symbol, and uses it either > as a face directly /or/ (should its name begin with fg: or bg:) > as the cdr for a cons cell face. (The facemenu-set-foreground > and facemenu-set-background commands rely on this.) > > Per my reading of the code, no other command there accepts > user-specified faces when used interactively. So only one function needs a change? If so, I think that's what we should do. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 25 12:56:00 2015 Received: (at 19903) by debbugs.gnu.org; 25 Feb 2015 17:56:00 +0000 Received: from localhost ([127.0.0.1]:58041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQgBj-00081D-QT for submit@debbugs.gnu.org; Wed, 25 Feb 2015 12:56:00 -0500 Received: from fely.am-1.org ([78.47.74.50]:46309) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQgBh-000813-8c for 19903@debbugs.gnu.org; Wed, 25 Feb 2015 12:55:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=5cG3UHk9vPZtOYRKTOfHn82qdlV+95d6JU7JUKokIPA=; b=TMyzEnfmjf/wSPNRZ4x0F+g437JOi76psd+g9UxKfF/MTNMHQbXLkc87ohEUKGm5g7Yy27DIqSeA682ZAe4gYGQ08C0KuDeoui77FlMm91QQszDh5U+ZqE0zaMVvWaGBSrbSNo0Ks4Fwom08H0fg23bXfbE90KI1IiwWLexIeA8=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YQgBe-0002qL-9k for 19903@debbugs.gnu.org; Wed, 25 Feb 2015 17:55:54 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YQgBW-0008LF-VR for 19903@debbugs.gnu.org; Thu, 26 Feb 2015 00:55:47 +0700 From: Ivan Shmakov To: 19903@debbugs.gnu.org Subject: Re: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode References: <87pp953q1j.fsf_-_@violet.siamics.net> <83lhjslwup.fsf@gnu.org> <87h9ug4dk1.fsf@violet.siamics.net> <87d25447e8.fsf@violet.siamics.net> <874mqf4ixf.fsf@violet.siamics.net> <83lhjrcwy6.fsf@gnu.org> <87sidu3423.fsf@violet.siamics.net> <83vbiq561x.fsf@gnu.org> <87egpd3oju.fsf@violet.siamics.net> <83pp8x6g4n.fsf@gnu.org> Mail-Followup-To: 19903@debbugs.gnu.org Date: Wed, 25 Feb 2015 17:55:46 +0000 In-Reply-To: <83pp8x6g4n.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Feb 2015 19:43:52 +0200") Message-ID: <8761ap3mfx.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 19903 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) >>>>> Eli Zaretskii writes: >>>>> From: Ivan Shmakov Date: Wed, 25 Feb 2015 17:10:13 +0000 >>>>> Eli Zaretskii writes: >>>>> From: Ivan Shmakov Date: Wed, 25 Feb 2015 06:20:36 +0000 [=E2=80=A6] >>>> I=E2=80=99m unsure where you see an UI issue here? The issue, as >>>> originally reported, is that face-attribute fails to handle >>>> string-named faces, which are considered perfectly valid by the >>>> rest of Emacs (including, say, facep and the display engine.) >>> Accepting strings instead of symbols is a convenience feature >>> for users, so it's a UI issue. >> Could you please elaborate on this? Specifically, does this apply >> to the interactive or non-interactive use (or both) of >> facemenu-add-face? > Both. Frankly, I fail to see how allowing the first of the following provides for any additional convenience over the second: M-x facemenu-add-face RET "bold" RET (adds 'bold face); M-x facemenu-add-face RET bold RET (adds "bold" one.) And, similarly: (facemenu-add-face "bold" here there) (facemenu-add-face 'bold here there) [=E2=80=A6] --=20 FSF associate member #7257 When the Wild Wind Blows =E2=80=94 Iron Maiden = 230E 334A From unknown Tue Jun 17 20:18:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 26 Mar 2015 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator