From unknown Sun Jun 15 08:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16576: Binding `standard-output' to a function doesn't work -- function sometimes called with garbage Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jan 2014 09:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 16576@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.139090016929852 (code B ref -1); Tue, 28 Jan 2014 09:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jan 2014 09:09:29 +0000 Received: from localhost ([127.0.0.1]:38681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W84ff-0007lQ-Mo for submit@debbugs.gnu.org; Tue, 28 Jan 2014 04:09:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39794) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W84fb-0007lC-Lk for submit@debbugs.gnu.org; Tue, 28 Jan 2014 04:09:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W84fY-0000Y2-PJ for submit@debbugs.gnu.org; Tue, 28 Jan 2014 04:09:23 -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, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W84fY-0000Xy-Mb for submit@debbugs.gnu.org; Tue, 28 Jan 2014 04:09:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W84fV-00059B-Vw for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 04:09:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W84fO-0000X4-Sq for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 04:09:17 -0500 Received: from mail-ob0-x22e.google.com ([2607:f8b0:4003:c01::22e]:44144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W84fO-0000Wm-JP for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 04:09:10 -0500 Received: by mail-ob0-f174.google.com with SMTP id uy5so106104obc.19 for ; Tue, 28 Jan 2014 01:09:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=+Ne9Kb+jFQ5BIf6xzNNalFGJAIGazi9Tr4zxLFMvnXY=; b=yFEeNwtzgZGgTzbOUFrqeO2MIFaMawLmDe+spgiaIi1pAH3k4jevQsWr34c/AllwKx cOOaPrxTEXpqe/7A6fQbqTBew5FlRKwR8v4FH9yYYKKu4lOyTEQq9LnAYbZEYFnE3gZr JAE/rSl6GrwnkMb/mbeOg7TYUvZ1EyUq+ieFXm4xRMVmU2kQLSsu4Efg7dLtFO6pVin8 H8HenyJQd01muD4Mw6fU69zaBTc+HKMZn6Wo+yDNWQ7DYD4zCj5SjlujiZMuzpCvvbgj PxQvC59HGoxmuOdRLlm9664lBIiml4nXK33iL4kqrP8zH9gqR+HjRAguuKKhI5YpKAmF QGcw== MIME-Version: 1.0 X-Received: by 10.60.16.230 with SMTP id j6mr175620oed.47.1390900148827; Tue, 28 Jan 2014 01:09:08 -0800 (PST) Received: by 10.182.114.199 with HTTP; Tue, 28 Jan 2014 01:09:08 -0800 (PST) Date: Tue, 28 Jan 2014 10:09:08 +0100 Message-ID: From: Anders Lindgren Content-Type: multipart/alternative; boundary=e89a8f503bb249fa5d04f1042d90 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-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 (----) --e89a8f503bb249fa5d04f1042d90 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi! When binding `standard-output' to a function, is seems as though the function sometimes is called with garbage, like random control characters or part of the string in "random" order. I've seen this problem in Emacs 22 and Emacs 24.3. I haven't been able to reproduce it on the Emacs trunk, but I've seen some problems (although less frequent) that could be explained if the problem existed there as well. Steps to repeat: emacs -Q Eval the following: (defvar bug-bind-output-str nil) (defun bug-bind-output-function (char) (setq bug-bind-output-str (concat bug-bind-output-str (list char)))) (defun bug-bind-output-test () (interactive) (let ((bug-bind-output-str "") (standard-output 'bug-bind-output-function) (s "(\\(co\\(?:mbine-after-change-calls\\|nd\\(?:ition-case\\(?:-unless-debug\= \)?\\)?\\)\\|eval-\\(?:a\\(?:fter-load\\|nd-compile\\)\\|next-after-load\\|= when\\(?:-compile\\)?\\)\\|i\\(?:f\\|nline\\)\\|l\\(?:ambda\\|et\\(?:\\*\\|= rec\\)?\\)\\|p\\(?:case\\(?:-let\\*?\\)?\\|rog[*12nv]?\\)\\|save-\\(?:curre= nt-buffer\\|excursion\\|match-data\\|restriction\\|selected-window\\|window= -excursion\\)\\|track-mouse\\|unwind-protect\\|w\\(?:hile\\(?:-no-input\\)?= \\|ith-\\(?:c\\(?:a\\(?:\\(?:se\\|tegory\\)-table\\)\\|urrent-buffer\\)\\|d= emoted-errors\\|electric-help\\|local-quit\\|no-warnings\\|output-to-\\(?:s= tring\\|temp-buffer\\)\\|s\\(?:elected-\\(?:frame\\|window\\)\\|ilent-modif= ications\\|yntax-table\\)\\|t\\(?:emp-\\(?:buffer\\|\\(?:fil\\|messag\\)e\\= )\\|imeout\\(?:-handler\\)?\\)\\|wrapper-hook\\)\\)\\)\\>") s0) (prin1 s) bug-bind-output-str)) Type this a number of times: M-x (bug-bind-output-test) RET A correct output looks like: "\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition-case\\\\(?:-u= nless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-load\\\\|nd-compi= le\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\)\\\\|i\\\\(?:= f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|rec\\\\)?\\\\)\\\= \|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\\|save-\\\\(?:= current-buffer\\\\|excursion\\\\|match-data\\\\|restriction\\\\|selected-wi= ndow\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-protect\\\\|w\\\\= (?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:\\\\(?:se\\\\|= tegory\\\\)-table\\\\)\\\\|urrent-buffer\\\\)\\\\|demoted-errors\\\\|electr= ic-help\\\\|local-quit\\\\|no-warnings\\\\|output-to-\\\\(?:string\\\\|temp= -buffer\\\\)\\\\|s\\\\(?:elected-\\\\(?:frame\\\\|window\\\\)\\\\|ilent-mod= ifications\\\\|yntax-table\\\\)\\\\|t\\\\(?:emp-\\\\(?:buffer\\\\|\\\\(?:fi= l\\\\|messag\\\\)e\\\\)\\\\|imeout\\\\(?:-handler\\\\)?\\\\)\\\\|wrapper-ho= ok\\\\)\\\\)\\\\)\\\\>\"" This is an example of bad output, here, the last couple of lines does not correspond to the string being printed. "\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition-case\\\\(?:-u= nless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-load\\\\|nd-compi= le\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\)\\\\|i\\\\(?:= f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|rec\\\\)?\\\\)\\\= \|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\\|save-\\\\(?:= current-buffer\\\\|excursion\\\\|match-data\\\\|restriction\\\\|selected-wi= ndow\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-protect\\\\|w\\\\= (?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:\\\\(?:se\\\\|= tegory\\\\\\\\(?:-no-input\\\\\\\\)?\\\\\\\\|ith-\\\\\\\\(?:c\\\\\\\\(?:a\\= \\\\\\(?:\\\\\\\\(?:se\\\\\\\\|tegory\\\\loca=10=17w=01\\\"(\\\\\\\\(co\\\\= \\\\(?:mbine-after-change-calls\\\\\\\\|nd\\\\\\\\(?:ition-case\\\\\\\\(?:-= unless-debug\\\\\\\\)?\\\\\\\\)?\\\\\\\\)\\\\\\\\|eval-\\\\\\\\(?:a\\\\\\\\= (?:fter-load\\\\\\\\|nd-compile\\\\\\\\)\\\\\\\\|next-after-load\\\\\\\\|wh= en\\\\\\\\(?:-compile\\\\\\\\)?\\\\\\\\)\\\\\\\\|i\\\\\\\\(?:f\\\\\\\\|nlin= e\\\\\\\\)\\\\\\\\|l\\\\\\\\(?:ambd\"" Other examples of bad output is if the string contains random control characters. I've noticed that this is intermittent. Sometimes, say, every tenth call returns a broken string. Sometimes it feels as though you can call the function any number of times without getting a bad string. Sincerely, Anders Lindgren If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /Applications/Emacs24.3.app/Contents/Resources/etc/DEBUG. In GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org Windowing system distributor `Apple', version 10.3.1265 Configured using: `configure '--host=3Dx86_64-apple-darwin' '--build=3Di686-apple-darwin' '--with-ns' 'build_alias=3Di686-apple-darwin' 'host_alias=3Dx86_64-apple-darwin' 'CC=3Dgcc -mmacosx-version-min=3D10.7 -isystem /Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Developer/Platforms/MacOS= X.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/ -F/Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Developer/Platforms/Mac= OSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks'' Important settings: value of $LC_CTYPE: UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: 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 C-x C-x : ( b i g u g - b i t ) : : : : : : : : : : : x e m a c s - b u C-g x m e m a c s - b i u g C-g r e p o r t - e m Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Loading vc-svn...done bug-bind-output-str bug-bind-output-function bug-bind-output-test "\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition-case\\\\(?:-u= nless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-load\\\\|nd-compi= le\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\)\\\\|i\\\\(?:= f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|rec\\\\)?\\\\)\\\= \|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\\|save-\\\\(?:= current-buffer\\\\|excursion\\\\|match-data\\\\|restriction\\\\|selected-wi= ndow\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-protect\\\\|w\\\\= (?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:\\\\(?:se\\\\|= tegory\\\\)-table\\\\)\\\\|urrent-buffer\\\\)\\\\|demoted-errors\\\\|electr= ic-help\\\\|local-quit\\\\|no-warnings\\\\|output-to-\\\\(?:string\\\\|temp= -buffer\\\\)\\\\|s\\\\(?:elected-\\\\(?:frame\\\\|window\\\\)\\\\|ilent-mod= ifications\\\\|yntax-table\\\\)\\\\|t\\\\(?:emp-\\\\(?:buffer\\\\|\\\\(?:fi= l\\\\|messag\\\\)e\\\\)\\\\|imeout\\\\(?:-handler\\\\)?\\\\)\\\\|wrapper-ho= ok\\\\)\\\\)\\\\)\\\\>\"" [11 times] "\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition-case\\\\(?:-u= nless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-load\\\\|nd-compi= le\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\)\\\\|i\\\\(?:= f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|rec\\\\)?\\\\)\\\= \|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\\|save-\\\\(?:= current-buffer\\\\|excursion\\\\|match-data\\\\|restriction\\\\|selected-wi= ndow\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-protect\\\\|w\\\\= (?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:\\\\(?:se\\\\|= tegory\\\\\\\\(?:-no-input\\\\\\\\)?\\\\\\\\|ith-\\\\\\\\(?:c\\\\\\\\(?:a\\= \\\\\\(?:\\\\\\\\(?:se\\\\\\\\|tegory\\\\loca=10=17w=01\\\"(\\\\\\\\(co\\\\= \\\\(?:mbine-after-change-calls\\\\\\\\|nd\\\\\\\\(?:ition-case\\\\\\\\(?:-= unless-debug\\\\\\\\)?\\\\\\\\)?\\\\\\\\)\\\\\\\\|eval-\\\\\\\\(?:a\\\\\\\\= (?:fter-load\\\\\\\\|nd-compile\\\\\\\\)\\\\\\\\|next-after-load\\\\\\\\|wh= en\\\\\\\\(?:-compile\\\\\\\\)?\\\\\\\\)\\\\\\\\|i\\\\\\\\(?:f\\\\\\\\|nlin= e\\\\\\\\)\\\\\\\\|l\\\\\\\\(?:ambd\"" Quit Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils vc-dispatcher vc-svn time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-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 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 ns multi-tty emacs) --e89a8f503bb249fa5d04f1042d90 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi!

When binding `standard-o= utput' to a function, is seems as though the function sometimes is call= ed with garbage, like random control characters or part of the string in &q= uot;random" order.

I've seen this problem in Emacs 22 and Emacs 24.3. = I haven't been able to reproduce it on the Emacs trunk, but I've se= en some problems (although less frequent) that could be explained if the pr= oblem existed there as well.

Steps to repeat:

=A0 =A0 emacs= -Q
=A0 =A0 Eval the following:

(de= fvar bug-bind-output-str nil)

(defun bug-bind-outp= ut-function (char)
=A0 (setq bug-bind-output-str
=A0 =A0 =A0 =A0 (concat bug-bi= nd-output-str (list char))))

(defun bug-bind-outpu= t-test ()
=A0 (interactive)
=A0 (let ((bug-bind-output-= str "")
=A0 =A0 =A0 =A0 (standard-output 'bug-bind-output-function)
<= div>=A0 =A0 =A0 =A0 (s "(\\(co\\(?:mbine-after-change-calls\\|nd\\(?:i= tion-case\\(?:-unless-debug\\)?\\)?\\)\\|eval-\\(?:a\\(?:fter-load\\|nd-com= pile\\)\\|next-after-load\\|when\\(?:-compile\\)?\\)\\|i\\(?:f\\|nline\\)\\= |l\\(?:ambda\\|et\\(?:\\*\\|rec\\)?\\)\\|p\\(?:case\\(?:-let\\*?\\)?\\|rog[= *12nv]?\\)\\|save-\\(?:current-buffer\\|excursion\\|match-data\\|restrictio= n\\|selected-window\\|window-excursion\\)\\|track-mouse\\|unwind-protect\\|= w\\(?:hile\\(?:-no-input\\)?\\|ith-\\(?:c\\(?:a\\(?:\\(?:se\\|tegory\\)-tab= le\\)\\|urrent-buffer\\)\\|demoted-errors\\|electric-help\\|local-quit\\|no= -warnings\\|output-to-\\(?:string\\|temp-buffer\\)\\|s\\(?:elected-\\(?:fra= me\\|window\\)\\|ilent-modifications\\|yntax-table\\)\\|t\\(?:emp-\\(?:buff= er\\|\\(?:fil\\|messag\\)e\\)\\|imeout\\(?:-handler\\)?\\)\\|wrapper-hook\\= )\\)\\)\\>")
=A0 =A0 =A0 =A0 s0)
=A0 =A0 (prin1 s)
=A0 =A0 = bug-bind-output-str))

Type this a number= of times:

=A0 =A0 M-x (bug-bind-output-test) RET<= /div>

A correct output looks like:


<= div>"\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition= -case\\\\(?:-unless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-loa= d\\\\|nd-compile\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\= )\\\\|i\\\\(?:f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|rec= \\\\)?\\\\)\\\\|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\= \|save-\\\\(?:current-buffer\\\\|excursion\\\\|match-data\\\\|restriction\\= \\|selected-window\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-pro= tect\\\\|w\\\\(?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:= \\\\(?:se\\\\|tegory\\\\)-table\\\\)\\\\|urrent-buffer\\\\)\\\\|demoted-err= ors\\\\|electric-help\\\\|local-quit\\\\|no-warnings\\\\|output-to-\\\\(?:s= tring\\\\|temp-buffer\\\\)\\\\|s\\\\(?:elected-\\\\(?:frame\\\\|window\\\\)= \\\\|ilent-modifications\\\\|yntax-table\\\\)\\\\|t\\\\(?:emp-\\\\(?:buffer= \\\\|\\\\(?:fil\\\\|messag\\\\)e\\\\)\\\\|imeout\\\\(?:-handler\\\\)?\\\\)\= \\\|wrapper-hook\\\\)\\\\)\\\\)\\\\>\""

This is an example of bad output, here, the last couple= of lines does not correspond to the string being printed.

"\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:= ition-case\\\\(?:-unless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fte= r-load\\\\|nd-compile\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)= ?\\\\)\\\\|i\\\\(?:f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\= \|rec\\\\)?\\\\)\\\\|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\= \)\\\\|save-\\\\(?:current-buffer\\\\|excursion\\\\|match-data\\\\|restrict= ion\\\\|selected-window\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwin= d-protect\\\\|w\\\\(?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\= \\(?:\\\\(?:se\\\\|tegory\\\\\\\\(?:-no-input\\\\\\\\)?\\\\\\\\|ith-\\\\\\\= \(?:c\\\\\\\\(?:a\\\\\\\\(?:\\\\\\\\(?:se\\\\\\\\|tegory\\\\loca=10=17w=01\= \\"(\\\\\\\\(co\\\\\\\\(?:mbine-after-change-calls\\\\\\\\|nd\\\\\\\\(= ?:ition-case\\\\\\\\(?:-unless-debug\\\\\\\\)?\\\\\\\\)?\\\\\\\\)\\\\\\\\|e= val-\\\\\\\\(?:a\\\\\\\\(?:fter-load\\\\\\\\|nd-compile\\\\\\\\)\\\\\\\\|ne= xt-after-load\\\\\\\\|when\\\\\\\\(?:-compile\\\\\\\\)?\\\\\\\\)\\\\\\\\|i\= \\\\\\\(?:f\\\\\\\\|nline\\\\\\\\)\\\\\\\\|l\\\\\\\\(?:ambd\""

Other examples of bad output is if the string con= tains random control characters.

I've noticed = that this is intermittent. Sometimes, say, every tenth call returns a broke= n string. Sometimes it feels as though you can call the function any number= of times without getting a bad string.

Sincerely,
=A0 =A0 Anders Lindgren
=

If Emacs crashed, and you have the Emacs proc= ess in the gdb debugger,
please include the output from the follo= wing gdb commands:
=A0 =A0 `bt full' and `xbacktrace'.
For information = about debugging Emacs, please read the file
/Applications/Emacs24= .3.app/Contents/Resources/etc/DEBUG.


In GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
=A0of 2013-03-13 on bob.porkrind.org<= /a>
Windowing system distributor `Apple', version 10.3.1265
Configured using:
=A0`configure '--host=3Dx86_64-apple-d= arwin' '--build=3Di686-apple-darwin'
=A0'--with-n= s' 'build_alias=3Di686-apple-darwin'
=A0'host_ali= as=3Dx86_64-apple-darwin' 'CC=3Dgcc -mmacosx-version-min=3D10.7
=A0-isystem
=A0/Users/david/Xcode-10.7_4.5.2/Xcode.app/Conte= nts/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/i= nclude/
=A0-F/Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Dev= eloper/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Libra= ry/Frameworks''

Important settings:
=A0 value of $LC_CTYPE: U= TF-8
=A0 locale-coding-system: utf-8-unix
=A0 default e= nable-multibyte-characters: t

Major mode: Emacs-Li= sp

Minor modes in effect:
=A0 tooltip-mode: t
=A0 mouse-wheel-mode: t
=A0 tool-bar-mode: t
= =A0 menu-bar-mode: t
=A0 file-name-shadow-mode: t
=A0 g= lobal-font-lock-mode: t
=A0 font-lock-mode: t
=A0 blink-cursor-mode: t
=A0= auto-composition-mode: t
=A0 auto-encryption-mode: t
= =A0 auto-compression-mode: t
=A0 line-number-mode: t
= =A0 transient-mark-mode: t

Recent input:
<down> <right> <= right> <escape> C-x <down> <down> <down>=A0
<escape> C-x <down> <down> <down> <down>= ; <down> <down>=A0
<escape> C-x <escape> : ( b i g <backspace> <back= space>=A0
u g - b i <tab> t <tab> ) <return>= <escape> : <up>=A0
<return> <escape> : &= lt;up> <return> <escape> : <up> <return>=A0
<escape> : <up> <return> <escape> : <up>= <return> <escape>=A0
: <up> <return> <= ;escape> : <up> <return> <escape> :=A0
<u= p> <return> <escape> : <up> <return> <escape&= gt; : <up>=A0
<return> <escape> : <up> <return> <escape&g= t; x e m a=A0
c s - b u <tab> C-g <escape> x m <ba= ckspace> e m a=A0
c s - b i <backspace> u g <tab> = <s-backspace> <s-backspace>=A0
<escape> <backspace> <escape> <backspace> <= escape>=A0
C-g r e p o r t - e m <tab> <return>

Recent messages:
For information about GNU= Emacs and the GNU system, type C-h C-a.
Loading vc-svn...done
bug-bind-output-str
bug-bind= -output-function
bug-bind-output-test
"\"(\\\= \(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition-case\\\\(?:-unless-d= ebug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-load\\\\|nd-compile\\\\)= \\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\)\\\\|i\\\\(?:f\\\\|n= line\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|rec\\\\)?\\\\)\\\\|p\\\\= (?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\\|save-\\\\(?:current= -buffer\\\\|excursion\\\\|match-data\\\\|restriction\\\\|selected-window\\\= \|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-protect\\\\|w\\\\(?:hile= \\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:\\\\(?:se\\\\|tegory\= \\\)-table\\\\)\\\\|urrent-buffer\\\\)\\\\|demoted-errors\\\\|electric-help= \\\\|local-quit\\\\|no-warnings\\\\|output-to-\\\\(?:string\\\\|temp-buffer= \\\\)\\\\|s\\\\(?:elected-\\\\(?:frame\\\\|window\\\\)\\\\|ilent-modificati= ons\\\\|yntax-table\\\\)\\\\|t\\\\(?:emp-\\\\(?:buffer\\\\|\\\\(?:fil\\\\|m= essag\\\\)e\\\\)\\\\|imeout\\\\(?:-handler\\\\)?\\\\)\\\\|wrapper-hook\\\\)= \\\\)\\\\)\\\\>\"" [11 times]
"\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:itio= n-case\\\\(?:-unless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-lo= ad\\\\|nd-compile\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\= \)\\\\|i\\\\(?:f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|re= c\\\\)?\\\\)\\\\|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\= \\|save-\\\\(?:current-buffer\\\\|excursion\\\\|match-data\\\\|restriction\= \\\|selected-window\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-pr= otect\\\\|w\\\\(?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?= :\\\\(?:se\\\\|tegory\\\\\\\\(?:-no-input\\\\\\\\)?\\\\\\\\|ith-\\\\\\\\(?:= c\\\\\\\\(?:a\\\\\\\\(?:\\\\\\\\(?:se\\\\\\\\|tegory\\\\loca=10=17w=01\\\&q= uot;(\\\\\\\\(co\\\\\\\\(?:mbine-after-change-calls\\\\\\\\|nd\\\\\\\\(?:it= ion-case\\\\\\\\(?:-unless-debug\\\\\\\\)?\\\\\\\\)?\\\\\\\\)\\\\\\\\|eval-= \\\\\\\\(?:a\\\\\\\\(?:fter-load\\\\\\\\|nd-compile\\\\\\\\)\\\\\\\\|next-a= fter-load\\\\\\\\|when\\\\\\\\(?:-compile\\\\\\\\)?\\\\\\\\)\\\\\\\\|i\\\\\= \\\(?:f\\\\\\\\|nline\\\\\\\\)\\\\\\\\|l\\\\\\\\(?:ambd\""
Quit

Load-path shadows:
None found.=

Features:
(shadow sort gnus-util mail-e= xtr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-d= ecode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils vc-dispatcher vc-svn time-date toolti= p
ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd = fontset
image regexp-opt fringe tabulated-list newcomment lisp-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<= /div>
greek romanian slovak czech european ethiopic indian cyrillic chi= nese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuf= fer loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5<= /div>
base64 format env code-pages mule custom widget hashtable-print-r= eadable
backquote make-network-process ns multi-tty emacs)

--e89a8f503bb249fa5d04f1042d90-- From unknown Sun Jun 15 08:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16576: Binding `standard-output' to a function doesn't work -- function sometimes called with garbage Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jan 2014 16:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Anders Lindgren Cc: 16576@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 16576-submit@debbugs.gnu.org id=B16576.139092476914205 (code B ref 16576); Tue, 28 Jan 2014 16:00:02 +0000 Received: (at 16576) by debbugs.gnu.org; 28 Jan 2014 15:59:29 +0000 Received: from localhost ([127.0.0.1]:39435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8B4T-0003h3-3c for submit@debbugs.gnu.org; Tue, 28 Jan 2014 10:59:29 -0500 Received: from mtaout25.012.net.il ([80.179.55.181]:45730) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8B4Q-0003gs-Ca for 16576@debbugs.gnu.org; Tue, 28 Jan 2014 10:59:27 -0500 Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N0400K00CBDHF00@mtaout25.012.net.il> for 16576@debbugs.gnu.org; Tue, 28 Jan 2014 17:59:00 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0400KJFCECF800@mtaout25.012.net.il>; Tue, 28 Jan 2014 17:59:00 +0200 (IST) Date: Tue, 28 Jan 2014 17:59:20 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83ob2w85d3.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) 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: 1.0 (+) > Date: Tue, 28 Jan 2014 10:09:08 +0100 > From: Anders Lindgren > > emacs -Q > Eval the following: > > (defvar bug-bind-output-str nil) > > (defun bug-bind-output-function (char) > (setq bug-bind-output-str > (concat bug-bind-output-str (list char)))) > > (defun bug-bind-output-test () > (interactive) > (let ((bug-bind-output-str "") > (standard-output 'bug-bind-output-function) > (s > "(\\(co\\(?:mbine-after-change-calls\\|nd\\(?:ition-case\\(?:-unless-debug\\)?\\)?\\)\\|eval-\\(?:a\\(?:fter-load\\|nd-compile\\)\\|next-after-load\\|when\\(?:-compile\\)?\\)\\|i\\(?:f\\|nline\\)\\|l\\(?:ambda\\|et\\(?:\\*\\|rec\\)?\\)\\|p\\(?:case\\(?:-let\\*?\\)?\\|rog[*12nv]?\\)\\|save-\\(?:current-buffer\\|excursion\\|match-data\\|restriction\\|selected-window\\|window-excursion\\)\\|track-mouse\\|unwind-protect\\|w\\(?:hile\\(?:-no-input\\)?\\|ith-\\(?:c\\(?:a\\(?:\\(?:se\\|tegory\\)-table\\)\\|urrent-buffer\\)\\|demoted-errors\\|electric-help\\|local-quit\\|no-warnings\\|output-to-\\(?:string\\|temp-buffer\\)\\|s\\(?:elected-\\(?:frame\\|window\\)\\|ilent-modifications\\|yntax-table\\)\\|t\\(?:emp-\\(?:buffer\\|\\(?:fil\\|messag\\)e\\)\\|imeout\\(?:-handler\\)?\\)\\|wrapper-hook\\)\\)\\)\\>") > s0) > (prin1 s) > bug-bind-output-str)) > > Type this a number of times: > > M-x (bug-bind-output-test) RET I think there's a bug in your test program. You let-bind bug-bind-output-str, and print that local binding after you call prin1. But your print function concatenates each character onto the _global_ binding of bug-bind-output-str, so the result is not in your local binding, it's in the global one. If you change your program like this: (defun bug-bind-output-test () (interactive) (setq bug-bind-output-str "") (let ((standard-output 'bug-bind-output-function) (s "(\\(co\\(?:mbine-after-change-calls\\|nd\\(?:ition-case\\(?:-unless-debug\\)?\\)?\\)\\|eval-\\(?:a\\(?:fter-load\\|nd-compile\\)\\|next-after-load\\|when\\(?:-compile\\)?\\)\\|i\\(?:f\\|nline\\)\\|l\\(?:ambda\\|et\\(?:\\*\\|rec\\)?\\)\\|p\\(?:case\\(?:-let\\*?\\)?\\|rog[*12nv]?\\)\\|save-\\(?:current-buffer\\|excursion\\|match-data\\|restriction\\|selected-window\\|window-excursion\\)\\|track-mouse\\|unwind-protect\\|w\\(?:hile\\(?:-no-input\\)?\\|ith-\\(?:c\\(?:a\\(?:\\(?:se\\|tegory\\)-table\\)\\|urrent-buffer\\)\\|demoted-errors\\|electric-help\\|local-quit\\|no-warnings\\|output-to-\\(?:string\\|temp-buffer\\)\\|s\\(?:elected-\\(?:frame\\|window\\)\\|ilent-modifications\\|yntax-table\\)\\|t\\(?:emp-\\(?:buffer\\|\\(?:fil\\|messag\\)e\\)\\|imeout\\(?:-handler\\)?\\)\\|wrapper-hook\\)\\)\\)\\>") s0) (prin1 s) bug-bind-output-str)) i.e., work with the global binding, then the program works as expected, AFAICS. From unknown Sun Jun 15 08:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16576: Binding `standard-output' to a function doesn't work -- function sometimes called with garbage Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jan 2014 19:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 16576@debbugs.gnu.org Received: via spool by 16576-submit@debbugs.gnu.org id=B16576.13909380107523 (code B ref 16576); Tue, 28 Jan 2014 19:41:02 +0000 Received: (at 16576) by debbugs.gnu.org; 28 Jan 2014 19:40:10 +0000 Received: from localhost ([127.0.0.1]:39568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8EW0-0001xG-LH for submit@debbugs.gnu.org; Tue, 28 Jan 2014 14:40:09 -0500 Received: from mail-oa0-f42.google.com ([209.85.219.42]:46971) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8EVs-0001we-Vr for 16576@debbugs.gnu.org; Tue, 28 Jan 2014 14:40:02 -0500 Received: by mail-oa0-f42.google.com with SMTP id i7so954161oag.15 for <16576@debbugs.gnu.org>; Tue, 28 Jan 2014 11:39:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kz9BnItxi6xb8cdHZ0AH6k6sAvMBenRMz5FwMnSz8LY=; b=duBLgpB7iosGIvN28J05hOBl2gY+u+bj+UoT72j+Vbrpsqlm+coLB08CjFDi0++ku0 VjFaJYnJ7/aLb5gsKJInJe2B+tg/h4s9vfWVmdZJjxolPC4om8AV7EqJg+9r6Efxk4k/ d1viULcaDa0z97Q0A0PhZgizNLfFKKrlv/ZqUFXc9gh8UVVVYx4wqMwC2SrQ/azq75sq b7X0Q394ik1IHMk5zw6+NOezdqZ72FYCGXCvUxZXPKaT33l7TfFAFmes/m4XogFZl71z iLDuloFOV5BKI+AU0rv2e/C5u/gEeChlw5S7a/M3q5UTV92hS7em7BgfRQEBepDKE7AJ suxQ== MIME-Version: 1.0 X-Received: by 10.60.44.42 with SMTP id b10mr1199534oem.70.1390937997258; Tue, 28 Jan 2014 11:39:57 -0800 (PST) Received: by 10.182.114.199 with HTTP; Tue, 28 Jan 2014 11:39:57 -0800 (PST) In-Reply-To: <83ob2w85d3.fsf@gnu.org> References: <83ob2w85d3.fsf@gnu.org> Date: Tue, 28 Jan 2014 20:39:57 +0100 Message-ID: From: Anders Lindgren Content-Type: multipart/alternative; boundary=001a11c30a043b368204f10cfd75 X-Spam-Score: -0.7 (/) 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 (/) --001a11c30a043b368204f10cfd75 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi! I got the same result with your version. After running it 24 times, I got the following output (on Emacs 22) -- please note the extra text and control characters towards the end of the string (which I have changed to the \xNN syntax, in order not to confuse the mail program). "\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition-case\\\\(?:-u= nless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-load\\\\|nd-compi= le\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\)\\\\\\\\|p\\\= \(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\\|save-\\\\(?:curren= t-buffer\\\\|excursion\\\\|match-data\\\\|restriction\\\\|selected-window\\= \\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-protect\\\\|w\\\\(?:hil= e\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:\\\\(?:se\\\\|tegory= \\\\)-table\\\\)\\\\|urrent-buffer\\\\)\\\\|demoted-errors\\\\|electric-hel= p\\\\|local-quit\\\\|no-warnings\\\\|output-to-\\\\(?:string\\\\|temp-buffe= r\\\\)\\\\|s\\\\(?:elected-\\\\(?:frame\\\\|window\\\\)\\\\|ilent-modificat= ions\\\\|yntax-table\\\\)\\\\|t\\\\(?:emp-\\\\(?:buffer\\\\|\\\\(?:fil\\\\|= messag\\\\)e\\\\)\\\\|imeout\\\\(?:-handler\\\\)?\\\\)\\\\|wrapper-hook\\\\= )\\\\)\\\\)\\\\>\x00cs/ \xdc\xac=06\\\"(\\\\\\\\(co\\\\\\\\(?:mbine-after-change-calls\\\\\\\\|n\"" When it comes to the original program, I believe that it's correct. The function bound to `standard-output' is called from within `prin1', which is called from inside the scope of `let'. Hence, it will work on the local version of the variable. (If it wouldn't have been correct -- why would it return the correct value *most* of the time?) -- Anders On Tue, Jan 28, 2014 at 4:59 PM, Eli Zaretskii wrote: > > Date: Tue, 28 Jan 2014 10:09:08 +0100 > > From: Anders Lindgren > > > > emacs -Q > > Eval the following: > > > > (defvar bug-bind-output-str nil) > > > > (defun bug-bind-output-function (char) > > (setq bug-bind-output-str > > (concat bug-bind-output-str (list char)))) > > > > (defun bug-bind-output-test () > > (interactive) > > (let ((bug-bind-output-str "") > > (standard-output 'bug-bind-output-function) > > (s > > > "(\\(co\\(?:mbine-after-change-calls\\|nd\\(?:ition-case\\(?:-unless-debu= g\\)?\\)?\\)\\|eval-\\(?:a\\(?:fter-load\\|nd-compile\\)\\|next-after-load\= \|when\\(?:-compile\\)?\\)\\|i\\(?:f\\|nline\\)\\|l\\(?:ambda\\|et\\(?:\\*\= \|rec\\)?\\)\\|p\\(?:case\\(?:-let\\*?\\)?\\|rog[*12nv]?\\)\\|save-\\(?:cur= rent-buffer\\|excursion\\|match-data\\|restriction\\|selected-window\\|wind= ow-excursion\\)\\|track-mouse\\|unwind-protect\\|w\\(?:hile\\(?:-no-input\\= )?\\|ith-\\(?:c\\(?:a\\(?:\\(?:se\\|tegory\\)-table\\)\\|urrent-buffer\\)\\= |demoted-errors\\|electric-help\\|local-quit\\|no-warnings\\|output-to-\\(?= :string\\|temp-buffer\\)\\|s\\(?:elected-\\(?:frame\\|window\\)\\|ilent-mod= ifications\\|yntax-table\\)\\|t\\(?:emp-\\(?:buffer\\|\\(?:fil\\|messag\\)e= \\)\\|imeout\\(?:-handler\\)?\\)\\|wrapper-hook\\)\\)\\)\\>") > > s0) > > (prin1 s) > > bug-bind-output-str)) > > > > Type this a number of times: > > > > M-x (bug-bind-output-test) RET > > I think there's a bug in your test program. You let-bind > bug-bind-output-str, and print that local binding after you call > prin1. But your print function concatenates each character onto the > _global_ binding of bug-bind-output-str, so the result is not in your > local binding, it's in the global one. > > If you change your program like this: > > (defun bug-bind-output-test () > (interactive) > (setq bug-bind-output-str "") > (let ((standard-output 'bug-bind-output-function) > (s > > "(\\(co\\(?:mbine-after-change-calls\\|nd\\(?:ition-case\\(?:-unless-debu= g\\)?\\)?\\)\\|eval-\\(?:a\\(?:fter-load\\|nd-compile\\)\\|next-after-load\= \|when\\(?:-compile\\)?\\)\\|i\\(?:f\\|nline\\)\\|l\\(?:ambda\\|et\\(?:\\*\= \|rec\\)?\\)\\|p\\(?:case\\(?:-let\\*?\\)?\\|rog[*12nv]?\\)\\|save-\\(?:cur= rent-buffer\\|excursion\\|match-data\\|restriction\\|selected-window\\|wind= ow-excursion\\)\\|track-mouse\\|unwind-protect\\|w\\(?:hile\\(?:-no-input\\= )?\\|ith-\\(?:c\\(?:a\\(?:\\(?:se\\|tegory\\)-table\\)\\|urrent-buffer\\)\\= |demoted-errors\\|electric-help\\|local-quit\\|no-warnings\\|output-to-\\(?= :string\\|temp-buffer\\)\\|s\\(?:elected-\\(?:frame\\|window\\)\\|ilent-mod= ifications\\|yntax-table\\)\\|t\\(?:emp-\\(?:buffer\\|\\(?:fil\\|messag\\)e= \\)\\|imeout\\(?:-handler\\)?\\)\\|wrapper-hook\\)\\)\\)\\>") > s0) > (prin1 s) > bug-bind-output-str)) > > i.e., work with the global binding, then the program works as > expected, AFAICS. > --001a11c30a043b368204f10cfd75 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi!

I got the same result with your ver= sion. After running it 24 times, I got the following output (on Emacs 22) -= - please note the extra text and control characters towards the end of the = string (which I have changed to the \xNN syntax, in order not to confuse th= e mail program).

"\"(\\\\(co\\\\(?:mbine-after-change-calls\\\= \|nd\\\\(?:ition-case\\\\(?:-unless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:= a\\\\(?:fter-load\\\\|nd-compile\\\\)\\\\|next-after-load\\\\|when\\\\(?:-c= ompile\\\\)?\\\\)\\\\\\\\|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv= ]?\\\\)\\\\|save-\\\\(?:current-buffer\\\\|excursion\\\\|match-data\\\\|res= triction\\\\|selected-window\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|= unwind-protect\\\\|w\\\\(?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(= ?:a\\\\(?:\\\\(?:se\\\\|tegory\\\\)-table\\\\)\\\\|urrent-buffer\\\\)\\\\|d= emoted-errors\\\\|electric-help\\\\|local-quit\\\\|no-warnings\\\\|output-t= o-\\\\(?:string\\\\|temp-buffer\\\\)\\\\|s\\\\(?:elected-\\\\(?:frame\\\\|w= indow\\\\)\\\\|ilent-modifications\\\\|yntax-table\\\\)\\\\|t\\\\(?:emp-\\\= \(?:buffer\\\\|\\\\(?:fil\\\\|messag\\\\)e\\\\)\\\\|imeout\\\\(?:-handler\\= \\)?\\\\)\\\\|wrapper-hook\\\\)\\\\)\\\\)\\\\>\x00cs/ \xdc\xac=06\\\&quo= t;(\\\\\\\\(co\\\\\\\\(?:mbine-after-change-calls\\\\\\\\|n\""

When it comes to the original program, I believe = that it's correct. The function bound to `standard-output' is calle= d from within `prin1', which is called from inside the scope of `let= 9;. Hence, it will work on the local version of the variable. (If it wouldn= 't have been correct -- why would it return the correct value *most* of= the time?)

=A0 =A0 -- Anders


On Tue, Jan 28, 2014 at 4:59 PM, Eli Za= retskii <eliz@gnu.org> wrote:
> Date: Tue, 28 Jan 2014 10:09:08 +0100 > From: Anders Lindgren <andlind= @gmail.com>
>
> =A0 =A0 emacs -Q
> =A0 =A0 Eval the following:
>
> (defvar bug-bind-output-str nil)
>
> (defun bug-bind-output-function (char)
> =A0 (setq bug-bind-output-str
> =A0 =A0 =A0 =A0 (concat bug-bind-output-str (list char))))
>
> (defun bug-bind-output-test ()
> =A0 (interactive)
> =A0 (let ((bug-bind-output-str "")
> =A0 =A0 =A0 =A0 (standard-output 'bug-bind-output-function)
> =A0 =A0 =A0 =A0 (s
> "(\\(co\\(?:mbine-after-change-calls\\|nd\\(?:ition-case\\(?:-unl= ess-debug\\)?\\)?\\)\\|eval-\\(?:a\\(?:fter-load\\|nd-compile\\)\\|next-aft= er-load\\|when\\(?:-compile\\)?\\)\\|i\\(?:f\\|nline\\)\\|l\\(?:ambda\\|et\= \(?:\\*\\|rec\\)?\\)\\|p\\(?:case\\(?:-let\\*?\\)?\\|rog[*12nv]?\\)\\|save-= \\(?:current-buffer\\|excursion\\|match-data\\|restriction\\|selected-windo= w\\|window-excursion\\)\\|track-mouse\\|unwind-protect\\|w\\(?:hile\\(?:-no= -input\\)?\\|ith-\\(?:c\\(?:a\\(?:\\(?:se\\|tegory\\)-table\\)\\|urrent-buf= fer\\)\\|demoted-errors\\|electric-help\\|local-quit\\|no-warnings\\|output= -to-\\(?:string\\|temp-buffer\\)\\|s\\(?:elected-\\(?:frame\\|window\\)\\|i= lent-modifications\\|yntax-table\\)\\|t\\(?:emp-\\(?:buffer\\|\\(?:fil\\|me= ssag\\)e\\)\\|imeout\\(?:-handler\\)?\\)\\|wrapper-hook\\)\\)\\)\\>"= ;)
> =A0 =A0 =A0 =A0 s0)
> =A0 =A0 (prin1 s)
> =A0 =A0 bug-bind-output-str))
>
> Type this a number of times:
>
> =A0 =A0 M-x (bug-bind-output-test) RET

I think there's a bug in your test program. =A0You let-bind
bug-bind-output-str, and print that local binding after you call
prin1. =A0But your print function concatenates each character onto the
_global_ binding of bug-bind-output-str, so the result is not in your
local binding, it's in the global one.

If you change your program like this:

=A0 (defun bug-bind-output-test ()
=A0 =A0 (interactive)
=A0 =A0 (setq bug-bind-output-str "")
=A0 =A0 (let ((standard-output 'bug-bind-output-function)
=A0 =A0 =A0 =A0 =A0 (s
=A0 "(\\(co\\(?:mbine-after-change-calls\\|nd\\(?:ition-case\\(?:-unle= ss-debug\\)?\\)?\\)\\|eval-\\(?:a\\(?:fter-load\\|nd-compile\\)\\|next-afte= r-load\\|when\\(?:-compile\\)?\\)\\|i\\(?:f\\|nline\\)\\|l\\(?:ambda\\|et\\= (?:\\*\\|rec\\)?\\)\\|p\\(?:case\\(?:-let\\*?\\)?\\|rog[*12nv]?\\)\\|save-\= \(?:current-buffer\\|excursion\\|match-data\\|restriction\\|selected-window= \\|window-excursion\\)\\|track-mouse\\|unwind-protect\\|w\\(?:hile\\(?:-no-= input\\)?\\|ith-\\(?:c\\(?:a\\(?:\\(?:se\\|tegory\\)-table\\)\\|urrent-buff= er\\)\\|demoted-errors\\|electric-help\\|local-quit\\|no-warnings\\|output-= to-\\(?:string\\|temp-buffer\\)\\|s\\(?:elected-\\(?:frame\\|window\\)\\|il= ent-modifications\\|yntax-table\\)\\|t\\(?:emp-\\(?:buffer\\|\\(?:fil\\|mes= sag\\)e\\)\\|imeout\\(?:-handler\\)?\\)\\|wrapper-hook\\)\\)\\)\\>"= )
=A0 =A0 =A0 =A0 =A0 s0)
=A0 =A0 =A0 (prin1 s)
=A0 =A0 =A0 bug-bind-output-str))

i.e., work with the global binding, then the program works as
expected, AFAICS.

--001a11c30a043b368204f10cfd75-- From unknown Sun Jun 15 08:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16576: Binding `standard-output' to a function doesn't work -- function sometimes called with garbage Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jan 2014 20:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Anders Lindgren Cc: 16576@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 16576-submit@debbugs.gnu.org id=B16576.139094074911983 (code B ref 16576); Tue, 28 Jan 2014 20:26:02 +0000 Received: (at 16576) by debbugs.gnu.org; 28 Jan 2014 20:25:49 +0000 Received: from localhost ([127.0.0.1]:39592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8FEC-00037C-MT for submit@debbugs.gnu.org; Tue, 28 Jan 2014 15:25:49 -0500 Received: from mtaout26.012.net.il ([80.179.55.182]:49331) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8FE8-000371-G8 for 16576@debbugs.gnu.org; Tue, 28 Jan 2014 15:25:46 -0500 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0N0400200OB4RJ00@mtaout26.012.net.il> for 16576@debbugs.gnu.org; Tue, 28 Jan 2014 22:24:52 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N04001NIOPG3430@mtaout26.012.net.il>; Tue, 28 Jan 2014 22:24:52 +0200 (IST) Date: Tue, 28 Jan 2014 22:25:39 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <834n4n97lo.fsf@gnu.org> References: <83ob2w85d3.fsf@gnu.org> X-Spam-Score: 1.0 (+) 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: 1.0 (+) > Date: Tue, 28 Jan 2014 20:39:57 +0100 > From: Anders Lindgren > Cc: 16576@debbugs.gnu.org > > If it wouldn't have been correct -- why would it return the correct > value *most* of the time? Because strings are relocated from time to time, I think. From unknown Sun Jun 15 08:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16576: Binding `standard-output' to a function doesn't work -- function sometimes called with garbage Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jan 2014 22:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 16576@debbugs.gnu.org Received: via spool by 16576-submit@debbugs.gnu.org id=B16576.139094643525579 (code B ref 16576); Tue, 28 Jan 2014 22:01:02 +0000 Received: (at 16576) by debbugs.gnu.org; 28 Jan 2014 22:00:35 +0000 Received: from localhost ([127.0.0.1]:39613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8Ghv-0006eV-A6 for submit@debbugs.gnu.org; Tue, 28 Jan 2014 17:00:35 -0500 Received: from mail-oa0-f54.google.com ([209.85.219.54]:53494) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8Ght-0006eN-83 for 16576@debbugs.gnu.org; Tue, 28 Jan 2014 17:00:33 -0500 Received: by mail-oa0-f54.google.com with SMTP id i4so1144407oah.13 for <16576@debbugs.gnu.org>; Tue, 28 Jan 2014 14:00:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=devYTFyz8bR5wEpkG+NMapwsJqwY435rJs7HTOLO+Uw=; b=ifhn7lTm+ckZIhIs9Yf03uQHQJXVuDWb0uNdSpg7GRIXoBp56PW6N2kp8HStpNQcJD MQEWQgMabF5dfbIAmoZfw4duhXDuxI784JUB/OyOzAVnuqIb3ZGy1cRGqIRVgM2Eb8LS Ly3MbRcWN0WlQ9tNmtL+lnK0OZn1AZ2aGrpFJjXXciXCVv+gnnB2YZ7fXw0hGxGmJiq5 +XEptciFkkqI1cGUNl5ByuKkPNfAoRTL3N/XvzkeqktwRinCs4I4IOJIEEvdqbL5Aekn MgBsm1nl7q4lCaxZeCm/vVFIZdMqb4o1877ovQZDMgWskJ5Cnw8EirVFKG2zaq0f6SQ+ 6pgQ== MIME-Version: 1.0 X-Received: by 10.182.230.135 with SMTP id sy7mr3009565obc.24.1390946432315; Tue, 28 Jan 2014 14:00:32 -0800 (PST) Received: by 10.182.114.199 with HTTP; Tue, 28 Jan 2014 14:00:32 -0800 (PST) In-Reply-To: <834n4n97lo.fsf@gnu.org> References: <83ob2w85d3.fsf@gnu.org> <834n4n97lo.fsf@gnu.org> Date: Tue, 28 Jan 2014 23:00:32 +0100 Message-ID: From: Anders Lindgren Content-Type: multipart/alternative; boundary=001a11c33676fff73e04f10ef3f7 X-Spam-Score: -0.7 (/) 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 (/) --001a11c33676fff73e04f10ef3f7 Content-Type: text/plain; charset=ISO-8859-1 Hi! > If it wouldn't have been correct -- why would it return the correct > > value *most* of the time? > > Because strings are relocated from time to time, I think. > Well, the main issue here is if this is a real bug or not. You originally thought this was simply a mistake in the example I provided -- do you still think so? -- Anders --001a11c33676fff73e04f10ef3f7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi!

> If it wouldn&#= 39;t have been correct -- why would it return the correct
> value *most* of the time?

Because strings are relocated from time to time, I think.

Well, the main issue here is if this is a real bug= or not. You originally thought this was simply a mistake in the example I = provided -- do you still think so?

=A0 =A0 -- Anders
=A0

--001a11c33676fff73e04f10ef3f7-- From unknown Sun Jun 15 08:48:05 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Anders Lindgren Subject: bug#16576: closed (Re: bug#16576: Binding `standard-output' to a function doesn't work -- function sometimes called with garbage) Message-ID: References: <83wqhi7jl6.fsf@gnu.org> X-Gnu-PR-Message: they-closed 16576 X-Gnu-PR-Package: emacs Reply-To: 16576@debbugs.gnu.org Date: Wed, 29 Jan 2014 18:03:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1391018583-20637-1" This is a multi-part message in MIME format... ------------=_1391018583-20637-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #16576: Binding `standard-output' to a function doesn't work -- function so= metimes called with garbage 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 16576@debbugs.gnu.org. --=20 16576: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D16576 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1391018583-20637-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 16576-done) by debbugs.gnu.org; 29 Jan 2014 18:02:04 +0000 Received: from localhost ([127.0.0.1]:40514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8ZSd-0005LT-Gy for submit@debbugs.gnu.org; Wed, 29 Jan 2014 13:02:03 -0500 Received: from mtaout25.012.net.il ([80.179.55.181]:48498) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8ZSa-0005Kx-9P for 16576-done@debbugs.gnu.org; Wed, 29 Jan 2014 13:02:01 -0500 Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N0600F00CIKK300@mtaout25.012.net.il> for 16576-done@debbugs.gnu.org; Wed, 29 Jan 2014 20:01:32 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N06008QPCQJD680@mtaout25.012.net.il>; Wed, 29 Jan 2014 20:01:31 +0200 (IST) Date: Wed, 29 Jan 2014 20:01:57 +0200 From: Eli Zaretskii Subject: Re: bug#16576: Binding `standard-output' to a function doesn't work -- function sometimes called with garbage In-reply-to: X-012-Sender: halo1@inter.net.il To: Anders Lindgren Message-id: <83wqhi7jl6.fsf@gnu.org> References: <83ob2w85d3.fsf@gnu.org> <834n4n97lo.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 16576-done Cc: 16576-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: Tue, 28 Jan 2014 23:00:32 +0100 > From: Anders Lindgren > Cc: 16576@debbugs.gnu.org > > Well, the main issue here is if this is a real bug or not. You originally > thought this was simply a mistake in the example I provided -- do you still > think so? There was indeed a bug, now fixed on the trunk, which caused the problem. It was a very old bug, it went unnoticed until now because, I guess, no one conses a string one character at a time -- this is a terrible idea in Emacs Lisp. Use a temporary buffer instead. There was nothing wrong with prin1 per se, btw, it's just that its subroutine which prints a string wasn't safe when GC hit in the middle of a prin1 call. The code protected the string from GC, but that doesn't preclude relocation of string data, so holding to C 'char *' pointers is not safe in these situations. And printing a 800-character string like you did triggers GC every time, because it creates 800 string objects for a grand total of about 320000 bytes. Anyway, problem solved, and I'm closing the bug. Thanks. ------------=_1391018583-20637-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Jan 2014 09:09:29 +0000 Received: from localhost ([127.0.0.1]:38681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W84ff-0007lQ-Mo for submit@debbugs.gnu.org; Tue, 28 Jan 2014 04:09:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39794) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W84fb-0007lC-Lk for submit@debbugs.gnu.org; Tue, 28 Jan 2014 04:09:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W84fY-0000Y2-PJ for submit@debbugs.gnu.org; Tue, 28 Jan 2014 04:09:23 -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, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W84fY-0000Xy-Mb for submit@debbugs.gnu.org; Tue, 28 Jan 2014 04:09:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W84fV-00059B-Vw for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 04:09:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W84fO-0000X4-Sq for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 04:09:17 -0500 Received: from mail-ob0-x22e.google.com ([2607:f8b0:4003:c01::22e]:44144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W84fO-0000Wm-JP for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 04:09:10 -0500 Received: by mail-ob0-f174.google.com with SMTP id uy5so106104obc.19 for ; Tue, 28 Jan 2014 01:09:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=+Ne9Kb+jFQ5BIf6xzNNalFGJAIGazi9Tr4zxLFMvnXY=; b=yFEeNwtzgZGgTzbOUFrqeO2MIFaMawLmDe+spgiaIi1pAH3k4jevQsWr34c/AllwKx cOOaPrxTEXpqe/7A6fQbqTBew5FlRKwR8v4FH9yYYKKu4lOyTEQq9LnAYbZEYFnE3gZr JAE/rSl6GrwnkMb/mbeOg7TYUvZ1EyUq+ieFXm4xRMVmU2kQLSsu4Efg7dLtFO6pVin8 H8HenyJQd01muD4Mw6fU69zaBTc+HKMZn6Wo+yDNWQ7DYD4zCj5SjlujiZMuzpCvvbgj PxQvC59HGoxmuOdRLlm9664lBIiml4nXK33iL4kqrP8zH9gqR+HjRAguuKKhI5YpKAmF QGcw== MIME-Version: 1.0 X-Received: by 10.60.16.230 with SMTP id j6mr175620oed.47.1390900148827; Tue, 28 Jan 2014 01:09:08 -0800 (PST) Received: by 10.182.114.199 with HTTP; Tue, 28 Jan 2014 01:09:08 -0800 (PST) Date: Tue, 28 Jan 2014 10:09:08 +0100 Message-ID: Subject: Binding `standard-output' to a function doesn't work -- function sometimes called with garbage From: Anders Lindgren To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=e89a8f503bb249fa5d04f1042d90 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-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 (----) --e89a8f503bb249fa5d04f1042d90 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi! When binding `standard-output' to a function, is seems as though the function sometimes is called with garbage, like random control characters or part of the string in "random" order. I've seen this problem in Emacs 22 and Emacs 24.3. I haven't been able to reproduce it on the Emacs trunk, but I've seen some problems (although less frequent) that could be explained if the problem existed there as well. Steps to repeat: emacs -Q Eval the following: (defvar bug-bind-output-str nil) (defun bug-bind-output-function (char) (setq bug-bind-output-str (concat bug-bind-output-str (list char)))) (defun bug-bind-output-test () (interactive) (let ((bug-bind-output-str "") (standard-output 'bug-bind-output-function) (s "(\\(co\\(?:mbine-after-change-calls\\|nd\\(?:ition-case\\(?:-unless-debug\= \)?\\)?\\)\\|eval-\\(?:a\\(?:fter-load\\|nd-compile\\)\\|next-after-load\\|= when\\(?:-compile\\)?\\)\\|i\\(?:f\\|nline\\)\\|l\\(?:ambda\\|et\\(?:\\*\\|= rec\\)?\\)\\|p\\(?:case\\(?:-let\\*?\\)?\\|rog[*12nv]?\\)\\|save-\\(?:curre= nt-buffer\\|excursion\\|match-data\\|restriction\\|selected-window\\|window= -excursion\\)\\|track-mouse\\|unwind-protect\\|w\\(?:hile\\(?:-no-input\\)?= \\|ith-\\(?:c\\(?:a\\(?:\\(?:se\\|tegory\\)-table\\)\\|urrent-buffer\\)\\|d= emoted-errors\\|electric-help\\|local-quit\\|no-warnings\\|output-to-\\(?:s= tring\\|temp-buffer\\)\\|s\\(?:elected-\\(?:frame\\|window\\)\\|ilent-modif= ications\\|yntax-table\\)\\|t\\(?:emp-\\(?:buffer\\|\\(?:fil\\|messag\\)e\\= )\\|imeout\\(?:-handler\\)?\\)\\|wrapper-hook\\)\\)\\)\\>") s0) (prin1 s) bug-bind-output-str)) Type this a number of times: M-x (bug-bind-output-test) RET A correct output looks like: "\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition-case\\\\(?:-u= nless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-load\\\\|nd-compi= le\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\)\\\\|i\\\\(?:= f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|rec\\\\)?\\\\)\\\= \|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\\|save-\\\\(?:= current-buffer\\\\|excursion\\\\|match-data\\\\|restriction\\\\|selected-wi= ndow\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-protect\\\\|w\\\\= (?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:\\\\(?:se\\\\|= tegory\\\\)-table\\\\)\\\\|urrent-buffer\\\\)\\\\|demoted-errors\\\\|electr= ic-help\\\\|local-quit\\\\|no-warnings\\\\|output-to-\\\\(?:string\\\\|temp= -buffer\\\\)\\\\|s\\\\(?:elected-\\\\(?:frame\\\\|window\\\\)\\\\|ilent-mod= ifications\\\\|yntax-table\\\\)\\\\|t\\\\(?:emp-\\\\(?:buffer\\\\|\\\\(?:fi= l\\\\|messag\\\\)e\\\\)\\\\|imeout\\\\(?:-handler\\\\)?\\\\)\\\\|wrapper-ho= ok\\\\)\\\\)\\\\)\\\\>\"" This is an example of bad output, here, the last couple of lines does not correspond to the string being printed. "\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition-case\\\\(?:-u= nless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-load\\\\|nd-compi= le\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\)\\\\|i\\\\(?:= f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|rec\\\\)?\\\\)\\\= \|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\\|save-\\\\(?:= current-buffer\\\\|excursion\\\\|match-data\\\\|restriction\\\\|selected-wi= ndow\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-protect\\\\|w\\\\= (?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:\\\\(?:se\\\\|= tegory\\\\\\\\(?:-no-input\\\\\\\\)?\\\\\\\\|ith-\\\\\\\\(?:c\\\\\\\\(?:a\\= \\\\\\(?:\\\\\\\\(?:se\\\\\\\\|tegory\\\\loca=10=17w=01\\\"(\\\\\\\\(co\\\\= \\\\(?:mbine-after-change-calls\\\\\\\\|nd\\\\\\\\(?:ition-case\\\\\\\\(?:-= unless-debug\\\\\\\\)?\\\\\\\\)?\\\\\\\\)\\\\\\\\|eval-\\\\\\\\(?:a\\\\\\\\= (?:fter-load\\\\\\\\|nd-compile\\\\\\\\)\\\\\\\\|next-after-load\\\\\\\\|wh= en\\\\\\\\(?:-compile\\\\\\\\)?\\\\\\\\)\\\\\\\\|i\\\\\\\\(?:f\\\\\\\\|nlin= e\\\\\\\\)\\\\\\\\|l\\\\\\\\(?:ambd\"" Other examples of bad output is if the string contains random control characters. I've noticed that this is intermittent. Sometimes, say, every tenth call returns a broken string. Sometimes it feels as though you can call the function any number of times without getting a bad string. Sincerely, Anders Lindgren If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /Applications/Emacs24.3.app/Contents/Resources/etc/DEBUG. In GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org Windowing system distributor `Apple', version 10.3.1265 Configured using: `configure '--host=3Dx86_64-apple-darwin' '--build=3Di686-apple-darwin' '--with-ns' 'build_alias=3Di686-apple-darwin' 'host_alias=3Dx86_64-apple-darwin' 'CC=3Dgcc -mmacosx-version-min=3D10.7 -isystem /Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Developer/Platforms/MacOS= X.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/ -F/Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Developer/Platforms/Mac= OSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks'' Important settings: value of $LC_CTYPE: UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: 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 C-x C-x : ( b i g u g - b i t ) : : : : : : : : : : : x e m a c s - b u C-g x m e m a c s - b i u g C-g r e p o r t - e m Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Loading vc-svn...done bug-bind-output-str bug-bind-output-function bug-bind-output-test "\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition-case\\\\(?:-u= nless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-load\\\\|nd-compi= le\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\)\\\\|i\\\\(?:= f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|rec\\\\)?\\\\)\\\= \|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\\|save-\\\\(?:= current-buffer\\\\|excursion\\\\|match-data\\\\|restriction\\\\|selected-wi= ndow\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-protect\\\\|w\\\\= (?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:\\\\(?:se\\\\|= tegory\\\\)-table\\\\)\\\\|urrent-buffer\\\\)\\\\|demoted-errors\\\\|electr= ic-help\\\\|local-quit\\\\|no-warnings\\\\|output-to-\\\\(?:string\\\\|temp= -buffer\\\\)\\\\|s\\\\(?:elected-\\\\(?:frame\\\\|window\\\\)\\\\|ilent-mod= ifications\\\\|yntax-table\\\\)\\\\|t\\\\(?:emp-\\\\(?:buffer\\\\|\\\\(?:fi= l\\\\|messag\\\\)e\\\\)\\\\|imeout\\\\(?:-handler\\\\)?\\\\)\\\\|wrapper-ho= ok\\\\)\\\\)\\\\)\\\\>\"" [11 times] "\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition-case\\\\(?:-u= nless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-load\\\\|nd-compi= le\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\)\\\\|i\\\\(?:= f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|rec\\\\)?\\\\)\\\= \|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\\|save-\\\\(?:= current-buffer\\\\|excursion\\\\|match-data\\\\|restriction\\\\|selected-wi= ndow\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-protect\\\\|w\\\\= (?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:\\\\(?:se\\\\|= tegory\\\\\\\\(?:-no-input\\\\\\\\)?\\\\\\\\|ith-\\\\\\\\(?:c\\\\\\\\(?:a\\= \\\\\\(?:\\\\\\\\(?:se\\\\\\\\|tegory\\\\loca=10=17w=01\\\"(\\\\\\\\(co\\\\= \\\\(?:mbine-after-change-calls\\\\\\\\|nd\\\\\\\\(?:ition-case\\\\\\\\(?:-= unless-debug\\\\\\\\)?\\\\\\\\)?\\\\\\\\)\\\\\\\\|eval-\\\\\\\\(?:a\\\\\\\\= (?:fter-load\\\\\\\\|nd-compile\\\\\\\\)\\\\\\\\|next-after-load\\\\\\\\|wh= en\\\\\\\\(?:-compile\\\\\\\\)?\\\\\\\\)\\\\\\\\|i\\\\\\\\(?:f\\\\\\\\|nlin= e\\\\\\\\)\\\\\\\\|l\\\\\\\\(?:ambd\"" Quit Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils vc-dispatcher vc-svn time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-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 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 ns multi-tty emacs) --e89a8f503bb249fa5d04f1042d90 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi!

When binding `standard-o= utput' to a function, is seems as though the function sometimes is call= ed with garbage, like random control characters or part of the string in &q= uot;random" order.

I've seen this problem in Emacs 22 and Emacs 24.3. = I haven't been able to reproduce it on the Emacs trunk, but I've se= en some problems (although less frequent) that could be explained if the pr= oblem existed there as well.

Steps to repeat:

=A0 =A0 emacs= -Q
=A0 =A0 Eval the following:

(de= fvar bug-bind-output-str nil)

(defun bug-bind-outp= ut-function (char)
=A0 (setq bug-bind-output-str
=A0 =A0 =A0 =A0 (concat bug-bi= nd-output-str (list char))))

(defun bug-bind-outpu= t-test ()
=A0 (interactive)
=A0 (let ((bug-bind-output-= str "")
=A0 =A0 =A0 =A0 (standard-output 'bug-bind-output-function)
<= div>=A0 =A0 =A0 =A0 (s "(\\(co\\(?:mbine-after-change-calls\\|nd\\(?:i= tion-case\\(?:-unless-debug\\)?\\)?\\)\\|eval-\\(?:a\\(?:fter-load\\|nd-com= pile\\)\\|next-after-load\\|when\\(?:-compile\\)?\\)\\|i\\(?:f\\|nline\\)\\= |l\\(?:ambda\\|et\\(?:\\*\\|rec\\)?\\)\\|p\\(?:case\\(?:-let\\*?\\)?\\|rog[= *12nv]?\\)\\|save-\\(?:current-buffer\\|excursion\\|match-data\\|restrictio= n\\|selected-window\\|window-excursion\\)\\|track-mouse\\|unwind-protect\\|= w\\(?:hile\\(?:-no-input\\)?\\|ith-\\(?:c\\(?:a\\(?:\\(?:se\\|tegory\\)-tab= le\\)\\|urrent-buffer\\)\\|demoted-errors\\|electric-help\\|local-quit\\|no= -warnings\\|output-to-\\(?:string\\|temp-buffer\\)\\|s\\(?:elected-\\(?:fra= me\\|window\\)\\|ilent-modifications\\|yntax-table\\)\\|t\\(?:emp-\\(?:buff= er\\|\\(?:fil\\|messag\\)e\\)\\|imeout\\(?:-handler\\)?\\)\\|wrapper-hook\\= )\\)\\)\\>")
=A0 =A0 =A0 =A0 s0)
=A0 =A0 (prin1 s)
=A0 =A0 = bug-bind-output-str))

Type this a number= of times:

=A0 =A0 M-x (bug-bind-output-test) RET<= /div>

A correct output looks like:


<= div>"\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition= -case\\\\(?:-unless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-loa= d\\\\|nd-compile\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\= )\\\\|i\\\\(?:f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|rec= \\\\)?\\\\)\\\\|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\= \|save-\\\\(?:current-buffer\\\\|excursion\\\\|match-data\\\\|restriction\\= \\|selected-window\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-pro= tect\\\\|w\\\\(?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:= \\\\(?:se\\\\|tegory\\\\)-table\\\\)\\\\|urrent-buffer\\\\)\\\\|demoted-err= ors\\\\|electric-help\\\\|local-quit\\\\|no-warnings\\\\|output-to-\\\\(?:s= tring\\\\|temp-buffer\\\\)\\\\|s\\\\(?:elected-\\\\(?:frame\\\\|window\\\\)= \\\\|ilent-modifications\\\\|yntax-table\\\\)\\\\|t\\\\(?:emp-\\\\(?:buffer= \\\\|\\\\(?:fil\\\\|messag\\\\)e\\\\)\\\\|imeout\\\\(?:-handler\\\\)?\\\\)\= \\\|wrapper-hook\\\\)\\\\)\\\\)\\\\>\""

This is an example of bad output, here, the last couple= of lines does not correspond to the string being printed.

"\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:= ition-case\\\\(?:-unless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fte= r-load\\\\|nd-compile\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)= ?\\\\)\\\\|i\\\\(?:f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\= \|rec\\\\)?\\\\)\\\\|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\= \)\\\\|save-\\\\(?:current-buffer\\\\|excursion\\\\|match-data\\\\|restrict= ion\\\\|selected-window\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwin= d-protect\\\\|w\\\\(?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\= \\(?:\\\\(?:se\\\\|tegory\\\\\\\\(?:-no-input\\\\\\\\)?\\\\\\\\|ith-\\\\\\\= \(?:c\\\\\\\\(?:a\\\\\\\\(?:\\\\\\\\(?:se\\\\\\\\|tegory\\\\loca=10=17w=01\= \\"(\\\\\\\\(co\\\\\\\\(?:mbine-after-change-calls\\\\\\\\|nd\\\\\\\\(= ?:ition-case\\\\\\\\(?:-unless-debug\\\\\\\\)?\\\\\\\\)?\\\\\\\\)\\\\\\\\|e= val-\\\\\\\\(?:a\\\\\\\\(?:fter-load\\\\\\\\|nd-compile\\\\\\\\)\\\\\\\\|ne= xt-after-load\\\\\\\\|when\\\\\\\\(?:-compile\\\\\\\\)?\\\\\\\\)\\\\\\\\|i\= \\\\\\\(?:f\\\\\\\\|nline\\\\\\\\)\\\\\\\\|l\\\\\\\\(?:ambd\""

Other examples of bad output is if the string con= tains random control characters.

I've noticed = that this is intermittent. Sometimes, say, every tenth call returns a broke= n string. Sometimes it feels as though you can call the function any number= of times without getting a bad string.

Sincerely,
=A0 =A0 Anders Lindgren
=

If Emacs crashed, and you have the Emacs proc= ess in the gdb debugger,
please include the output from the follo= wing gdb commands:
=A0 =A0 `bt full' and `xbacktrace'.
For information = about debugging Emacs, please read the file
/Applications/Emacs24= .3.app/Contents/Resources/etc/DEBUG.


In GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
=A0of 2013-03-13 on bob.porkrind.org<= /a>
Windowing system distributor `Apple', version 10.3.1265
Configured using:
=A0`configure '--host=3Dx86_64-apple-d= arwin' '--build=3Di686-apple-darwin'
=A0'--with-n= s' 'build_alias=3Di686-apple-darwin'
=A0'host_ali= as=3Dx86_64-apple-darwin' 'CC=3Dgcc -mmacosx-version-min=3D10.7
=A0-isystem
=A0/Users/david/Xcode-10.7_4.5.2/Xcode.app/Conte= nts/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/i= nclude/
=A0-F/Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Dev= eloper/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Libra= ry/Frameworks''

Important settings:
=A0 value of $LC_CTYPE: U= TF-8
=A0 locale-coding-system: utf-8-unix
=A0 default e= nable-multibyte-characters: t

Major mode: Emacs-Li= sp

Minor modes in effect:
=A0 tooltip-mode: t
=A0 mouse-wheel-mode: t
=A0 tool-bar-mode: t
= =A0 menu-bar-mode: t
=A0 file-name-shadow-mode: t
=A0 g= lobal-font-lock-mode: t
=A0 font-lock-mode: t
=A0 blink-cursor-mode: t
=A0= auto-composition-mode: t
=A0 auto-encryption-mode: t
= =A0 auto-compression-mode: t
=A0 line-number-mode: t
= =A0 transient-mark-mode: t

Recent input:
<down> <right> <= right> <escape> C-x <down> <down> <down>=A0
<escape> C-x <down> <down> <down> <down>= ; <down> <down>=A0
<escape> C-x <escape> : ( b i g <backspace> <back= space>=A0
u g - b i <tab> t <tab> ) <return>= <escape> : <up>=A0
<return> <escape> : &= lt;up> <return> <escape> : <up> <return>=A0
<escape> : <up> <return> <escape> : <up>= <return> <escape>=A0
: <up> <return> <= ;escape> : <up> <return> <escape> :=A0
<u= p> <return> <escape> : <up> <return> <escape&= gt; : <up>=A0
<return> <escape> : <up> <return> <escape&g= t; x e m a=A0
c s - b u <tab> C-g <escape> x m <ba= ckspace> e m a=A0
c s - b i <backspace> u g <tab> = <s-backspace> <s-backspace>=A0
<escape> <backspace> <escape> <backspace> <= escape>=A0
C-g r e p o r t - e m <tab> <return>

Recent messages:
For information about GNU= Emacs and the GNU system, type C-h C-a.
Loading vc-svn...done
bug-bind-output-str
bug-bind= -output-function
bug-bind-output-test
"\"(\\\= \(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:ition-case\\\\(?:-unless-d= ebug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-load\\\\|nd-compile\\\\)= \\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\\)\\\\|i\\\\(?:f\\\\|n= line\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|rec\\\\)?\\\\)\\\\|p\\\\= (?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\\\|save-\\\\(?:current= -buffer\\\\|excursion\\\\|match-data\\\\|restriction\\\\|selected-window\\\= \|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-protect\\\\|w\\\\(?:hile= \\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?:\\\\(?:se\\\\|tegory\= \\\)-table\\\\)\\\\|urrent-buffer\\\\)\\\\|demoted-errors\\\\|electric-help= \\\\|local-quit\\\\|no-warnings\\\\|output-to-\\\\(?:string\\\\|temp-buffer= \\\\)\\\\|s\\\\(?:elected-\\\\(?:frame\\\\|window\\\\)\\\\|ilent-modificati= ons\\\\|yntax-table\\\\)\\\\|t\\\\(?:emp-\\\\(?:buffer\\\\|\\\\(?:fil\\\\|m= essag\\\\)e\\\\)\\\\|imeout\\\\(?:-handler\\\\)?\\\\)\\\\|wrapper-hook\\\\)= \\\\)\\\\)\\\\>\"" [11 times]
"\"(\\\\(co\\\\(?:mbine-after-change-calls\\\\|nd\\\\(?:itio= n-case\\\\(?:-unless-debug\\\\)?\\\\)?\\\\)\\\\|eval-\\\\(?:a\\\\(?:fter-lo= ad\\\\|nd-compile\\\\)\\\\|next-after-load\\\\|when\\\\(?:-compile\\\\)?\\\= \)\\\\|i\\\\(?:f\\\\|nline\\\\)\\\\|l\\\\(?:ambda\\\\|et\\\\(?:\\\\*\\\\|re= c\\\\)?\\\\)\\\\|p\\\\(?:case\\\\(?:-let\\\\*?\\\\)?\\\\|rog[*12nv]?\\\\)\\= \\|save-\\\\(?:current-buffer\\\\|excursion\\\\|match-data\\\\|restriction\= \\\|selected-window\\\\|window-excursion\\\\)\\\\|track-mouse\\\\|unwind-pr= otect\\\\|w\\\\(?:hile\\\\(?:-no-input\\\\)?\\\\|ith-\\\\(?:c\\\\(?:a\\\\(?= :\\\\(?:se\\\\|tegory\\\\\\\\(?:-no-input\\\\\\\\)?\\\\\\\\|ith-\\\\\\\\(?:= c\\\\\\\\(?:a\\\\\\\\(?:\\\\\\\\(?:se\\\\\\\\|tegory\\\\loca=10=17w=01\\\&q= uot;(\\\\\\\\(co\\\\\\\\(?:mbine-after-change-calls\\\\\\\\|nd\\\\\\\\(?:it= ion-case\\\\\\\\(?:-unless-debug\\\\\\\\)?\\\\\\\\)?\\\\\\\\)\\\\\\\\|eval-= \\\\\\\\(?:a\\\\\\\\(?:fter-load\\\\\\\\|nd-compile\\\\\\\\)\\\\\\\\|next-a= fter-load\\\\\\\\|when\\\\\\\\(?:-compile\\\\\\\\)?\\\\\\\\)\\\\\\\\|i\\\\\= \\\(?:f\\\\\\\\|nline\\\\\\\\)\\\\\\\\|l\\\\\\\\(?:ambd\""
Quit

Load-path shadows:
None found.=

Features:
(shadow sort gnus-util mail-e= xtr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-d= ecode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils vc-dispatcher vc-svn time-date toolti= p
ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd = fontset
image regexp-opt fringe tabulated-list newcomment lisp-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<= /div>
greek romanian slovak czech european ethiopic indian cyrillic chi= nese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuf= fer loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5<= /div>
base64 format env code-pages mule custom widget hashtable-print-r= eadable
backquote make-network-process ns multi-tty emacs)

--e89a8f503bb249fa5d04f1042d90-- ------------=_1391018583-20637-1-- From unknown Sun Jun 15 08:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16576: Binding `standard-output' to a function doesn't work -- function sometimes called with garbage Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jan 2014 21:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 16576-done@debbugs.gnu.org Received: via spool by 16576-done@debbugs.gnu.org id=D16576.13910299546090 (code D ref 16576); Wed, 29 Jan 2014 21:13:01 +0000 Received: (at 16576-done) by debbugs.gnu.org; 29 Jan 2014 21:12:34 +0000 Received: from localhost ([127.0.0.1]:40710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8cQz-0001aA-F5 for submit@debbugs.gnu.org; Wed, 29 Jan 2014 16:12:33 -0500 Received: from mail-oa0-f44.google.com ([209.85.219.44]:42924) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8cQw-0001a0-P9 for 16576-done@debbugs.gnu.org; Wed, 29 Jan 2014 16:12:31 -0500 Received: by mail-oa0-f44.google.com with SMTP id g12so2702473oah.17 for <16576-done@debbugs.gnu.org>; Wed, 29 Jan 2014 13:12:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=05u92/VpxjNIsfK5+A3y0chciZl5P/VzLOz9Tepc6IA=; b=iVYK4b3YvTzgKtoIwq2hVKjPFCaoUWaJ8MvpOcgGi3xgYsR/m/wkEvaCc78xr3c1Ry 2+o6ERoR1p1V/0iGTDaOCDYDxHM1Z0C9TyDkfmG5BzbUyB/Yf20krymDzcSJxIjKSwv6 aahBfNmSkeIiJ28QFYEm/xTVXP2Yv9oYMP/vlGiXBZFLpZ3pQ+d2XdTaYxrewjgfc+h6 eJ0KDhHBa9eOUBFdRZ4V1iZHt12ec0XVaEbPObfNWM+2onY9EmPyVkVuM3rQ4tiRHnUk +kaAzXFc+MAwvErneuE0hAXR7J6X/Ei63xD9GKqrKjjQpZLxpFRLmgVjMWCRu38jT/ee lh1A== MIME-Version: 1.0 X-Received: by 10.60.142.227 with SMTP id rz3mr8086832oeb.14.1391029949887; Wed, 29 Jan 2014 13:12:29 -0800 (PST) Received: by 10.182.114.199 with HTTP; Wed, 29 Jan 2014 13:12:29 -0800 (PST) In-Reply-To: <83wqhi7jl6.fsf@gnu.org> References: <83ob2w85d3.fsf@gnu.org> <834n4n97lo.fsf@gnu.org> <83wqhi7jl6.fsf@gnu.org> Date: Wed, 29 Jan 2014 22:12:29 +0100 Message-ID: From: Anders Lindgren Content-Type: multipart/alternative; boundary=047d7b41903f08fc0e04f122664b X-Spam-Score: -0.7 (/) 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 (/) --047d7b41903f08fc0e04f122664b Content-Type: text/plain; charset=ISO-8859-1 Thanks for fixing the bug! As soon as I realised that there was a problem with binding `standard-output' to a function, I rewrote the code to use a buffer instead. Also, thanks for pointing out the excessive memory usage when accumulating a string -- one can learn something new every day (even after 20 years)... -- Anders Ps. I just released the package I've been working in for a couple of weeks, it's an interactive debugger for font-lock keywords. If you want to try it you can get it from https://github.com/Lindydancer/font-lock-studio On Wed, Jan 29, 2014 at 7:01 PM, Eli Zaretskii wrote: > > Date: Tue, 28 Jan 2014 23:00:32 +0100 > > From: Anders Lindgren > > Cc: 16576@debbugs.gnu.org > > > > Well, the main issue here is if this is a real bug or not. You originally > > thought this was simply a mistake in the example I provided -- do you > still > > think so? > > There was indeed a bug, now fixed on the trunk, which caused the > problem. It was a very old bug, it went unnoticed until now because, > I guess, no one conses a string one character at a time -- this is a > terrible idea in Emacs Lisp. Use a temporary buffer instead. > > There was nothing wrong with prin1 per se, btw, it's just that its > subroutine which prints a string wasn't safe when GC hit in the middle > of a prin1 call. The code protected the string from GC, but that > doesn't preclude relocation of string data, so holding to C 'char *' > pointers is not safe in these situations. And printing a > 800-character string like you did triggers GC every time, because it > creates 800 string objects for a grand total of about 320000 bytes. > > Anyway, problem solved, and I'm closing the bug. Thanks. > --047d7b41903f08fc0e04f122664b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks for fixing the bug!

As soon as I= realised that there was a problem with binding `standard-output' to a = function, I rewrote the code to use a buffer instead. Also, thanks for poin= ting out the excessive memory usage when accumulating a string -- one can l= earn something new every day (even after 20 years)...

=A0 =A0 -- Anders

Ps. I just r= eleased the package I've been working in for a couple of weeks, it'= s an interactive debugger for font-lock keywords. If you want to try it you= can get it from=A0https://github.com/Lindydancer/font-lock-studio



On Wed, Jan 29, 2014 at 7:01 PM, Eli Zaretskii &l= t;eliz@gnu.org> wrote:
> Date: Tue, 28 Jan 2014 23:00:32 +0100
> From: Anders Lindgren <andlind@gmail.com>
> Cc: 16576@debbugs.gnu.org=
>
> Well, the main issue here is if this is a real= bug or not. You originally
> thought this was simply a mistake in the example I provided -- do you = still
> think so?

There was indeed a bug, now fixed on the trunk, which caused the
problem. =A0It was a very old bug, it went unnoticed until now because,
I guess, no one conses a string one character at a time -- this is a
terrible idea in Emacs Lisp. =A0Use a temporary buffer instead.

There was nothing wrong with prin1 per se, btw, it's just that its
subroutine which prints a string wasn't safe when GC hit in the middle<= br> of a prin1 call. =A0The code protected the string from GC, but that
doesn't preclude relocation of string data, so holding to C 'char *= '
pointers is not safe in these situations. =A0And printing a
800-character string like you did triggers GC every time, because it
creates 800 string objects for a grand total of about 320000 bytes.

Anyway, problem solved, and I'm closing the bug. =A0Thanks.

--047d7b41903f08fc0e04f122664b-- From unknown Sun Jun 15 08:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16576: Binding `standard-output' to a function doesn't work -- function sometimes called with garbage Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Jan 2014 00:39:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Anders Lindgren Cc: Eli Zaretskii , 16576-done@debbugs.gnu.org Received: via spool by 16576-done@debbugs.gnu.org id=D16576.139104232924930 (code D ref 16576); Thu, 30 Jan 2014 00:39:03 +0000 Received: (at 16576-done) by debbugs.gnu.org; 30 Jan 2014 00:38:49 +0000 Received: from localhost ([127.0.0.1]:40746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8fea-0006U2-JT for submit@debbugs.gnu.org; Wed, 29 Jan 2014 19:38:48 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:46999) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8feX-0006Ts-Fd for 16576-done@debbugs.gnu.org; Wed, 29 Jan 2014 19:38:46 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpZg5/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYHCxQYDSSIHgYMwR0EkQoDiGGcGYFegxU X-IPAS-Result: Av4EABK/CFFFpZg5/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYHCxQYDSSIHgYMwR0EkQoDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="46386780" Received: from 69-165-152-57.dsl.teksavvy.com (HELO pastel.home) ([69.165.152.57]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Jan 2014 19:38:43 -0500 Received: by pastel.home (Postfix, from userid 20848) id E7B68600CD; Wed, 29 Jan 2014 19:38:41 -0500 (EST) From: Stefan Monnier Message-ID: References: <83ob2w85d3.fsf@gnu.org> <834n4n97lo.fsf@gnu.org> <83wqhi7jl6.fsf@gnu.org> Date: Wed, 29 Jan 2014 19:38:41 -0500 In-Reply-To: (Anders Lindgren's message of "Wed, 29 Jan 2014 22:12:29 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) 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 (/) > Ps. I just released the package I've been working in for a couple of weeks, > it's an interactive debugger for font-lock keywords. If you want to try it > you can get it from https://github.com/Lindydancer/font-lock-studio What do you think about moving it to GNU ELPA? Stefan From unknown Sun Jun 15 08:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16576: Binding `standard-output' to a function doesn't work -- function sometimes called with garbage Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Jan 2014 16:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Eli Zaretskii , 16576-done@debbugs.gnu.org Received: via spool by 16576-done@debbugs.gnu.org id=D16576.13911852056367 (code D ref 16576); Fri, 31 Jan 2014 16:21:01 +0000 Received: (at 16576-done) by debbugs.gnu.org; 31 Jan 2014 16:20:05 +0000 Received: from localhost ([127.0.0.1]:43404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9Gp2-0001ea-B5 for submit@debbugs.gnu.org; Fri, 31 Jan 2014 11:20:04 -0500 Received: from mail-ob0-f182.google.com ([209.85.214.182]:58335) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9Goz-0001e7-KH for 16576-done@debbugs.gnu.org; Fri, 31 Jan 2014 11:20:02 -0500 Received: by mail-ob0-f182.google.com with SMTP id wm4so5190875obc.41 for <16576-done@debbugs.gnu.org>; Fri, 31 Jan 2014 08:20:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=jeuQ5CFHMRvzVvNSuMg9EU8B68PpASKYa0529TH89gQ=; b=SmayPNpaIweupL/P1Jo2I+nLHWXg8pqwSyfn+/yIRHl3+1UlwQPl1NO2GpkBT+CQaG /uHyKpMeuVQqLIXZ845vfCHx5bhKFTdRFEhlh1x8CNnMrMb85JZevXmgTtqUIyjEPTeh aGn8pSKqoLPQYaFDQNacqohoxoQsBpO7eAR9ET0ZJvsG98lMcX/wftNJNE7mDZFOgNTH mwP9oy9LQuFD4eOe+kZC96g9Fe7dZgqP2mxH9M1+xCIwcTCC9T+9Ilhv/bozxs3iZN2Y OrVVi7V52M+/BNI4gB4pJZQfxaW0S8bAhh9L2XhlGklcUnIqBYSd3Si2FixC00idWY8f Qsqw== MIME-Version: 1.0 X-Received: by 10.182.166.40 with SMTP id zd8mr17066345obb.25.1391185200686; Fri, 31 Jan 2014 08:20:00 -0800 (PST) Received: by 10.182.114.199 with HTTP; Fri, 31 Jan 2014 08:20:00 -0800 (PST) In-Reply-To: References: <83ob2w85d3.fsf@gnu.org> <834n4n97lo.fsf@gnu.org> <83wqhi7jl6.fsf@gnu.org> Date: Fri, 31 Jan 2014 17:20:00 +0100 Message-ID: From: Anders Lindgren Content-Type: multipart/alternative; boundary=e89a8ff1ce02b42a6f04f1468b44 X-Spam-Score: -0.7 (/) 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 (/) --e89a8ff1ce02b42a6f04f1468b44 Content-Type: text/plain; charset=ISO-8859-1 I haven't given it much though, to be honest, but it sounds like a good idea. I would like it to have some more mileage first, though. -- Anders On Thu, Jan 30, 2014 at 1:38 AM, Stefan Monnier wrote: > > Ps. I just released the package I've been working in for a couple of > weeks, > > it's an interactive debugger for font-lock keywords. If you want to try > it > > you can get it from https://github.com/Lindydancer/font-lock-studio > > What do you think about moving it to GNU ELPA? > > > Stefan > --e89a8ff1ce02b42a6f04f1468b44 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I haven't given it much tho= ugh, to be honest, but it sounds like a good idea. I would like it to have = some more mileage first, though.

=
=A0 =A0 -- Anders


On Thu, Jan 30, 2014 at 1:38 AM, Stefan = Monnier <monnier@iro.umontreal.ca> wrote:
> Ps. I just released the package I've been working in for a co= uple of weeks,
> it's an interactive debugger for font-lock keywords. If you want t= o try it
> you can get it from https://github.com/Lindydancer/font-lock-studio=

What do you think about moving it to GNU ELPA?


=A0 =A0 =A0 =A0 Stefan

--e89a8ff1ce02b42a6f04f1468b44-- From unknown Sun Jun 15 08:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16576: Binding `standard-output' to a function doesn't work -- function sometimes called with garbage Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Jan 2014 21:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Anders Lindgren Cc: Eli Zaretskii , 16576-done@debbugs.gnu.org Received: via spool by 16576-done@debbugs.gnu.org id=D16576.13912023386325 (code D ref 16576); Fri, 31 Jan 2014 21:06:01 +0000 Received: (at 16576-done) by debbugs.gnu.org; 31 Jan 2014 21:05:38 +0000 Received: from localhost ([127.0.0.1]:43478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9LHO-0001dx-Au for submit@debbugs.gnu.org; Fri, 31 Jan 2014 16:05:38 -0500 Received: from mercure.iro.umontreal.ca ([132.204.24.67]:40983) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9LHM-0001do-9T for 16576-done@debbugs.gnu.org; Fri, 31 Jan 2014 16:05:36 -0500 Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id C442A84CAC; Fri, 31 Jan 2014 16:05:35 -0500 (EST) Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id CC05C1E5913; Fri, 31 Jan 2014 16:04:46 -0500 (EST) Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id A6DEAB4108; Fri, 31 Jan 2014 16:04:46 -0500 (EST) From: Stefan Monnier Message-ID: References: <83ob2w85d3.fsf@gnu.org> <834n4n97lo.fsf@gnu.org> <83wqhi7jl6.fsf@gnu.org> Date: Fri, 31 Jan 2014 16:04:46 -0500 In-Reply-To: (Anders Lindgren's message of "Fri, 31 Jan 2014 17:20:00 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-Spam-Status: No X-Spam-Score: -2.9 (--) 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: -2.9 (--) > I haven't given it much though, to be honest, but it sounds like a good > idea. I would like it to have some more mileage first, though. Code can be developed directly in the `elpa' branch. Stefan