Dear helpers, I would like to get a counting of the first level items in a buffer (or even better in a region). Since I‘m not a programmer I tried this, which doesn‘t work:
(defun org-items-counting () "Print a message with the counting of the first level outline items in the current buffer" (interactive) (save-excursion (goto-char (point-min)) (message "Counting of first level outline items: %d" (count-matches "\n* ")))) Probably there is a very much better approaching to this problem. Could please somebody help me? Thanks in advance, Martin