diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-12-10 23:37:59 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-12-10 23:37:59 +0100 |
commit | 6f89177ee6f7fb5f52f10a54ae10846c803366c5 (patch) | |
tree | 4a2e87211a993d556f351d619c060b60ed2e5a24 | |
parent | fc5abc2d55fc357a0055d22c569c8b57e3d574df (diff) | |
download | org-mode-6f89177ee6f7fb5f52f10a54ae10846c803366c5.tar.gz |
Move `org-unlogged-message' to "org-macs.el"
* lisp/org.el (org-unlogged-message): Move function to...
* lisp/org-macs.el: ... here.
-rw-r--r-- | lisp/org-macs.el | 6 | ||||
-rw-r--r-- | lisp/org.el | 16 |
2 files changed, 17 insertions, 5 deletions
diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 9769546..5fe322b 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 a5c1182..d900498 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) |