From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: Why does assq fail when getting quoted value from a property list? Date: Mon, 6 Aug 2018 09:29:36 +0200 Message-ID: <20180806072936.GA29487@tuxteam.de> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1533540483 30276 195.159.176.226 (6 Aug 2018 07:28:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2018 07:28:03 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 06 09:27:58 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmZvq-0007jC-DX for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Aug 2018 09:27:58 +0200 Original-Received: from localhost ([::1]:32867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmZxv-0005iU-Ap for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Aug 2018 03:30:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmZxV-0005iE-Jt for help-gnu-emacs@gnu.org; Mon, 06 Aug 2018 03:29:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmZxS-0004qV-GG for help-gnu-emacs@gnu.org; Mon, 06 Aug 2018 03:29:41 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:38598) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fmZxS-0004qJ-5B for help-gnu-emacs@gnu.org; Mon, 06 Aug 2018 03:29:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=2eg/afPAHzWRcMEaXQl+4w6v3pKWMgWzQCLrIsx7LXM=; b=lyIWzBoFY98bPLTMP8O834c2E0M+0VytWrKwQEFV/tHxyQnhaN+gbPR/H7Z2zjy3+s/xHO8yUjm3b7alkw12D9yngO/IDZU09ZxBcrd+7JnVTp6R0jKlYs+W1P9Nqris0ZUdPQRMyHtiMSgQ78d3zTtkrU7ER2tkwMFQSqVjV5V4L2hN+tEb3X+jh/HsP8JmnTUTwW1KM3tRR/GxXMo4hrOZIyEn9CY+Ve2/WSV3i1imh4HiIlS8A3cfDtbKmxE1x20W3JYoxuF6jutOnKqoHliVKCTkZJeZUODMcc6um3eC8IsL4usjM2YOhNQFsZvhh2TawltDPuozz+HAxxMlFw==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1fmZxQ-0007lu-2t for help-gnu-emacs@gnu.org; Mon, 06 Aug 2018 09:29:36 +0200 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117639 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, Aug 05, 2018 at 10:55:05PM -0500, Cody Goodman wrote: > This returns (urgent . 2) as I'd expect: > > (assq 'urgent '((urgent . 2))) > > Why does this not return the same? > > (let ((lookup (plist-get '(:severity (quote urgent)) :severity))) > (assq lookup '((urgent . 2)))) Because the value of (plist-get '(:severity (quote urgent) :severity) is the symbol 'urgent (and not the symbol urgent, as you probably expect). IOW, '(:severity (quote urgent) :severity) is quoting the 'urgent twice, so to speak (one is the outer '(...), the other is the inner, explicit (quote ...) HTH - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAltn+OAACgkQBcgs9XrR2kZMwwCggb8mFi/3CKrlpETxudgZbW6A mVUAn1jcBAQ/1UWNNNkzLaBhelZRqGlF =56TD -----END PGP SIGNATURE-----