diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw-org.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/acdw-org.el b/lisp/acdw-org.el index a9c0a8c..41073a9 100644 --- a/lisp/acdw-org.el +++ b/lisp/acdw-org.el | |||
@@ -246,6 +246,9 @@ the deletion might narrow the column." | |||
246 | (defun acdw-org/count-words (start end) | 246 | (defun acdw-org/count-words (start end) |
247 | "Count words between START and END, respecting `org-mode' conventions." | 247 | "Count words between START and END, respecting `org-mode' conventions." |
248 | (interactive (list nil nil)) | 248 | (interactive (list nil nil)) |
249 | (require 'cl-lib) | ||
250 | (require 'ox) | ||
251 | (message "Counting words...") | ||
249 | (cond ((not (called-interactively-p 'any)) | 252 | (cond ((not (called-interactively-p 'any)) |
250 | (let ((words 0)) | 253 | (let ((words 0)) |
251 | (save-excursion | 254 | (save-excursion |
@@ -285,9 +288,9 @@ the deletion might narrow the column." | |||
285 | nil) | 288 | nil) |
286 | ;; Ignore sections tagged :no-export | 289 | ;; Ignore sections tagged :no-export |
287 | ((assoc :tags contexts) | 290 | ((assoc :tags contexts) |
288 | (if (intersection (org-get-tags-at) | 291 | (if (cl-intersection (org-get-tags-at) |
289 | org-export-exclude-tags | 292 | org-export-exclude-tags |
290 | :test 'equal) | 293 | :test 'equal) |
291 | (org-forward-same-level 1) | 294 | (org-forward-same-level 1) |
292 | nil)) | 295 | nil)) |
293 | ;; else... count the word | 296 | ;; else... count the word |