From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: pcase-dolist Date: Thu, 09 Jul 2015 15:40:05 +0200 Message-ID: <87bnfle9fu.fsf@gmail.com> References: <87wpyaet7r.fsf@web.de> <87y4iqh7x0.fsf@web.de> <87oajmld49.fsf@gnu.org> <87oajlyif9.fsf@gnu.org> <874mldwt7y.fsf@gmail.com> <878uapy6r9.fsf@gnu.org> <87a8v5bk20.fsf@gmail.com> <878uap5ubb.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1436449227 18845 80.91.229.3 (9 Jul 2015 13:40:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jul 2015 13:40:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 09 15:40:26 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZDC3s-0000t3-Db for ged-emacs-devel@m.gmane.org; Thu, 09 Jul 2015 15:40:24 +0200 Original-Received: from localhost ([::1]:39947 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDC3r-0003lR-TH for ged-emacs-devel@m.gmane.org; Thu, 09 Jul 2015 09:40:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDC3m-0003ic-6c for emacs-devel@gnu.org; Thu, 09 Jul 2015 09:40:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDC3h-00022d-8X for emacs-devel@gnu.org; Thu, 09 Jul 2015 09:40:18 -0400 Original-Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]:33080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDC3h-00021p-1W; Thu, 09 Jul 2015 09:40:13 -0400 Original-Received: by wiwl6 with SMTP id l6so19130210wiw.0; Thu, 09 Jul 2015 06:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; bh=GMPFLVA9gVbXuihX4Gimyw0FGs9NBoXWaZQG8oefdDs=; b=0mKyzFnfffhzeDj2hIcK7zSzNEjENFml6nftuANjz1AlQ9D2GY5fq/OY6vVDnh4hI2 FKi9uJh16Pdf5FD5TSHBQZ05Q8eXDEO8+drKfT0qJXOulOyeQOQIbhfrt6tvxpjqrFc5 2npHRV1Lir2eBUAZWAuk4jm4o/H/OLxewlcvasqQa+LHQ3GO7DpjuHFG0g1BorlRENGT nbA6I8zHRywoGdrBTkr60eoDG8tApR4sMkutkKD6IutKyBTD6BzMNnyHdGEOuwiaVxAH F2vEQtDqjRefQe8vKZQU7ZEZbuvSggdWvpOcRsoySFzfikjw34C+AvD0zQimpVcvPsaE h6Kw== X-Received: by 10.181.11.229 with SMTP id el5mr84468657wid.40.1436449212125; Thu, 09 Jul 2015 06:40:12 -0700 (PDT) Original-Received: from dell-14z ([37.161.129.93]) by smtp.gmail.com with ESMTPSA id ef10sm8901450wjd.49.2015.07.09.06.40.09 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 09 Jul 2015 06:40:11 -0700 (PDT) In-reply-to: <878uap5ubb.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187789 Archived-At: Tassilo Horn writes: > Thierry Volpiatto writes: > >>> As I've said, you can use cdr-matching with a don't-care-pattern, >>> e.g., >>> >>> (pcase-let ((`(,a ,b . ,_) (file-attributes "~/.emacs"))) >>> (list a b)) >>> >>> which clearly states that you know that the list returned by >>> `file-attributes' has more than two elements but you are only interested >>> in the first two. >> >> Ah! Ok so the dont-care-pattern handle all the remaining elements. > > No, the crucial part is the dot separating the front from the rest of > the list. With `(,a ,b . ,r) the list of the 8 remaining file > attributes would be bound to r. When you don't need those, you can omit > the binding with the don't care pattern. Yes it's what I understood. Thanks. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997