diff --git a/lisp/org.el b/lisp/org.el index a37371a6d..c5f0b7fc0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5921,7 +5921,7 @@ and subscripts." "Remove outline overlays that do not contain non-white stuff." (dolist (o (overlays-at pos)) (and (eq 'outline (overlay-get o 'invisible)) - (not (string-match "\\S-" (buffer-substring (overlay-start o) + (not (string-match-p "\\S-" (buffer-substring (overlay-start o) (overlay-end o)))) (delete-overlay o)))) @@ -6376,7 +6376,7 @@ Use `\\[org-edit-special]' to edit table.el tables")) (defun org-cycle-internal-global () "Do the global cycling action." ;; Hack to avoid display of messages for .org attachments in Gnus - (let ((ga (string-match "\\*fontification" (buffer-name)))) + (let ((ga (string-match-p "\\*fontification" (buffer-name)))) (cond ((and (eq last-command this-command) (eq org-cycle-global-status 'overview)) @@ -6457,8 +6457,7 @@ Use `\\[org-edit-special]' to edit table.el tables")) (goto-char eos) (outline-next-heading) (when (org-invisible-p) (org-flag-heading nil)))) - ((and (or (>= eol eos) - (not (string-match "\\S-" (buffer-substring eol eos)))) + ((and (>= eol eos) (or has-children (not (setq children-skipped org-cycle-skip-children-state-if-no-children))))