From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yB5IOucZB2AJOwAA0tVLHw (envelope-from ) for ; Tue, 19 Jan 2021 17:41:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id YHUINucZB2CmbAAA1q6Kng (envelope-from ) for ; Tue, 19 Jan 2021 17:41:59 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8FD2194043A for ; Tue, 19 Jan 2021 17:41:59 +0000 (UTC) Received: from localhost ([::1]:55302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1v0w-0000tG-9K for larch@yhetil.org; Tue, 19 Jan 2021 12:41:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1uwC-00063R-Ms for guix-patches@gnu.org; Tue, 19 Jan 2021 12:37:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1uwA-0000eh-CH for guix-patches@gnu.org; Tue, 19 Jan 2021 12:37:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l1uwA-0001tz-5T for guix-patches@gnu.org; Tue, 19 Jan 2021 12:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45893] [PATCH 0/2] DRAFT: Hint for options. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Jan 2021 17:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 45893-submit@debbugs.gnu.org id=B45893.16110777717252 (code B ref 45893); Tue, 19 Jan 2021 17:37:02 +0000 Received: (at 45893) by debbugs.gnu.org; 19 Jan 2021 17:36:11 +0000 Received: from localhost ([127.0.0.1]:51493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1uvK-0001su-T0 for submit@debbugs.gnu.org; Tue, 19 Jan 2021 12:36:11 -0500 Received: from mail-qt1-f178.google.com ([209.85.160.178]:38336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1uvH-0001sE-1T for 45893@debbugs.gnu.org; Tue, 19 Jan 2021 12:36:09 -0500 Received: by mail-qt1-f178.google.com with SMTP id c12so8734601qtv.5 for <45893@debbugs.gnu.org>; Tue, 19 Jan 2021 09:36:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=EyCPcjHnhA4lQXmmbRuxE+kTJU/6Q2DGd35NAiBnbWs=; b=nuwUMK+eQBEXfQaw9eCRFOoZHFcsPr4FsFo2PmSpNTPVQYm6kr9DG4w+W9zr4thCoc KHMM0QmVWduX2jU02GelXrC2a40HL/s5C6yjXh1TdEQunO2FbMkykKzvBxXb09mjOQcP CXpkFEuT+nISWQL4KufxG1aejsu+81voquoiZezswziH4Ok3EFqdvXlaqW8zJ1gXnZek hgj/b9zDDeuDQXGfnrDfuyhUVwzGjPs17e5Jqa8H09iPHo/7vowgWtS4awNg221MBxre OVScrKAlLtN97i/WD/L+VUp3x6+DD87otPoKWe3LakP8QmtUiCvmjPMFNkFr4JPaB0Un RJ6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=EyCPcjHnhA4lQXmmbRuxE+kTJU/6Q2DGd35NAiBnbWs=; b=e2Px0I7uLPKERVj57XYY/YmM0vD6Ljw50jme/5NZeM3tNtYlWEEnRTBEgNesrnUKWv EriiP0n/PkJIp4iGL9HfjvK2VCBQVTBHVT2gHZ7cCALxt7yN87GqcWy7GqvrPpvYoAlK aF1B5T8XQfnTVfQzoirTzb7dDi2w3OODN5OGJNfTXHV8OzMux5Qlkm+gxWS3Brtg8bMd U9NEtgh4KEnbfmpQvMw23G07iCg6/KRUG+fdRWvaWkh4mV29t5iEfx2fc7uMe69ffOlJ DZHATkoigKDV53Sia7Z7Xpy7R4fdMTtgNmWyDyycUVHH9W/XutX0pFVN9BHHxqlzWruk ZDmw== X-Gm-Message-State: AOAM531DoRRpI6EJU6wlj7sSYoYA3J2BjE+ZJt70pmddfXNFPYOsmBgd 5tGb6TuEmyZyoagY/SfgfZBWzYq2tGIA6cbyDc4= X-Google-Smtp-Source: ABdhPJyLqbdREaK3OqL7r7Tz86E4lGvcey9xR5Ci0u0azv2TTrpjfANukZeTLFvr3e/7PMKqdjPirjqG0z6NAgLY5RA= X-Received: by 2002:ac8:57c1:: with SMTP id w1mr5263075qta.313.1611077760939; Tue, 19 Jan 2021 09:36:00 -0800 (PST) MIME-Version: 1.0 References: <20210115163732.53665-1-zimon.toutoune@gmail.com> <20210115163953.53721-1-zimon.toutoune@gmail.com> <87im7shmin.fsf_-_@gnu.org> In-Reply-To: <87im7shmin.fsf_-_@gnu.org> From: zimoun Date: Tue, 19 Jan 2021 18:35:49 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45893@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.25 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=nuwUMK+e; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 8FD2194043A X-Spam-Score: -1.25 X-Migadu-Scanner: scn0.migadu.com X-TUID: yxAVY5alzHu1 Hi Ludo, On Tue, 19 Jan 2021 at 18:20, Ludovic Court=C3=A8s wrote: > zimoun skribis: > > > * guix/scripts/search.scm (define-command): Replace 'args-fold*' by > > 'parse-command-line'. > > * guix/scripts/show.scm (define-command): Replace 'args-fold*' by > > 'parse-command-line'. > > [...] > > > - (args-fold* args %options > > - (lambda (opt name arg . rest) > > - (leave (G_ "~A: unrecognized option~%") name)) > > - handle-argument > > - '())) > > + (parse-command-line args %options '())) > > In these two cases, you need to pass #:build-options? #f. Ok. One question is: do we replace all the 'args-fold*' by 'parse-command-line' (with the correct arguments)? If yes, the proposal works. Otherwise, the computation of the hint should be moved to elsewhere. But where to avoid to duplicate code (replacing args-fld* by parse-command-line in all guix/scripts/ fixes the issue). Note that the "issue" is to handle the error. For example, if one moves "option-hint" to "args-fold*" then the hint would not work for all the commands. What is your suggestion? All the best, simon