diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 976954650..5fe322b52 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -31,7 +31,6 @@ ;;; Code: -(declare-function org-key "org" (key)) (declare-function org-defkey "org" (keymap key def)) @@ -743,6 +742,11 @@ program is needed for, so that the error message can be more informative." "Display the given MESSAGE as a warning." (display-warning 'org message :warning)) +(defun org-unlogged-message (&rest args) + "Display a message, but avoid logging it in the *Messages* buffer." + (let ((message-log-max nil)) + (apply #'message args))) + (defun org-let (list &rest body) (eval (cons 'let (cons list body)))) (put 'org-let 'lisp-indent-function 1) diff --git a/lisp/org.el b/lisp/org.el index a5c1182da..d9004988b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6592,10 +6592,18 @@ and subscripts." (defvar org-inlinetask-min-level) -(defun org-unlogged-message (&rest args) - "Display a message, but avoid logging it in the *Messages* buffer." - (let ((message-log-max nil)) - (apply 'message args))) +(defun org-show-all (&optional types) + "Show all contents in the visible part of the buffer. +By default, the function expands headings, blocks and drawers. +When optional argument TYPE is a list of symbols among `blocks', +`drawers' and `headings', to only expand one specific type." + (dolist (type (or types '(blocks drawers headings))) + (org-flag-region (point-min) (point-max) nil + (pcase type + (`blocks 'org-hide-block) + (`drawers 'org-hide-drawer) + (`headings 'outline) + (_ (error "Invalid type: %S" type)))))) ;;;###autoload (defun org-cycle (&optional arg)