From: Michael Dauer <mick.dauer@gmail.com>
To: emacs-orgmode@gnu.org
Subject: BUG: org-lint false missing arguments for macro with optional arguments
Date: Wed, 30 Jun 2021 15:30:22 +0200 [thread overview]
Message-ID: <CAP7OBxK7k_5e9f2bnrEfz2P5XJgd8wSF6LAEMaN9urkteSRNcw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 697 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 960 bytes --]
next reply other threads:[~2021-06-30 13:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 13:30 Michael Dauer [this message]
2021-08-12 8:32 ` BUG: org-lint false missing arguments for macro with optional arguments Ihor Radchenko
2021-08-12 16:44 ` Maxim Nikulin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP7OBxK7k_5e9f2bnrEfz2P5XJgd8wSF6LAEMaN9urkteSRNcw@mail.gmail.com \
--to=mick.dauer@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).