From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Federico Tedin Newsgroups: gmane.emacs.bugs Subject: bug#62020: Lisp reader: dotted pair notation not working when initial elements are omitted Date: Tue, 7 Mar 2023 02:14:02 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29740"; mail-complaints-to="usenet@ciao.gmane.io" To: 62020@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 07 02:15:12 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZLv6-0007YX-6B for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Mar 2023 02:15:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZLuy-0004a5-6h; Mon, 06 Mar 2023 20:15:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZLuw-0004Zt-Sg for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2023 20:15:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZLuw-0005dw-Im for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2023 20:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZLuw-0006hl-BJ for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2023 20:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Federico Tedin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Mar 2023 01:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62020 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167815166125707 (code B ref -1); Tue, 07 Mar 2023 01:15:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Mar 2023 01:14:21 +0000 Original-Received: from localhost ([127.0.0.1]:44045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZLuG-0006gZ-Jr for submit@debbugs.gnu.org; Mon, 06 Mar 2023 20:14:20 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:56200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZLuE-0006gR-H6 for submit@debbugs.gnu.org; Mon, 06 Mar 2023 20:14:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZLuD-0004Tu-VL for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2023 20:14:18 -0500 Original-Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZLuC-0005YQ-AE for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2023 20:14:17 -0500 Original-Received: by mail-pg1-x52b.google.com with SMTP id 130so6722932pgg.3 for ; Mon, 06 Mar 2023 17:14:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678151653; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=ZhuiW9cT98BTxgq9hsTsIexk6exqpHgV0uLny62QGyo=; b=KuoP/O9a/x3G3evgoI5pT7q9BesrJmm5Myg191brbsNOC9vS6jKR6+Rdg09HOOypYc 7W6VkCaVbkywUpihf1gJC4J/kiJwiWnVL/1pZdVOBqgSZyJLO8CDxV3Jc8IMYn3S4pkV mtg6zGqfyw4M/hftTlfDR8bhZDX59pPzHPnBBg4nF9/9nu27XzMKLVC6V1EKAl5RELRD IFytPhThzjz6TIdhQOtGHsj6FUg2t+ocKuePreYR4elOnw8FtKL8pgb+UpPwXA/KyiC3 t38zAoyWhJQltu86vOa2vATVCANsqFp3Ny+hWu0+h25IZO+eMmVBE9JzrWbEBm69TNpR +sUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678151653; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZhuiW9cT98BTxgq9hsTsIexk6exqpHgV0uLny62QGyo=; b=hqScjhUJuc/95JUb2crtRbjk/aUCMLe52meY18mzgfY9Gk7qV1IbpS4sZzA/0xg+XO Mqa92psh064Lv9LnqB79WyqCzT+nwN/40msI9yKhQBknFm8Q/A80pPZ5OeyOqTitTqWp +VKzYAnYr0z4qBnG28qhSSnp7/lHeb2eYbaqBcOTgraUZrbOAtb3guhy4xoBR0zLrOD8 jlg8X1J/RPbWL0kLJmeUht1fbLoG6cZYM987O2GxQmLbK0u4E9uLn4wZkco3K75BGeX0 kuLQcflBPPXpQJcjBjKHKeOJKeGpHOVH+xkIuFspBhz4y6hcTg0KQe84NFiwS6f1tNvl YfvQ== X-Gm-Message-State: AO0yUKWOodK6gdTxeSpBEDvR+mFgEnt5xpw4emwZT8/I4Yr+iAOLnZL5 hnMFQif8WmIcp9BK29Igf0NXdvvMQK/zWMfxok0FAXovJkU= X-Google-Smtp-Source: AK7set9L4zKBEIvU329XhVy2j11KiBviJnlv7+FTVEzUT0esHlr3YP0IYElhUmzSq4Akyuu7VaROuZynxBdrLNzqrO0= X-Received: by 2002:a63:5508:0:b0:502:fd71:d58c with SMTP id j8-20020a635508000000b00502fd71d58cmr4764292pgb.9.1678151653312; Mon, 06 Mar 2023 17:14:13 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=federicotedin@gmail.com; helo=mail-pg1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257427 Archived-At: According to the Elisp docs (https://www.gnu.org/software/emacs/manual/html_node/elisp/Dotted-Pair-Notation.html), one should be able to evaluate e.g.: (. 1) to: 1 This works correctly in Emacs 28.1 However, in the emacs-29 branch (bd07cec) this results in: *** Read error *** Invalid read syntax: "." Since the description in the docs are the same in the emacs-29 I assume this is a bug. I believe this may have been caused by the changes implementing the nonrecursive Lisp reader. I believe the fix would be roughly: - in read0 (lread.c), when handling c == '.', ensure we handle not only the case where the top of the read stack is RE_list but *also* RE_list_start. - if the top of the stack was effectively RE_list_start, then the top of the stack needs to be manipulated somehow so that at the end of read0 the correct value is returned, when emptying the stack.