From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aKEiEGRy3GAmowAAgWs5BA (envelope-from ) for ; Wed, 30 Jun 2021 15:32:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sKvjC2Ry3GBEeAAA1q6Kng (envelope-from ) for ; Wed, 30 Jun 2021 13:32:20 +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 8974214653 for ; Wed, 30 Jun 2021 15:32:19 +0200 (CEST) Received: from localhost ([::1]:55558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyaK8-0008B9-Tq for larch@yhetil.org; Wed, 30 Jun 2021 09:32:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyaIX-0007wx-LM for emacs-orgmode@gnu.org; Wed, 30 Jun 2021 09:30:37 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]:43964) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyaIV-0001Ru-AC for emacs-orgmode@gnu.org; Wed, 30 Jun 2021 09:30:37 -0400 Received: by mail-lj1-x22c.google.com with SMTP id f13so3274375ljp.10 for ; Wed, 30 Jun 2021 06:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=pR4ZdsXdorICGrFiEl44zMI52mmv2XfIx6Bf5QqTpbU=; b=ul8Hq3Yfy0dg516a2XlFd8UsOMYh59GK3ANjEu95HqTuW+dIJl9zr/KYqNAhX1vZcU a7iSJcXUmkv3RVrrWXNEm8KA0OjIFCD7EBCWWbnBdhHoEMYGkrMPMG9u6NGTCAxh/5km pr3nxA8BPs1tC7bascb/matGvCP9Vu7maHaEQNT3viOIe7SXzYPuAh10DqMU2mPoknb0 7z9tpUICTccJXWlbyqXOiGsIS3dgNiyqgKbKXfJMoitWE0rMXg1WIb+UgfP/gGahrflp HNxsid4ZFqkrrocbOP//Qd+0tsL0SOWDyjZ2sLnYrHZV4P+3pvymyvzZ6wav91Ruzt6K waAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=pR4ZdsXdorICGrFiEl44zMI52mmv2XfIx6Bf5QqTpbU=; b=Bzeu23omv7jILqVG9k65KVNM/BiDo3EmuVWB7Fzb9vBXtLn5WGj6XmA58AWdnvKly3 GSA3Qs2h8c4OchjV1NMNNtqYEwnmsnUN22wW5s+BsxbJvWET0PUaRhNruVSzX93/Dfza ohPnOBUSHwcMNJpsCQ2igeppS18Dn4w8j14H1+zWtvgU6Kn55ZQ+2fVuwqufCjdoxbli TQZdxQ55rtpGTYW4418BdlENRnEi5QshQZXa2HlwrFAF5djnJX73J9p2UAqG5F3yEeFA PkddMSDEej+xtR9lruTTGAr0vlz/Cnjv7Dc8M50n3PftcItEISEpXJpucUZktz8gmfHE flyQ== X-Gm-Message-State: AOAM533tNZPc64qckXk7y4pGdHwRSxmh78q5SuE3wnvuvczNv1kOb3Rj 5p44OB2bLD4pPG4MU5X8eQ6gi+cekTuyaM2zzr4G1gZNhtcpEg== X-Google-Smtp-Source: ABdhPJxZYGWMzMxzX5W6nYhph3PHKEeMmmNrPqiWWkBf8YaoG3ZLwtA+Bj31cWCJWy17MO5+5sCqqi+gnCk9nF1k4lo= X-Received: by 2002:a2e:8613:: with SMTP id a19mr7946575lji.410.1625059833200; Wed, 30 Jun 2021 06:30:33 -0700 (PDT) MIME-Version: 1.0 From: Michael Dauer Date: Wed, 30 Jun 2021 15:30:22 +0200 Message-ID: Subject: BUG: org-lint false missing arguments for macro with optional arguments To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="00000000000018c43f05c5fbbac0" Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=mick.dauer@gmail.com; helo=mail-lj1-x22c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625059939; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pR4ZdsXdorICGrFiEl44zMI52mmv2XfIx6Bf5QqTpbU=; b=PJEsU3APYT8Px1zZkzqNOQAa4HAqvdt8zoNQKdLwiHMm0vqfkY3iGmerhrtnVEipdDiGiZ nSkUC4SN9OUKmXj1MZSuGL0HlDRptAQftWptrdojo97aH8iMv/jPJkJrEGnEgM0MGIvVCR +WBCGcLsNtZ3zqqvTMf0gP4i/wIEVHj6A/N7rLmDtRwW8q5ljsvbSHlkNSeWJc+oOvabc9 6fOZNwNEmUiSaMcw9sf9TdEv/SCjUNiyfmSnwW52gmuKLVAMLv6VHrQFaCMxVia1naakPA QedWozbHpz0v+hWHAIPz3aNQKwfoTx+Gn9+91ThK/Iqa3ldyX5HIOQYYAZ2Mkg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625059939; a=rsa-sha256; cv=none; b=QdrqMkSLneqqQrrsidteDtLTYn9nn6ewKvSfu2pUrn4JIatdw3rgQfS5k3w37/OO/IxpgH Nhi+E+KwO2UzOMUgjSJdbM932bLReY5XrJdTPKT65sCsKj4zzXx9HVdRr7dNXFbCJZuSr4 5Hozo895qb17s5LTmtSAywboiVKoPIVQVNjGq+QSOopnes4Q+PNxQhrQiHMLq8/ipx11Bu mD+hFe7Y12y9B9McUnoC/H16rWQvLf0h7ALAEi0G4LKdYI0c67lCYoxB6n8RwFPyIrG4ir gkHHBjELPzV/HDM8KjlATjywkcIpg21OAsQJynd+UyzNj/3HJNUSX+Ai/biBxA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ul8Hq3Yf; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ul8Hq3Yf; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 8974214653 X-Spam-Score: -1.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: /R8IpX5xuC7f --00000000000018c43f05c5fbbac0 Content-Type: text/plain; charset="UTF-8" Hi, If I did not miss it there is no way to specify arguments as optional for a macro definition. I've the following: (defun ct-action-plan (&optional up recently-done) ... (push '("action_plan" . "(eval (ct-action-plan $1 $2))") org-export-global-macros) The arguments of the function are specified as optional. The macro just call it with $1 and $2, which are nil if not stated like in the following: {{{action_plan}}} But here org-lint reports: 327 low Missing arguments in macro "action_plan" Is this a bug? Any ideas for a work-around to avoid confusion for my users. BTW: I came to this after working around the other reported bug of lint to ignore org-export-global-macros. thx, m --00000000000018c43f05c5fbbac0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

If I did not miss it there is no wa= y to specify arguments as optional for a macro definition.

I've the following:
(defun ct-action-plan (&opti= onal up recently-done)
...
(push '("action_plan&q= uot; . "(eval (ct-action-plan $1 $2))") org-export-global-macros)=

The arguments of the function are specified as op= tional. The macro just call it with $1 and $2, which are nil if not stated = like in the following:
{{{action_plan}}}

But here org-lint report= s:
327 low =C2=A0 Missing arguments in macro "action_plan"
=

Is this a bug? Any ideas for a work-around to avo= id=C2=A0confusion for my users.

BTW: I came to thi= s after working around the other reported bug of lint to ignore org-export-= global-macros.

thx,
m
--00000000000018c43f05c5fbbac0--