[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Get counting of items
From: |
Martin Gross |
Subject: |
[O] Get counting of items |
Date: |
Tue, 1 Apr 2014 10:20:29 +0200 |
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
- [O] Get counting of items,
Martin Gross <=