emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IRC client for Emacs


From: Noah Friedman
Subject: Re: IRC client for Emacs
Date: Mon, 26 Aug 2002 11:29:12 -0700 (PDT)

>    An MO file has its own internal hash table which is used to relate an
>    original string to the file position.  However, the hashing algorithm is
>    dependent on gettext internals (See "(gettext)MO Files" for details).
>
>This suggests another approach: keep the MO file as text in a buffer,
>and write Lisp code to do the lookup using the MO file hash table.
>The function to do a lookup could recreate the buffer (reading the
>file into it) if the buffer does not exist.  This way, we could delete
>these buffers occasionally (such as, when they have not been
>used for 10 minutes), and they would be recreated when needed.
>The buffer would serve as a cache for the file.
>
>What do you think?

I think this might be ok, but I'm uncertain whether implementing the hash
function in elisp is worth the computation time vs. just using C
hashtables, or whether it's better to memoize results parsed out of the MO
file into a hashtable for all future references.  I'd like to try it and
see.  Are there any existing tools for extracting strings from elisp source
to help build MO files?  I'm not very familiar with the format.

Regardless, I do like the idea of using gettext's API; the implementation
details of gettext.el are a secondary issue.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]