From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mihai =?UTF-8?Q?C=C4=83lin?= Bazon Newsgroups: gmane.emacs.bugs Subject: bug#22961: The read function does not support a lambda argument Date: Wed, 9 Mar 2016 10:37:28 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bdca686ae4177052d999b0d X-Trace: ger.gmane.org 1457540907 15170 80.91.229.3 (9 Mar 2016 16:28:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Mar 2016 16:28:27 +0000 (UTC) To: 22961@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 09 17:28:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1adgxz-0002UD-FE for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Mar 2016 17:28:07 +0100 Original-Received: from localhost ([::1]:42442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adgxy-0001Mj-Ma for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Mar 2016 11:28:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adgxu-0001Mb-W5 for bug-gnu-emacs@gnu.org; Wed, 09 Mar 2016 11:28:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adgxt-0002z6-W3 for bug-gnu-emacs@gnu.org; Wed, 09 Mar 2016 11:28:02 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adgxt-0002z2-TC for bug-gnu-emacs@gnu.org; Wed, 09 Mar 2016 11:28:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1adgxt-0001ek-Om for bug-gnu-emacs@gnu.org; Wed, 09 Mar 2016 11:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mihai =?UTF-8?Q?C=C4=83lin?= Bazon Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Mar 2016 16:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22961 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14575408316299 (code B ref -1); Wed, 09 Mar 2016 16:28:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Mar 2016 16:27:11 +0000 Original-Received: from localhost ([127.0.0.1]:41719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1adgx4-0001dX-UD for submit@debbugs.gnu.org; Wed, 09 Mar 2016 11:27:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45587) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1adZcf-0005J3-Lc for submit@debbugs.gnu.org; Wed, 09 Mar 2016 03:37:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adZcZ-0008EN-N1 for submit@debbugs.gnu.org; Wed, 09 Mar 2016 03:37:32 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adZcZ-0008E6-JE for submit@debbugs.gnu.org; Wed, 09 Mar 2016 03:37:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adZcY-0005et-Kb for bug-gnu-emacs@gnu.org; Wed, 09 Mar 2016 03:37:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adZcX-0008B9-Mm for bug-gnu-emacs@gnu.org; Wed, 09 Mar 2016 03:37:30 -0500 Original-Received: from mail-ig0-x22d.google.com ([2607:f8b0:4001:c05::22d]:35679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adZcX-0008AM-Ga for bug-gnu-emacs@gnu.org; Wed, 09 Mar 2016 03:37:29 -0500 Original-Received: by mail-ig0-x22d.google.com with SMTP id vf5so6349993igb.0 for ; Wed, 09 Mar 2016 00:37:29 -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; bh=MO082kqNwovWBU3nbatCmPFKyCfgCr6ezLlsWw6TfOw=; b=zZT+guhzahtFPGHlrEXZSmsO1mCEmuyrGuuYp7YV9SRmjD+nzn5gQeJJq4/j3pUDbu OSgOUCEH2HrQsWjici87US4qp9OJZ7TmZUecuVSiJwJ/8QJryZOOAjZVhgBqR6yvpYaY FXWuN7V7QKMISSla6AsljrDkxbpQrvygOnF13kP3qHnow4jibFDHWho1nE+0TXHqB79l x4btFYPu/j8IIOTRl+1csgGZ7BZbbEphRI9Ruw/BL39q3G93pIAHG0gbwrS3VxxBU/vd tLoK2lRHW+hzdCe3eN9ami+fUiaXBDRYadGYaIuOn1nNp9AxLPYSsc6CJf9GW0ECzNUh lZ6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=MO082kqNwovWBU3nbatCmPFKyCfgCr6ezLlsWw6TfOw=; b=DIh5c75u3gQgadq10CakXbvH6KyV4hJ99tsJ0RzTRhHh/Lfoge6xsSxm/nvjhm61op XXF4x5QmOxtjDD5jQjcCIcwYjrk7C61fWDpcQYI4UY+7hyKgEBSpumP8U8YvAPtoo9pv 1/iK6ykseqSFd0G4D62Qgw+kuWClmhsrl9Nhc2NHrnRJqPzGBmdaScYka2+XVp5V6gw1 MZi02mIUBl/jolpZ/ggsESlJrM92obDeV+687nalAsC2OccJMt9C7uUNrJUtPaMT7VbH i5tYpIiCCDwxqBja4CW/yqNOuEwF5eh55+ZGOS6P9rcLtR9ae79nqRKkxblR+n11wHOu NSFg== X-Gm-Message-State: AD7BkJKBpO8UrrT7x63IqUKMg7dXYSUcECI96lAvIHeqY7avnpFwtVagVIUXcwax9NtZqRSQIblaG8ZIpNuwuA== X-Received: by 10.50.50.177 with SMTP id d17mr11171395igo.10.1457512648685; Wed, 09 Mar 2016 00:37:28 -0800 (PST) Original-Received: by 10.107.4.72 with HTTP; Wed, 9 Mar 2016 00:37:28 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Wed, 09 Mar 2016 11:27:10 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114647 Archived-At: --047d7bdca686ae4177052d999b0d Content-Type: text/plain; charset=UTF-8 Example, I eval this in the scratch buffer (with lexical-binding set true): (read (let ((str "TEST") (pos 0) (prev nil)) (lambda (ch) (cond (ch (push ch prev)) (prev (pop prev)) ((< pos (length str)) (prog1 (aref str pos) (setq pos (1+ pos)))))))) According to the docs [1] an input stream can be a function. I would expect the above to return the symbol TEST, but instead I get an error ("end of file during parsing"). [1] http://www.gnu.org/software/emacs/manual/html_node/elisp/Input-Streams.html#Input-Streams -- Mihai Bazon, http://lisperator.net/ --047d7bdca686ae4177052d999b0d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: base64 PGRpdiBkaXI9Imx0ciI+PGRpdj5FeGFtcGxlLCBJIGV2YWwgdGhpcyBpbiB0aGUgc2NyYXRjaCBi dWZmZXIgKHdpdGggbGV4aWNhbC1iaW5kaW5nIHNldCB0cnVlKTo8YnI+PGJyPsKgwqDCoCAocmVh ZCAobGV0ICgoc3RyICZxdW90O1RFU1QmcXVvdDspPGJyPsKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoCAocG9zIDApPGJyPsKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCAocHJldiBu aWwpKTxicj7CoMKgwqDCoMKgwqDCoMKgwqDCoMKgIChsYW1iZGEgKGNoKTxicj7CoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoCAoY29uZDxicj7CoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAg KGNoIChwdXNoIGNoIHByZXYpKTxicj7CoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgKHBy ZXYgKHBvcCBwcmV2KSk8YnI+wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgICgoJmx0OyBw b3MgKGxlbmd0aCBzdHIpKTxicj7CoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCAocHJv ZzEgKGFyZWYgc3RyIHBvcyk8YnI+wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg IChzZXRxIHBvcyAoMSsgcG9zKSkpKSkpKSk8YnI+PGJyPjwvZGl2PkFjY29yZGluZyB0byB0aGUg ZG9jcyBbMV0gYW4gaW5wdXQgc3RyZWFtIGNhbiBiZSBhIGZ1bmN0aW9uLsKg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