From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: lists, plain conses and length Date: Thu, 3 Sep 2020 19:23:34 -0700 (PDT) Message-ID: <20200904022334.791EBC2177B@raman-glaptop.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15115"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 04 04:24:37 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kE1P2-0003oA-AX for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Sep 2020 04:24:36 +0200 Original-Received: from localhost ([::1]:34694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kE1P1-0001vx-DW for ged-emacs-devel@m.gmane-mx.org; Thu, 03 Sep 2020 22:24:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kE1O9-00013g-K5 for emacs-devel@gnu.org; Thu, 03 Sep 2020 22:23:41 -0400 Original-Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:33114) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kE1O8-0004NQ-2I for emacs-devel@gnu.org; Thu, 03 Sep 2020 22:23:41 -0400 Original-Received: by mail-pf1-x42c.google.com with SMTP id u20so3803258pfn.0 for ; Thu, 03 Sep 2020 19:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:subject:mime-version:content-transfer-encoding:message-id :date; bh=del8WidiwyOJnO7otIKfps4LXQbF3BosKox8K6smNHU=; b=C8IHydW8ygyxyfplpKF80gv7DCvPXAMd0pfQdJQQBuAnoJKjXGHqPm9xduCnFCy+/r Ci56a6EJXr6xLPzpxXbGMzYqvKZ37gxyn4nlZ98u4K4sgPkpy6S65+xn1Lnwsa3kwlyt 7PMRQy+BhVWOoaFkdqhDoT9TSg3XfUVSyrS+sn2Mf9BLWN1C6JkBbzxJ3nLKNQopoEwW rjhfx1j4j3Qu7vFUYLp2uMVVbu/QDOSKLgN3xy0UijQQS4GPzp0l6d+8DVMZifib0Lrd Gqm18SyDGZv6PnmZPu878hZSIi8Lnc05aBkd/m1p/IKw6IArIQPnLC/tonZLCIIBfTi0 bmpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:mime-version :content-transfer-encoding:message-id:date; bh=del8WidiwyOJnO7otIKfps4LXQbF3BosKox8K6smNHU=; b=Rhfw+/l5wxr5GlDe97ejNP28Bv0bEmCklHkN+vBYJJl5rywJ0Gp6q/LvluNVIh+CMY cTBTp9pc2MnujrQdMEMxjESfCfZpa7pxLEsM6669ZdJE5iuOxMTFgyeN06iawgm1ASpJ 2sRRV+8j+fgGHXDk67HGtdWd5O3ylWelaqSdo+/Rl7KAG74vALuuiB0Gm/krGWVGQef0 6R82QWQC6+8pW8uR5tEryX9jxmbsVOLt040pCZoLGvGKjRDfqukUfU42PGdV7JofjrnI e3uSnSmIkP6chPfUPr+ZkBV62cIE6ncpNEmJyppPArozgSy4hV8rEXhSn/d4KrPIZOBL 16Rg== X-Gm-Message-State: AOAM533fZbY8WjRZ/e3nOcPucYlJFGChtWxKVYXeJ/rYqdTDw6zh+hzg Rz6CbCOHFvUhEPLOv2fN8D7HqGSQct26yRxl X-Google-Smtp-Source: ABdhPJxox6ROy/xn0KI/k4gQt8dscKPiaMK7dK3de71+W1VnPhp4T68QM4ZqZmRtD7zuhJ0iZ14oJw== X-Received: by 2002:a05:6a00:1509:: with SMTP id q9mr6455906pfu.24.1599186216634; Thu, 03 Sep 2020 19:23:36 -0700 (PDT) Original-Received: from raman-glaptop.localdomain (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id q7sm3834673pgg.10.2020.09.03.19.23.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 19:23:35 -0700 (PDT) Original-Received: by raman-glaptop.localdomain (Postfix, from userid 13930) id 791EBC2177B; Thu, 3 Sep 2020 19:23:34 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=raman@google.com; helo=mail-pf1-x42c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -180 X-Spam_score: -18.1 X-Spam_bar: ------------------ X-Spam_report: (-18.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:254511 Archived-At: Ran into this while trying to distinguish a cons from a list: Try this: (setq a (cons 1 2)) => (1 . 2) (consp a) => t (listp a) => t (length a)=> Debugger entered--Lisp error: (wrong-type-argument listp 2) Q: how does one distinguish a cons from a list. The error message for length may need fixing since it says the argument passed to it is not a list (it's correct) but then listp is wrong? -- ♉ Id: kg:/m/0285kf1 🦮 -- ♉ Id: kg:/m/0285kf1 🦮 -- ♉ Id: kg:/m/0285kf1 🦮