all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ivan Shmakov <ivan@siamics.net>
To: 19903@debbugs.gnu.org
Subject: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode
Date: Fri, 20 Feb 2015 09:12:08 +0000	[thread overview]
Message-ID: <87pp953q1j.fsf_-_@violet.siamics.net> (raw)
In-Reply-To: <CAJR3Qnf1Sf+2K2RUb8JsJZzuYE3qzt9g-gr1icPLbZQpEkF7=A@mail.gmail.com> (Jorge's message of "Fri, 20 Feb 2015 06:51:54 -0200")

>>>>> Jorge  <jorge13515@gmail.com> writes:

[…]

 > 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.

	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=tar  c4e2be4587ec -- lisp/facemenu.el \
      | tar -xO | nl -ba ;  # 2015-02-16 07:22:46 +0000 
…
   785	(defun facemenu-add-new-face (face)
   786	  "Add FACE (a face) to the Face menu if `facemenu-listed-faces' says so.
   787	This is called whenever you create a new face, and at other times."
   788	  (let* (name
   789		 symbol
…
   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’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.)

-- 
FSF associate member #7257  np. Transformation — David Modica  B6A0 230E 334A





  reply	other threads:[~2015-02-20  9:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 17:15 bug#19903: 24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"' Jorge
2015-02-19 18:48 ` bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode Ivan Shmakov
2015-02-20  8:27 ` bug#19903: 24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"' Eli Zaretskii
2015-02-20  8:51 ` Jorge
2015-02-20  9:12   ` Ivan Shmakov [this message]
2015-02-20 10:07     ` bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode Eli Zaretskii
2015-02-20 17:18       ` Stefan Monnier
2015-02-20 18:56         ` Ivan Shmakov
2015-02-20 19:55           ` Stefan Monnier
2015-02-20 21:09             ` Ivan Shmakov
2015-02-21 11:12               ` Ivan Shmakov
2015-02-21 11:42                 ` Eli Zaretskii
2015-02-25  6:20                   ` Ivan Shmakov
2015-02-25 16:06                     ` Eli Zaretskii
2015-02-25 17:10                       ` Ivan Shmakov
2015-02-25 17:43                         ` Eli Zaretskii
2015-02-25 17:55                           ` Ivan Shmakov
2015-02-21 12:12         ` bug#19912: facemenu-add-face: does not handle 'face being set to a property list Ivan Shmakov
2015-02-25  7:05           ` Ivan Shmakov
2015-02-25 17:24             ` Ivan Shmakov
2015-02-26 18:12               ` Ivan Shmakov
2015-02-20 10:03   ` bug#19903: 24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"' Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pp953q1j.fsf_-_@violet.siamics.net \
    --to=ivan@siamics.net \
    --cc=19903@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.