From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode Date: Wed, 25 Feb 2015 06:20:36 +0000 Message-ID: <87sidu3423.fsf@violet.siamics.net> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1424845290 18475 80.91.229.3 (25 Feb 2015 06:21:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Feb 2015 06:21:30 +0000 (UTC) To: 19903@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 25 07:21:19 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YQVLQ-0005Eg-O8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Feb 2015 07:21:17 +0100 Original-Received: from localhost ([::1]:52992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQVLP-0006bh-PK for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Feb 2015 01:21:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQVLI-0006UN-Ms for bug-gnu-emacs@gnu.org; Wed, 25 Feb 2015 01:21:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQVLE-0002IO-EH for bug-gnu-emacs@gnu.org; Wed, 25 Feb 2015 01:21:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQVLD-0002Hv-0Y for bug-gnu-emacs@gnu.org; Wed, 25 Feb 2015 01:21:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YQVLC-0004Vk-JI for bug-gnu-emacs@gnu.org; Wed, 25 Feb 2015 01:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Feb 2015 06:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19903 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19903-submit@debbugs.gnu.org id=B19903.142484524917308 (code B ref 19903); Wed, 25 Feb 2015 06:21:02 +0000 Original-Received: (at 19903) by debbugs.gnu.org; 25 Feb 2015 06:20:49 +0000 Original-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 Original-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=; Original-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 Original-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 Mail-Followup-To: 19903@debbugs.gnu.org In-Reply-To: <83lhjrcwy6.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 Feb 2015 13:42:41 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99788 Archived-At: >>>>> 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