emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [FR] Don't hardcode checker functions prefix in org-lint
@ 2020-11-10 20:22 Gustavo Barros
  2020-11-13  1:08 ` Gustavo Barros
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo Barros @ 2020-11-10 20:22 UTC (permalink / raw)
  To: emacs-orgmode

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
 (intern (format "org-lint-%s"
		 (org-lint-checker-name c)))

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")

and the call used this variable instead of hardcoding its value:
#+begin_src emacs-lisp
 (intern (format "%s-%s"
		 (org-lint-checker-name c)))

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,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-13  1:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 20:22 [FR] Don't hardcode checker functions prefix in org-lint Gustavo Barros
2020-11-13  1:08 ` Gustavo Barros

Code repositories for project(s) associated with this inbox:


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).