Function: org-agenda-priority
org-agenda-priority is an interactive and byte-compiled function
defined in org-agenda.el.gz.
Signature
(org-agenda-priority &optional FORCE-DIRECTION)
Documentation
Set the priority of line at point, also in Org file.
This changes the line at point, all other lines in the agenda referring to the same tree node, and the headline of the tree node in the Org file.
Called with one universal prefix arg, show the priority instead of setting it.
When called programmatically, FORCE-DIRECTION can be set, up,
down, or a character.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
(defun org-agenda-priority (&optional force-direction)
"Set the priority of line at point, also in Org file.
This changes the line at point, all other lines in the agenda
referring to the same tree node, and the headline of the tree
node in the Org file.
Called with one universal prefix arg, show the priority instead
of setting it.
When called programmatically, FORCE-DIRECTION can be `set', `up',
`down', or a character."
(interactive "P")
(unless org-priority-enable-commands
(user-error "Priority commands are disabled"))
(org-agenda-check-no-diary)
(let* ((col (current-column))
(hdmarker (org-get-at-bol 'org-hd-marker))
(buffer (marker-buffer hdmarker))
(pos (marker-position hdmarker))
(inhibit-read-only t)
newhead)
(org-with-remote-undo buffer
(with-current-buffer buffer
(widen)
(goto-char pos)
(org-fold-show-context 'agenda)
(org-priority force-direction)
(end-of-line 1)
(setq newhead (org-get-heading)))
(org-agenda-change-all-lines newhead hdmarker)
(org-move-to-column col))))