mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-25 23:32:52 +00:00
org.el: Prevent the display of messages when cycling from with a Gnus article buffer.
* org.el (org-cycle-internal-global): Prevent the display of messages when cycling from with a Gnus article buffer.
This commit is contained in:
parent
36cc7b4983
commit
fb31480013
54
lisp/org.el
54
lisp/org.el
|
@ -6210,34 +6210,36 @@ in special contexts.
|
|||
|
||||
(defun org-cycle-internal-global ()
|
||||
"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))
|
||||
;; 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)
|
||||
(message "SHOW ALL")
|
||||
(setq org-cycle-global-status 'all)
|
||||
(run-hook-with-args 'org-cycle-hook 'all))
|
||||
((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 ()
|
||||
"Do the local cycling action."
|
||||
|
|
Loading…
Reference in a new issue