0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-22 13:10:42 +00:00

Merge branch 'maint'

This commit is contained in:
Bastien Guerry 2012-09-28 08:29:47 +02:00
commit acca5ddbae
2 changed files with 26 additions and 16 deletions

View file

@ -2103,8 +2103,8 @@ The following commands are available:
(org-defkey org-agenda-mode-map "\C-c\C-a" 'org-attach) (org-defkey org-agenda-mode-map "\C-c\C-a" 'org-attach)
(org-defkey org-agenda-mode-map "\C-c\C-n" 'org-agenda-next-date-line) (org-defkey org-agenda-mode-map "\C-c\C-n" 'org-agenda-next-date-line)
(org-defkey org-agenda-mode-map "\C-c\C-p" 'org-agenda-previous-date-line) (org-defkey org-agenda-mode-map "\C-c\C-p" 'org-agenda-previous-date-line)
(org-defkey org-agenda-mode-map "\C-c," 'org-agenda-priority)
(org-defkey org-agenda-mode-map "," 'org-agenda-priority) (org-defkey org-agenda-mode-map "," 'org-agenda-priority)
(org-defkey org-agenda-mode-map "\C-c," 'org-agenda-show-priority)
(org-defkey org-agenda-mode-map "i" 'org-agenda-diary-entry) (org-defkey org-agenda-mode-map "i" 'org-agenda-diary-entry)
(org-defkey org-agenda-mode-map "c" 'org-agenda-goto-calendar) (org-defkey org-agenda-mode-map "c" 'org-agenda-goto-calendar)
(org-defkey org-agenda-mode-map "C" 'org-agenda-convert-date) (org-defkey org-agenda-mode-map "C" 'org-agenda-convert-date)
@ -2270,7 +2270,7 @@ The following commands are available:
["Set Priority" org-agenda-priority t] ["Set Priority" org-agenda-priority t]
["Increase Priority" org-agenda-priority-up t] ["Increase Priority" org-agenda-priority-up t]
["Decrease Priority" org-agenda-priority-down t] ["Decrease Priority" org-agenda-priority-down t]
["Show Priority" org-agenda-show-priority t]) ["Show Priority" org-show-priority t])
("Calendar/Diary" ("Calendar/Diary"
["New Diary Entry" org-agenda-diary-entry (org-agenda-check-type nil 'agenda 'timeline)] ["New Diary Entry" org-agenda-diary-entry (org-agenda-check-type nil 'agenda 'timeline)]
["Goto Calendar" org-agenda-goto-calendar (org-agenda-check-type nil 'agenda 'timeline)] ["Goto Calendar" org-agenda-goto-calendar (org-agenda-check-type nil 'agenda 'timeline)]
@ -7535,14 +7535,6 @@ When called with a prefix argument, include all archive files as well."
(and org-agenda-show-outline-path (and org-agenda-show-outline-path
(org-with-point-at m (org-display-outline-path t)))))) (org-with-point-at m (org-display-outline-path t))))))
(defun org-agenda-show-priority ()
"Show the priority of the current item.
This priority is composed of the main priority given with the [#A] cookies,
and by additional input from the age of a schedules or deadline entry."
(interactive)
(let* ((pri (org-get-at-bol 'priority)))
(message "Priority is %d" (if pri pri -1000))))
(defun org-agenda-show-tags () (defun org-agenda-show-tags ()
"Show the tags applicable to the current item." "Show the tags applicable to the current item."
(interactive) (interactive)
@ -8132,11 +8124,12 @@ If FORCE-TAGS is non nil, the car of it returns the new tags."
(interactive) (interactive)
(org-agenda-priority 'down)) (org-agenda-priority 'down))
(defun org-agenda-priority (&optional force-direction) (defun org-agenda-priority (&optional force-direction show)
"Set the priority of line at point, also in Org-mode file. "Set the priority of line at point, also in Org-mode file.
This changes the line at point, all other lines in the agenda referring to 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-mode file." the same tree node, and the headline of the tree node in the Org-mode file."
(interactive) (interactive "P")
(if (equal force-direction '(4)) (setq show t))
(unless org-enable-priority-commands (unless org-enable-priority-commands
(error "Priority commands are disabled")) (error "Priority commands are disabled"))
(org-agenda-check-no-diary) (org-agenda-check-no-diary)
@ -8155,7 +8148,7 @@ the same tree node, and the headline of the tree node in the Org-mode file."
(save-excursion (save-excursion
(and (outline-next-heading) (and (outline-next-heading)
(org-flag-heading nil))) ; show the next heading (org-flag-heading nil))) ; show the next heading
(funcall 'org-priority force-direction) (funcall 'org-priority force-direction show)
(end-of-line 1) (end-of-line 1)
(setq newhead (org-get-heading))) (setq newhead (org-get-heading)))
(org-agenda-change-all-lines newhead hdmarker) (org-agenda-change-all-lines newhead hdmarker)

View file

@ -13061,10 +13061,12 @@ from the `before-change-functions' in the current buffer."
(interactive) (interactive)
(org-priority 'down)) (org-priority 'down))
(defun org-priority (&optional action) (defun org-priority (&optional action show)
"Change the priority of an item. "Change the priority of an item.
ACTION can be `set', `up', `down', or a character." ACTION can be `set', `up', `down', or a character."
(interactive) (interactive "P")
(if (equal action '(4))
(org-show-priority)
(unless org-enable-priority-commands (unless org-enable-priority-commands
(error "Priority commands are disabled")) (error "Priority commands are disabled"))
(setq action (or action 'set)) (setq action (or action 'set))
@ -13141,7 +13143,21 @@ ACTION can be `set', `up', `down', or a character."
(org-preserve-lc (org-set-tags nil 'align))) (org-preserve-lc (org-set-tags nil 'align)))
(if remove (if remove
(message "Priority removed") (message "Priority removed")
(message "Priority of current item set to %s" news)))) (message "Priority of current item set to %s" news)))))
(defun org-show-priority ()
"Show the priority of the current item.
This priority is composed of the main priority given with the [#A] cookies,
and by additional input from the age of a schedules or deadline entry."
(interactive)
(let ((pri (if (eq major-mode 'org-agenda-mode)
(org-get-at-bol 'priority)
(save-excursion
(save-match-data
(beginning-of-line)
(and (looking-at org-heading-regexp)
(org-get-priority (match-string 0))))))))
(message "Priority is %d" (if pri pri -1000))))
(defun org-get-priority (s) (defun org-get-priority (s)
"Find priority cookie and return priority." "Find priority cookie and return priority."
@ -18308,6 +18324,7 @@ BEG and END default to the buffer boundaries."
("O" . org-clock-out) ("O" . org-clock-out)
("Meta Data Editing") ("Meta Data Editing")
("t" . org-todo) ("t" . org-todo)
("," . (org-priority))
("0" . (org-priority ?\ )) ("0" . (org-priority ?\ ))
("1" . (org-priority ?A)) ("1" . (org-priority ?A))
("2" . (org-priority ?B)) ("2" . (org-priority ?B))