emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org-lint: Fix invocation with C-u prefix argument
Date: Wed, 01 Jun 2022 16:08:03 -0400	[thread overview]
Message-ID: <87zgiw1718.fsf@alphaville.usersys.redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 160 bytes --]

`C-u M-x org-lint' was failing to run any checkers, no matter what
category was chosen, because the calculation of the list of checkers
always returned `nil'.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] org-lint: Fix invocation with C-u prefix argument --]
[-- Type: text/x-patch, Size: 1063 bytes --]

From b55162adf1250980ad0f42423832aa1aa1045d30 Mon Sep 17 00:00:00 2001
From: Nick Dokos <ndokos@redhat.com>
Date: Wed, 1 Jun 2022 12:28:23 -0400
Subject: [PATCH] org-lint: Fix invocation with C-u prefix argument

* lisp/org-lint.el (org-lint): Fix the order of the arguments in
the `assoc-string' call when calculating the list of checkers to
invoke.

`C-u M-x org-lint' was failing to run any checkers, no matter what
category of checkers was chosen, because the calculation of the list
of checkers always returned `nil'.
---
 lisp/org-lint.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index cce6fddbd..62a245330 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -321,7 +321,7 @@ ARG can also be a list of checker names, as symbols, to run."
 		    nil t)))
 	      (cl-remove-if-not
 	       (lambda (c)
-		 (assoc-string (org-lint-checker-categories c) category))
+		 (assoc-string category (org-lint-checker-categories c)))
 	       org-lint--checkers)))
 	   (`(16)
 	    (list
-- 
2.34.1


[-- Attachment #3: Type: text/plain, Size: 10 bytes --]


-- 
Nick

             reply	other threads:[~2022-06-01 20:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-01 20:08 Nick Dokos [this message]
2022-06-02  5:09 ` [PATCH] org-lint: Fix invocation with C-u prefix argument Ihor Radchenko
2022-06-06 14:39   ` Nick Dokos
2022-06-08 13:30     ` Ihor Radchenko
2022-06-09  3:10       ` Nick Dokos

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=87zgiw1718.fsf@alphaville.usersys.redhat.com \
    --to=ndokos@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).