GNU bug report logs - #6010
24.0.50; setting-constant enable-multibyte-characters

Previous Next

Package: emacs;

Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>

Date: Fri, 23 Apr 2010 07:52:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Subject: bug#6010: closed (Re: bug#6010: 24.0.50; setting-constant
 enable-multibyte-characters)
Date: Fri, 23 Apr 2010 16:22:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#6010: 24.0.50; setting-constant enable-multibyte-characters

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 6010 <at> debbugs.gnu.org.

-- 
6010: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6010
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Subject: Re: bug#6010: 24.0.50; setting-constant enable-multibyte-characters
Date: Fri, 23 Apr 2010 12:16:24 -0400
> Debugger entered--Lisp error: (setting-constant enable-multibyte-characters)
>   set-default(enable-multibyte-characters nil)
>   mm-find-buffer-file-coding-system("~/bt.gz")

Thanks.  The patch below should have fixed it,


        Stefan


=== modified file 'lisp/gnus/mm-util.el'
--- lisp/gnus/mm-util.el	2010-03-15 01:38:28 +0000
+++ lisp/gnus/mm-util.el	2010-04-23 15:04:34 +0000
@@ -1239,6 +1239,9 @@
 harmful since it is likely to modify existing data in the buffer.
 For instance, it converts \"\\300\\255\" into \"\\255\" in
 Emacs 23 (unicode)."
+  ;; FIXME: (default-value 'enable-multibyte-characters) is read-only
+  ;; so let-binding it is wrong.  The right fix is to not use this
+  ;; macro at all any more, since it's been ill-defined from the start.
   (let ((multibyte (make-symbol "multibyte"))
 	(buffer (make-symbol "buffer")))
     `(if mm-emacs-mule
@@ -1593,8 +1596,8 @@
 			    filename))
 		    (mm-decompress-buffer filename nil t))))
       (when decomp
-	(set-buffer (letf (((default-value 'enable-multibyte-characters) nil))
-			  (generate-new-buffer " *temp*")))
+	(set-buffer (generate-new-buffer " *temp*"))
+        (mm-disable-multibyte)
 	(insert decomp)
 	(setq filename (file-name-sans-extension filename)))
       (goto-char (point-min))

=== modified file 'lisp/gnus/yenc.el'
--- lisp/gnus/yenc.el	2010-01-13 08:35:10 +0000
+++ lisp/gnus/yenc.el	2010-04-23 14:59:23 +0000
@@ -89,8 +89,9 @@
 	      (when (re-search-forward "^=yend.*$" end t)
 		(setq last (match-beginning 0))
 		(setq footer-alist (yenc-parse-line (match-string 0)))
-		(letf (((default-value 'enable-multibyte-characters) nil))
-		      (setq work-buffer (generate-new-buffer " *yenc-work*")))
+                (with-current-buffer
+                    (setq work-buffer (generate-new-buffer " *yenc-work*"))
+                  (set-buffer-multibyte nil))
 		(while (< first last)
 		  (setq char (char-after first))
 		  (cond ((or (eq char ?\r)


[Message part 3 (message/rfc822, inline)]
From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; setting-constant enable-multibyte-characters
Date: Fri, 23 Apr 2010 16:50:28 +0900
Hi,

I got the following error when sending the bug#6009 report
containing the attachment bt.gz to bug-gnu-emacs <at> gnu.org:

Debugger entered--Lisp error: (setting-constant enable-multibyte-characters)
  set-default(enable-multibyte-characters nil)
  mm-find-buffer-file-coding-system("~/bt.gz")
  mml-generate-mime-1((part (type . "application/octet-stream") (filename . "~/bt.gz") (disposition . "attachment") (tag-location . 320) (contents . "")))
  mml-generate-mime-1((multipart (type . "mixed") (part (type . "text/plain") (contents . "test.\n\n")) (part (type . "application/octet-stream") (filename . "~/bt.gz") (disposition . "attachment") (tag-location . 320) (contents . ""))))
  mml-generate-mime()
  message-encode-message-body()
  message-send-mail(nil)
  my-message-send-via-mail(nil)
  message-send(nil)
  message-send-and-exit(nil)
  call-interactively(message-send-and-exit nil nil)

(I used the old mm-util.el instead then.)

It seems a matter of course, however I've never encountered such
an error for these months IIRC.  You can reproduce the same error
now by evaluating:

(letf (((default-value 'enable-multibyte-characters) nil))
  (generate-new-buffer " *temp*"))

The relevant ChangeLog entry is:

2009-09-04  Glenn Morris  <rgm <at> gnu.org>
[...]
	* mm-util.el (mm-with-unibyte-current-buffer)
	(mm-find-buffer-file-coding-system):
	* yenc.el (yenc-decode-region): Use default-value rather than
	default-enable-multibyte-characters.

Regards,




This bug report was last modified 15 years and 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.