|
@@ -6210,34 +6210,36 @@ in special contexts.
|
|
|
|
|
|
(defun org-cycle-internal-global ()
|
|
(defun org-cycle-internal-global ()
|
|
"Do the global cycling action."
|
|
"Do the global cycling action."
|
|
- (cond
|
|
|
|
- ((and (eq last-command this-command)
|
|
|
|
- (eq org-cycle-global-status 'overview))
|
|
|
|
- ;; We just created the overview - now do table of contents
|
|
|
|
- ;; This can be slow in very large buffers, so indicate action
|
|
|
|
- (run-hook-with-args 'org-pre-cycle-hook 'contents)
|
|
|
|
- (message "CONTENTS...")
|
|
|
|
- (org-content)
|
|
|
|
- (message "CONTENTS...done")
|
|
|
|
- (setq org-cycle-global-status 'contents)
|
|
|
|
- (run-hook-with-args 'org-cycle-hook 'contents))
|
|
|
|
-
|
|
|
|
- ((and (eq last-command this-command)
|
|
|
|
- (eq org-cycle-global-status 'contents))
|
|
|
|
- ;; We just showed the table of contents - now show everything
|
|
|
|
- (run-hook-with-args 'org-pre-cycle-hook 'all)
|
|
|
|
- (show-all)
|
|
|
|
- (message "SHOW ALL")
|
|
|
|
- (setq org-cycle-global-status 'all)
|
|
|
|
- (run-hook-with-args 'org-cycle-hook 'all))
|
|
|
|
|
|
+ ;; Hack to avoid display of messages for .org attachments in Gnus
|
|
|
|
+ (let ((ga (string-match "\\*fontification" (buffer-name))))
|
|
|
|
+ (cond
|
|
|
|
+ ((and (eq last-command this-command)
|
|
|
|
+ (eq org-cycle-global-status 'overview))
|
|
|
|
+ ;; We just created the overview - now do table of contents
|
|
|
|
+ ;; This can be slow in very large buffers, so indicate action
|
|
|
|
+ (run-hook-with-args 'org-pre-cycle-hook 'contents)
|
|
|
|
+ (unless ga (message "CONTENTS..."))
|
|
|
|
+ (org-content)
|
|
|
|
+ (unless ga (message "CONTENTS...done"))
|
|
|
|
+ (setq org-cycle-global-status 'contents)
|
|
|
|
+ (run-hook-with-args 'org-cycle-hook 'contents))
|
|
|
|
+
|
|
|
|
+ ((and (eq last-command this-command)
|
|
|
|
+ (eq org-cycle-global-status 'contents))
|
|
|
|
+ ;; We just showed the table of contents - now show everything
|
|
|
|
+ (run-hook-with-args 'org-pre-cycle-hook 'all)
|
|
|
|
+ (show-all)
|
|
|
|
+ (unless ga (message "SHOW ALL"))
|
|
|
|
+ (setq org-cycle-global-status 'all)
|
|
|
|
+ (run-hook-with-args 'org-cycle-hook 'all))
|
|
|
|
|
|
- (t
|
|
|
|
- ;; Default action: go to overview
|
|
|
|
- (run-hook-with-args 'org-pre-cycle-hook 'overview)
|
|
|
|
- (org-overview)
|
|
|
|
- (message "OVERVIEW")
|
|
|
|
- (setq org-cycle-global-status 'overview)
|
|
|
|
- (run-hook-with-args 'org-cycle-hook 'overview))))
|
|
|
|
|
|
+ (t
|
|
|
|
+ ;; Default action: go to overview
|
|
|
|
+ (run-hook-with-args 'org-pre-cycle-hook 'overview)
|
|
|
|
+ (org-overview)
|
|
|
|
+ (unless ga (message "OVERVIEW"))
|
|
|
|
+ (setq org-cycle-global-status 'overview)
|
|
|
|
+ (run-hook-with-args 'org-cycle-hook 'overview)))))
|
|
|
|
|
|
(defun org-cycle-internal-local ()
|
|
(defun org-cycle-internal-local ()
|
|
"Do the local cycling action."
|
|
"Do the local cycling action."
|