From 524ee9c37c99019b6e700c98919ebb1bd8fd57c7 Mon Sep 17 00:00:00 2001
From: alexgiorev <alex.giorev@gmail.com>
Date: Sat, 5 Feb 2022 00:43:40 +0200
Subject: [PATCH 2/3] lisp/org.el: Remove (upcase new) in `org-priority'

* lisp/org.el (org-priority): After the new priority is computed,
when checking if it is within the bounds defined by
`org-priority-highest' and `org-priority-lowest', the priority is
upcased, but this leads to an error when all priorities are lowercase
letters.

TINYCHANGE
---
 lisp/org.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 2543498de..757c306bc 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11391,7 +11391,7 @@ When called programmatically, ACTION can be `set', `up', `down',
 		     (= (upcase org-priority-lowest) org-priority-lowest))
 	    (setq new (upcase new)))
 	  (cond ((equal new ?\s) (setq remove t))
-		((or (< (upcase new) org-priority-highest) (> (upcase new) org-priority-lowest))
+		((or (< new org-priority-highest) (> new org-priority-lowest))
 		 (user-error
 		  (if nump
 		      "Priority must be between `%s' and `%s'"
@@ -11418,8 +11418,8 @@ When called programmatically, ACTION can be `set', `up', `down',
 			    org-priority-default
 			  (1+ org-priority-default))))))
 	 (t (user-error "Invalid action")))
-	(when (or (< (upcase new) org-priority-highest)
-		  (> (upcase new) org-priority-lowest))
+	(when (or (< new org-priority-highest)
+		  (> new org-priority-lowest))
 	  (if (and (memq action '(up down))
 		   (not have) (not (eq last-command this-command)))
 	      ;; `new' is from default priority
-- 
2.25.1