Derek Chen-Becker <[email protected]> writes:
> If this looks reasonable I'll start working on the other parts of the
> codebase that deal with priorities, using the same helper functions.
Below are some comments from me.
> +must all be a positive integer between 0 and 64, inclusive.
"Positive integer between 0 and 64, inclusive" makes zero sense (pun
intended). I think you meant to write a non-negative integer. Zero is
not positive, yet it is listed and the sentence says "inclusive".
> +Latin alphabetical characters A-Z, and positive integers in between 0
> +and 64, inclusive.
Ditto.
> +The value of the priority cookie must be a capital latin
^^^^^
Latin
> +alphabetic character, A-Z, or can be an integer value in
> +the range 0-64.
^^^^
0 through 64 (perhaps)
"through" implies "inclusive", unlike "to"
> +(defun org-priority-valid-cookiep (priority)
^^^^^^^
cookie-p
> +(defun org-priority-valid-valuep (priority)
^^^^^^
value-p
> +(defun org-priority-value-in-rangep (priority)
^^^^^^
range-p
> + "Return t if the PRIORITY is a valid priority value that is in the
^^^^^^^
useless words
> + org-priority-lowest >= PRIORITY >= org-priority-highest."
^^ ^^
<= <=
> + (<= priority org-priority-lowest)
> + (>= priority org-priority-highest)))
(<= org-priority-lowest priority org-priority-highest)
> +(defun org-priority-numberp (priority)
^^^^^^^
number-p
> + "Return t if the PRIORITY is a number between 0 and 64, inclusive,
^^^^^^
integer
> + (>= priority 0)
> + (<= priority 64)))
(<= 0 priority 64)
> +uppercase alphabetic character (A-Z), or an integer between [0,64],
^^^^^^^
in
> + (let ((is_numeric_priority (org-priority-numberp
^^^^^^^^^^^^^^^^^^^
is-numeric-priority
> + (setq remove t new_value ?\ ))
^^^^^^^^^
new-value
> + (setq new_value_string (org-priority-to-string new_value))
^^^^^^^^^^^^^^^^
new-value-string
> + (if has_existing_cookie
^^^^^^^^^^^^^^^^^^^
has-existing-cookie
> + )
^
lonely parens (in the tests)
Rudy
--
"If you're thinking without writing, you only think you're thinking."
--- Leslie Lamport
Rudolf Adamkovič <[email protected]> [he/him]
http://adamkovic.org