From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Count words under subtrees
Date: Tue, 27 Sep 2016 20:52:08 +0200 [thread overview]
Message-ID: <877f9xfa5j.fsf@gmail.com> (raw)
In-Reply-To: b0b8a31b-d814-0e30-7e20-5b31b7c41868@gmail.com
Giacomo M <jackjackk@gmail.com> writes:
Hi,
> right now I manually =er/expand-region= (from expand-region.el) until
> I select a subtree, and then =count-words-region= to get number of
> words for the subtree. I was wondering whether anybody already coded
> some lisp to programmatically have this count, ideally one count per
> TOC entry (and perhaps excluding headline words in the count).
AFAIK there are two libraries that show the "weight" of a folded subtree
based on hidden lines as little headline cookies - if that helps. Not
sure about their state, they might just work:
,----
| https://github.com/tj64/org-hlc
| https://github.com/pinard/org-weights
`----
and org-hlc is build into outshine, so if you open (e.g.) an elisp file
that is structured with outshine headers (= outcommented org-headers),
and have outshine minor-mode enabled, you can use
,----[ C-h f outshine-toggle-hidden-lines-cookies RET ]
| outshine-toggle-hidden-lines-cookies is an interactive Lisp function
| in `outshine.el'.
|
| (outshine-toggle-hidden-lines-cookies)
|
| Toggles status of hidden-lines cookies between shown and hidden.
`----
and will see something like this, i.e. folded headers with 'hidden lines
cookies':
,----
| 55:;; * Prerequisites
| 56:;; ** Start Message and Start Time [#8]
| 65:;; ** Setup Parts :mytag: [#79]
| 145:;; ** Environment [#92]
| 238:;; ** Loading Emacs Lisp Libraries
| 239:;; *** Features [#64]
| 304:;; *** Library Search [#144]
| 449:;; *** Package Manager [#39]
| 489:;; *** Autoloads [#5]
| 495:;; ** Debugging [#8]
| 504:;; * [Screen Input Keys Cmd Enter Exit] [#1]
| 506:;; ** 1 (info "(emacs)Screen") [#3]
| 510:;; *** 1.1 (info "(emacs)Point")
| 511:;; *** 1.2 (info "(emacs)Echo Area") [#4]
| 516:;; *** 1.3 (info "(emacs)Mode Line") [#4]
| 521:;; *** 1.4 (info "(emacs)Menu Bar") [#2]
`----
--
cheers,
Thorsten
next prev parent reply other threads:[~2016-09-27 18:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-27 9:01 Count words under subtrees Giacomo M
2016-09-27 18:52 ` Thorsten Jolitz [this message]
2016-09-28 22:54 ` Adam Porter
2016-09-28 23:05 ` Adam Porter
2016-09-28 23:22 ` Adam Porter
[not found] <13cda52050fc411c8b0b7a74bd60f5c0@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-09-27 9:15 ` Eric S Fraga
2016-09-27 9:18 ` Eric S Fraga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877f9xfa5j.fsf@gmail.com \
--to=tjolitz@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.