Subject: Re: bug#19903: 24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"'
From: Eli Zaretskii <[email-masked]>
To: Jorge <[email-masked]>
Cc: [email-masked]
Date: Fri, 20 Feb 2015 10:27:13 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Thu, 19 Feb 2015 15:15:40 -0200
> From: Jorge <[email-masked]>
> 
> 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.