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

Merge branch 'maint'

This commit is contained in:
Bastien Guerry 2012-09-24 17:19:39 +02:00
commit 5036388ab9
2 changed files with 46 additions and 37 deletions

View file

@ -2201,7 +2201,7 @@ The following commands are available:
["Capture with cursor date" org-agenda-capture t] ["Capture with cursor date" org-agenda-capture t]
["Follow Mode" org-agenda-follow-mode ["Follow Mode" org-agenda-follow-mode
:style toggle :selected org-agenda-follow-mode :active t] :style toggle :selected org-agenda-follow-mode :active t]
; ["Tree to indirect frame" org-agenda-tree-to-indirect-buffer t] ;; ["Tree to indirect frame" org-agenda-tree-to-indirect-buffer t]
"--" "--"
("TODO" ("TODO"
["Cycle TODO" org-agenda-todo t] ["Cycle TODO" org-agenda-todo t]
@ -7503,7 +7503,7 @@ When called with a prefix argument, include all archive files as well."
(when (and (markerp m) (marker-buffer m)) (when (and (markerp m) (marker-buffer m))
(and org-agenda-follow-mode (and org-agenda-follow-mode
(if org-agenda-follow-indirect (if org-agenda-follow-indirect
(org-agenda-tree-to-indirect-buffer) (org-agenda-tree-to-indirect-buffer nil)
(org-agenda-show))) (org-agenda-show)))
(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))))))
@ -7888,22 +7888,23 @@ docstring of `org-agenda-show-1'."
(defun org-agenda-error () (defun org-agenda-error ()
(error "Command not allowed in this line")) (error "Command not allowed in this line"))
(defun org-agenda-tree-to-indirect-buffer () (defun org-agenda-tree-to-indirect-buffer (arg)
"Show the subtree corresponding to the current entry in an indirect buffer. "Show the subtree corresponding to the current entry in an indirect buffer.
This calls the command `org-tree-to-indirect-buffer' from the original This calls the command `org-tree-to-indirect-buffer' from the original buffer.
Org-mode buffer.
With numerical prefix arg ARG, go up to this level and then take that tree. With a numerical prefix ARG, go up to this level and then take that tree.
With a negative numeric ARG, go up by this number of levels.
With a \\[universal-argument] prefix, make a separate frame for this tree (i.e. don't With a \\[universal-argument] prefix, make a separate frame for this tree (i.e. don't
use the dedicated frame)." use the dedicated frame)."
(interactive) (interactive "P")
(if (and current-prefix-arg (listp current-prefix-arg)) (if current-prefix-arg
(org-agenda-do-tree-to-indirect-buffer) (org-agenda-do-tree-to-indirect-buffer arg)
(let ((agenda-buffer (buffer-name)) (let ((agenda-buffer (buffer-name))
(agenda-window (selected-window)) (agenda-window (selected-window))
(indirect-window (indirect-window
(and org-last-indirect-buffer (and org-last-indirect-buffer
(get-buffer-window org-last-indirect-buffer)))) (get-buffer-window org-last-indirect-buffer))))
(save-window-excursion (org-agenda-do-tree-to-indirect-buffer)) (save-window-excursion (org-agenda-do-tree-to-indirect-buffer arg))
(unless (or (eq org-indirect-buffer-display 'new-frame) (unless (or (eq org-indirect-buffer-display 'new-frame)
(eq org-indirect-buffer-display 'dedicated-frame)) (eq org-indirect-buffer-display 'dedicated-frame))
(unwind-protect (unwind-protect
@ -7915,7 +7916,7 @@ use the dedicated frame)."
(fit-window-to-buffer indirect-window))) (fit-window-to-buffer indirect-window)))
(select-window (get-buffer-window agenda-buffer))))) (select-window (get-buffer-window agenda-buffer)))))
(defun org-agenda-do-tree-to-indirect-buffer () (defun org-agenda-do-tree-to-indirect-buffer (arg)
"Same as `org-agenda-tree-to-indirect-buffer' without saving window." "Same as `org-agenda-tree-to-indirect-buffer' without saving window."
(org-agenda-check-no-diary) (org-agenda-check-no-diary)
(let* ((marker (or (org-get-at-bol 'org-marker) (let* ((marker (or (org-get-at-bol 'org-marker)
@ -7925,7 +7926,7 @@ use the dedicated frame)."
(with-current-buffer buffer (with-current-buffer buffer
(save-excursion (save-excursion
(goto-char pos) (goto-char pos)
(call-interactively 'org-tree-to-indirect-buffer))))) (funcall 'org-tree-to-indirect-buffer arg)))))
(defvar org-last-heading-marker (make-marker) (defvar org-last-heading-marker (make-marker)
"Marker pointing to the headline that last changed its TODO state "Marker pointing to the headline that last changed its TODO state

View file

@ -7116,8 +7116,9 @@ or nil."
(defun org-tree-to-indirect-buffer (&optional arg) (defun org-tree-to-indirect-buffer (&optional arg)
"Create indirect buffer and narrow it to current subtree. "Create indirect buffer and narrow it to current subtree.
With numerical prefix ARG, go up to this level and then take that tree. With a numerical prefix ARG, go up to this level and then take that tree.
If ARG is negative, go up that many levels. If ARG is negative, go up that many levels.
If `org-indirect-buffer-display' is not `new-frame', the command removes the If `org-indirect-buffer-display' is not `new-frame', the command removes the
indirect buffer previously made with this command, to avoid proliferation of indirect buffer previously made with this command, to avoid proliferation of
indirect buffers. However, when you call the command with a \ indirect buffers. However, when you call the command with a \
@ -7139,7 +7140,7 @@ frame is not changed."
(setq level (org-outline-level)) (setq level (org-outline-level))
(if (< arg 0) (setq arg (+ level arg))) (if (< arg 0) (setq arg (+ level arg)))
(while (> (setq level (org-outline-level)) arg) (while (> (setq level (org-outline-level)) arg)
(outline-up-heading 1 t))) (org-up-heading-safe)))
(setq beg (point) (setq beg (point)
heading (org-get-heading)) heading (org-get-heading))
(org-end-of-subtree t t) (org-end-of-subtree t t)
@ -19707,6 +19708,11 @@ See the individual commands for more information."
;;; Menu entries ;;; Menu entries
(defsubst org-in-subtree-not-table-p ()
"Are we in a subtree and not in a table?"
(and (not (org-before-first-heading-p))
(not (org-at-table-p))))
;; Define the Org-mode menus ;; Define the Org-mode menus
(easy-menu-define org-tbl-menu org-mode-map "Tbl menu" (easy-menu-define org-tbl-menu org-mode-map "Tbl menu"
'("Tbl" '("Tbl"
@ -19789,23 +19795,25 @@ See the individual commands for more information."
"--" "--"
["Jump" org-goto t]) ["Jump" org-goto t])
("Edit Structure" ("Edit Structure"
["Move Subtree Up" org-shiftmetaup (not (org-at-table-p))] ["Refile Subtree" org-refile (org-in-subtree-not-table-p)]
["Move Subtree Down" org-shiftmetadown (not (org-at-table-p))]
"--" "--"
["Copy Subtree" org-copy-special (not (org-at-table-p))] ["Move Subtree Up" org-shiftmetaup (org-in-subtree-not-table-p)]
["Cut Subtree" org-cut-special (not (org-at-table-p))] ["Move Subtree Down" org-shiftmetadown (org-in-subtree-not-table-p)]
"--"
["Copy Subtree" org-copy-special (org-in-subtree-not-table-p)]
["Cut Subtree" org-cut-special (org-in-subtree-not-table-p)]
["Paste Subtree" org-paste-special (not (org-at-table-p))] ["Paste Subtree" org-paste-special (not (org-at-table-p))]
"--" "--"
["Clone subtree, shift time" org-clone-subtree-with-time-shift t] ["Clone subtree, shift time" org-clone-subtree-with-time-shift t]
"--" "--"
["Copy visible text" org-copy-visible t] ["Copy visible text" org-copy-visible t]
"--" "--"
["Promote Heading" org-metaleft (not (org-at-table-p))] ["Promote Heading" org-metaleft (org-in-subtree-not-table-p)]
["Promote Subtree" org-shiftmetaleft (not (org-at-table-p))] ["Promote Subtree" org-shiftmetaleft (org-in-subtree-not-table-p)]
["Demote Heading" org-metaright (not (org-at-table-p))] ["Demote Heading" org-metaright (org-in-subtree-not-table-p)]
["Demote Subtree" org-shiftmetaright (not (org-at-table-p))] ["Demote Subtree" org-shiftmetaright (org-in-subtree-not-table-p)]
"--" "--"
["Sort Region/Children" org-sort (not (org-at-table-p))] ["Sort Region/Children" org-sort t]
"--" "--"
["Convert to odd levels" org-convert-to-odd-levels t] ["Convert to odd levels" org-convert-to-odd-levels t]
["Convert to odd/even levels" org-convert-to-oddeven-levels t]) ["Convert to odd/even levels" org-convert-to-oddeven-levels t])
@ -19816,11 +19824,11 @@ See the individual commands for more information."
["Footnote new/jump" org-footnote-action t] ["Footnote new/jump" org-footnote-action t]
["Footnote extra" (org-footnote-action t) :active t :keys "C-u C-c C-x f"]) ["Footnote extra" (org-footnote-action t) :active t :keys "C-u C-c C-x f"])
("Archive" ("Archive"
["Archive (default method)" org-archive-subtree-default t] ["Archive (default method)" org-archive-subtree-default (org-in-subtree-not-table-p)]
"--" "--"
["Move Subtree to Archive file" org-advertized-archive-subtree t] ["Move Subtree to Archive file" org-advertized-archive-subtree (org-in-subtree-not-table-p)]
["Toggle ARCHIVE tag" org-toggle-archive-tag t] ["Toggle ARCHIVE tag" org-toggle-archive-tag (org-in-subtree-not-table-p)]
["Move subtree to Archive sibling" org-archive-to-archive-sibling t] ["Move subtree to Archive sibling" org-archive-to-archive-sibling (org-in-subtree-not-table-p)]
) )
"--" "--"
("Hyperlinks" ("Hyperlinks"
@ -19871,23 +19879,23 @@ See the individual commands for more information."
["Go to the inbox of a feed..." org-feed-goto-inbox t] ["Go to the inbox of a feed..." org-feed-goto-inbox t]
["Customize feeds" (customize-variable 'org-feed-alist) t]) ["Customize feeds" (customize-variable 'org-feed-alist) t])
("TAGS and Properties" ("TAGS and Properties"
["Set Tags" org-set-tags-command t] ["Set Tags" org-set-tags-command (not (org-before-first-heading-p))]
["Change tag in region" org-change-tag-in-region (org-region-active-p)] ["Change tag in region" org-change-tag-in-region (org-region-active-p)]
"--" "--"
["Set property" org-set-property t] ["Set property" org-set-property (not (org-before-first-heading-p))]
["Column view of properties" org-columns t] ["Column view of properties" org-columns t]
["Insert Column View DBlock" org-insert-columns-dblock t]) ["Insert Column View DBlock" org-insert-columns-dblock t])
("Dates and Scheduling" ("Dates and Scheduling"
["Timestamp" org-time-stamp t] ["Timestamp" org-time-stamp (not (org-before-first-heading-p))]
["Timestamp (inactive)" org-time-stamp-inactive t] ["Timestamp (inactive)" org-time-stamp-inactive (not (org-before-first-heading-p))]
("Change Date" ("Change Date"
["1 Day Later" org-shiftright t] ["1 Day Later" org-shiftright (org-at-timestamp-p)]
["1 Day Earlier" org-shiftleft t] ["1 Day Earlier" org-shiftleft (org-at-timestamp-p)]
["1 ... Later" org-shiftup t] ["1 ... Later" org-shiftup (org-at-timestamp-p)]
["1 ... Earlier" org-shiftdown t]) ["1 ... Earlier" org-shiftdown (org-at-timestamp-p)])
["Compute Time Range" org-evaluate-time-range t] ["Compute Time Range" org-evaluate-time-range t]
["Schedule Item" org-schedule t] ["Schedule Item" org-schedule (not (org-before-first-heading-p))]
["Deadline" org-deadline t] ["Deadline" org-deadline (not (org-before-first-heading-p))]
"--" "--"
["Custom time format" org-toggle-time-stamp-overlays ["Custom time format" org-toggle-time-stamp-overlays
:style radio :selected org-display-custom-times] :style radio :selected org-display-custom-times]