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 IJWvDr72ql9zUgAA0tVLHw (envelope-from ) for ; Tue, 10 Nov 2020 20:23:26 +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 UDrACr72ql8FVgAA1q6Kng (envelope-from ) for ; Tue, 10 Nov 2020 20:23:26 +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 D496194042C for ; Tue, 10 Nov 2020 20:23:25 +0000 (UTC) Received: from localhost ([::1]:45820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcaAl-0006tw-UK for larch@yhetil.org; Tue, 10 Nov 2020 15:23:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcaA7-0006sP-PB for emacs-orgmode@gnu.org; Tue, 10 Nov 2020 15:22:43 -0500 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:34822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kcaA5-0006yi-St for emacs-orgmode@gnu.org; Tue, 10 Nov 2020 15:22:43 -0500 Received: by mail-pg1-x531.google.com with SMTP id f38so11257088pgm.2 for ; Tue, 10 Nov 2020 12:22:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:user-agent:from:to:subject:message-id:date:mime-version; bh=pryhcNMcv47gytLRwpQHr7lvjS5QA/Bk8BjMnK2odQU=; b=OE0nctG6/mtDRtqWvx5KZyWtjtKMPVAlw3lwNnA+C/QgTm8uiLV94cPSaPeHhfAGZ/ 2Eg02cSiTlRIQ4XKQpYRWbjI5p6PZWLtcCwL3KYM1ANFpkancyk3IiNZnvgXTktX8vej DF7m9QDBucVNTXncp78S1NjxZ7yTA4V5wzVyF0D3KLisjz6OvKakaSqFKkaoXYgzT0Oq HQN5qO6Eh/hDr6JmdbQ/wtFlLpWCRg5E22cSRr0ZSpE5or3sfspK7vLOH4Zf/+SIeMRs zUPWjDqUfT/MkAB+wsQoG3oIqXthydJmgbHUXmNJ+C+9wGTVh2OrB4AwuHIYLgkX36Sg fkBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:user-agent:from:to:subject:message-id :date:mime-version; bh=pryhcNMcv47gytLRwpQHr7lvjS5QA/Bk8BjMnK2odQU=; b=MJAOCqRxBU68kTGzUGj1VLYNCLmTYUsEWgYkPzDrU1Cg2KgprPyGhYiWN7uaJL58eK E7belOL7cmfh7R0fcGEuBCW6aKBgVexIRbzu/Ku2kb/3OwHCdCvIhuq0aGp1GxBoGrJR anw6DTumD10krYXXQmRqLTk5NnqDlGN8KLZPnO6P4klDfCagABHObSsJmVr5Gatt8JlG HbToHhiM5VO0l/itV7iOHLOk1/2d/pYZFp+oF4CqkhneIlJxa4zcSHciieeVOpaS4PMa cvP0ZdlG521dEf/mKFhvwnBphzzlRCVz3QB3dVO6b385+rBWKOGNNiXt9M5OMrts8jfW P1EA== X-Gm-Message-State: AOAM5334oUY42lbWlDyPuY0PoNtI12r+y4ljg76c+JvpeF0cNmwQ+FRP JXVf+i/z4qDX6gb1ZEHa6EjIMK1j9KLrsw== X-Google-Smtp-Source: ABdhPJytfk7k1zW8UA5PRqw9kNeJ5ChC1VS67T1eSTaOfYhZEMtrxCx7bB66LXfTP2TSJSxVzjG29g== X-Received: by 2002:a63:c34d:: with SMTP id e13mr14671892pgd.22.1605039759362; Tue, 10 Nov 2020 12:22:39 -0800 (PST) Received: from gusbrs-laptop ([199.116.118.169]) by smtp.gmail.com with ESMTPSA id x9sm3258507pjq.42.2020.11.10.12.22.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 12:22:38 -0800 (PST) User-agent: mu4e 1.4.13; emacs 27.1 From: Gustavo Barros To: emacs-orgmode@gnu.org Subject: [FR] Don't hardcode checker functions prefix in org-lint Message-ID: <87k0ut7yid.fsf@gmail.com> Date: Tue, 10 Nov 2020 17:22:34 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=gusbrs.2016@gmail.com; helo=mail-pg1-x531.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=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-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=OE0nctG6; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-Spam-Score: 0.09 X-TUID: dOEoqvckjPfK Hi All, This is a small feature request for `org-lint' not to hardcode the checker functions' prefix, as it currently does. `org-lint' is a small gem in Org, specially to those fat-fingered folks such as myself, to the point that it's been some time since I've been fancying using it to check some of my own personal conventions and structures, beyond Org syntax. It is not difficult to do so, and it is enough to define some appropriate checker functions and a personal `my-org-lints' let binding `org-lint--checkers' to my own set of checkers. It's pretty neat. However, `org-lint' hardcodes the prefix of the checker functions to its own prefix, so that to define my own personal checker functions I have to step on `org-lint's namespace, and use "org-lint-" as a prefix, to get things working. The hardcoding occurs in `org-lint--generate-reports', when each checker is called with: #+begin_src emacs-lisp (funcall (intern (format "org-lint-%s" (org-lint-checker-name c))) ast) #+end_src It would be really useful, and simple enough, if a variable was defined, such as: #+begin_src emacs-lisp (defvar org-lint-checker-prefix "org-lint") #+end_src and the call used this variable instead of hardcoding its value: #+begin_src emacs-lisp (funcall (intern (format "%s-%s" org-lint-checker-prefix (org-lint-checker-name c))) ast) #+end_src This would allow to define the mentioned `my-org-lints' function let binding `org-lint--checkers' and `org-lint-checker-prefix' to appropriate values. So that an user's checker functions could have names with other prefixes. As far as my grasp of `org-lint' goes (still learning), that would be enough for users to enjoy its infrastructure for personal lints without having to invade org-lint's namespace. If you think it's a good idea, I'd certainly appreciate it to be included. Thank you. Best regards, Gustavo.