emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Simon Guest <simon.guest@tesujimath.org>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Implemented word count for subtrees
Date: Thu, 28 Apr 2011 09:34:35 +0100	[thread overview]
Message-ID: <87oc3qg4f8.fsf@ucl.ac.uk> (raw)
In-Reply-To: <86zknb9v1y.wl%simon.guest@tesujimath.org> (Simon Guest's message of "Thu, 28 Apr 2011 10:41:13 +1200")

Simon Guest <simon.guest@tesujimath.org> writes:

> At Wed, 27 Apr 2011 18:51:06 +0100,
> Eric S Fraga wrote:
>> This is quite nice.  Thanks!
>> 
>
>> I cannot help you with the mark problem; hopefully others can.
>> 
>> One suggestion, however: I wonder if you could introduce the word count
>> in a different way?  I do use my headings and having the dots and the
>> actual count inserted is not great (although easy work around:
>> org-wc-display and then undo immediately after looking at the
>> counts...).  Maybe you could automatically define a tag for each
>> heading, something like :wcNNNN:?  Of course, this won't be good for
>> anybody that wishes to export documents *with* tags...
>> 
>> Anyway, I've incorporated your code into my emacs configuration.  Thanks
>> again!
>
> Hi Eric,
>
> Thanks for your comments.
>
> The counts are not actually inserted as text in the file.  It's just
> an overlay, done with text properties like the clock durations (from
> where I stole the code).  They don't get saved in the file, and in
> fact as soon as you edit the buffer, they all disappear.  At least,
> they do for me.
>
> Does it do something different for you?  If so, it may be something to
> do with the file coding system that is letting them get saved.  Is
> your Org mode file a simple ASCII file, or something else?

Ah, I see that the counts do disappear as soon as I do anything.  My
confusion came about because as soon as I invoke =org-wc-display=, my
buffer becomes /modified/ which led me believe that the counts were
actually inserted into the document.    As they are not inserted, please
ignore my previous comments.

However, it would be helpful if the modification flag were not changed
by asking for the word count.  I don't know enough elisp to suggest what
to change but you should be able to add the text properties without
causing the buffer modification flag to change?  Column view, for
instance, doesn't do this.

Thanks again,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.209.g1a687)

  reply	other threads:[~2011-04-28  8:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-23  8:57 Implemented word count for subtrees Simon Guest
2011-04-27 17:51 ` Eric S Fraga
2011-04-27 22:41   ` Simon Guest
2011-04-28  8:34     ` Eric S Fraga [this message]
2011-04-28 22:05       ` Sub-tree word count v2 Simon Guest
2011-04-28 22:47         ` Samuel Wales
2011-04-29  1:57           ` v3, with support for narrowing Simon Guest
2011-04-29  2:41             ` Eric Abrahamsen
2011-04-29  3:35               ` Nick Dokos
2011-04-29  4:31                 ` Eric Abrahamsen
2011-04-29 14:56                   ` Nick Dokos
2011-04-29 21:42                     ` Simon Guest
2011-06-09  1:33                       ` v4, now with properties and inclusion tags Eric Abrahamsen
2011-05-14 22:48             ` v3, with support for narrowing Samuel Wales
2011-05-15  4:25               ` Simon Guest
2011-04-28 23:16         ` Sub-tree word count v2 Eric S Fraga
2011-04-28  7:53 ` Implemented word count for subtrees Sébastien Vauban
2011-04-28  8:35   ` Eric S Fraga
2011-05-02 12:19   ` Daniel Clemente

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oc3qg4f8.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=simon.guest@tesujimath.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).