Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Elilif/org-count-words
Count words in org-mode.
https://github.com/Elilif/org-count-words
Last synced: 4 months ago
JSON representation
Count words in org-mode.
- Host: GitHub
- URL: https://github.com/Elilif/org-count-words
- Owner: Elilif
- License: gpl-3.0
- Created: 2024-03-15T13:59:41.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-20T23:21:08.000Z (8 months ago)
- Last Synced: 2024-08-02T18:40:28.376Z (7 months ago)
- Language: Emacs Lisp
- Homepage:
- Size: 44.9 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+TITLE: org-count-words
More precise words-counting in org-mode.In Org-mode, there are many elements that we do not want to include in word
count, such as code blocks, options, and drawers. The usual practice is to use
regular expressions to exclude them, but there are too many syntaxes in
org-mode, making it difficult to fully include them with regular expressions.
This package takes advange of the org-element API to filter the elements we
want, count their words, and display the result on the modeline.* Commands
- =org-count-words-buffer=
Count words in current org buffer. Like =count-words= but ingore words in some
elements like src-block.- =org-count-words-region=
Count the number of words in the region.
If called interactively, print a message reporting the number of
words in the region (whether or not the region is active); with
prefix ARG, report for the entire buffer rather than the region.If called from Lisp, return the number of words between positions
START and END.- =org-count-words-subtree=
Count words in current subtree.
If called from Lisp, return the number of words.
- =org-count-words-mode=
Minor mode for displaying word count in the modeline.
* Configuration
- =org-count-words-elemnts=
List of element types that should be included.See =org-element-map for details.
- =org-count-words-functions=
Defualt function to count words.This function should take two argments(beg and end) and return a number.
- =org-count-words-no-recursive-elemnts=
List of element types that should be exlucded in recursive map.See =org-element-map= for details.
- =org-count-words-element-functions=Alist of org elelemnt type and word-counting funtion.
Each function will be called with one arguemnt: the selected element.
- =org-count-words-buffer-idle-delay=
Seconds to wait before updating the word counts in the current buffer.
- =org-count-words-region-idle-delay=
Seconds to wait before updating the word counts in the selected region.
- =org-count-words-mode-line=
Mode line construct for displaying current word count.
- =org-count-words-mode-line-format=
The mode-line format for displaying current word count.
This value should be a =cons= whose =car= is a format string to display the
word count of the current buffer, and whose =cdr= is a format string to
display the word count of the selected region and the current buffer.