From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: Re: [PATCH] gnu: Allow nfs file systems to be automatically mounted. Date: Tue, 29 Nov 2016 07:27:48 +0100 Message-ID: <20161129062747.GA24796@jocasta.intra> References: <8760nc6et6.fsf@gnu.org> <1480152990-7080-1-git-send-email-jmd@gnu.org> <87fumenl44.fsf@gnu.org> <20161126193358.GA10000@jocasta.intra> <87polfbt8y.fsf@gnu.org> <20161128140754.GA7013@jocasta.intra> <87lgw3l3hw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VbJkn9YxBvnuCH5J" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBbtX-0004xv-Mh for guix-devel@gnu.org; Tue, 29 Nov 2016 01:28:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBbtW-0001K0-Qe for guix-devel@gnu.org; Tue, 29 Nov 2016 01:27:59 -0500 Content-Disposition: inline In-Reply-To: <87lgw3l3hw.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic Court??s Cc: guix-devel@gnu.org, John Darrington --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 28, 2016 at 10:05:15PM +0100, Ludovic Court??s wrote: John Darrington skribis: =20 > On Mon, Nov 28, 2016 at 02:59:09PM +0100, Ludovic Court??s wrote: > > ???match???,=20 > > > > Have another look: + (let* ((host (match (string-split sou= rce #\:) ((h _) h))) > =20 > Right, but there are other occurrences of ???car??? for ???geta= ddrinfo???. :-) > > But that occurance applies to a real list, rather than a list used a= s record. > In other words, I really do just want to get the first item of that = list. > As I understand it, match is supposed to be used for heterogenous li= sts where > each member has its own semantics. That is not the case here. =20 ???match??? can be used to match anything, and I highly recommend usin= g it for lists (info "(guile) Pairs"): it generates clearer and foolproof code. =20 In this case ???getaddrinfo??? might well return an empty list. =20 So then "car" would raise an error (unless I check it first with pair?) - j= ust as match would raise an error unless I add a catch-all case. I'm still not= =20 convinced that match has any advantages in this case. However I've changed it despite that, and pushed this patch to master. I h= ope it's ok. J' --=20 Avoid eavesdropping. Send strong encrypted email. PGP Public key ID: 1024D/2DE827B3=20 fingerprint =3D 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key. --VbJkn9YxBvnuCH5J Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlg9H+MACgkQimdxnC3oJ7OQ7QCfSJ4u5me+ZB5Sw6s0YiNISVzJ tM8AnR4iKehhUpB4/VCvVz/n8M6rbf/s =PGwy -----END PGP SIGNATURE----- --VbJkn9YxBvnuCH5J--