[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: request for review: Doing direct file I/O in Emacs Lisp
From: |
Richard Stallman |
Subject: |
Re: request for review: Doing direct file I/O in Emacs Lisp |
Date: |
Tue, 11 May 2004 08:22:55 -0400 |
FWIW ? while working on an RTF reader I found it very annoying that I
have to insert the entire RTF file into a buffer, then tokenize it
character-wise, then delete that parts of the buffer that are
recognized as markup, applying text properties to the remaining text
as appropriate.
Being able to fetch characters from a stream, and deal with them
through several layers of abstraction, and then inserting the actual
text with properties into a buffer would be much nicer and cleaner.
I expect this would be much slower, because you'd need to have Lisp
code that handles characters one by one. Parsing them in the buffer
is much faster, when you can use one call to skip-chars-forward and
one call to buffer-substring to process a whole token at once, without
ever needing a Lisp-level loop to process the token's characters one
by one.
Also, character set detection works more reliably on the entire file.
Re: request for review: Doing direct file I/O in Emacs Lisp, Richard Stallman, 2004/05/10
- Re: request for review: Doing direct file I/O in Emacs Lisp, John Wiegley, 2004/05/11
- Re: request for review: Doing direct file I/O in Emacs Lisp, Richard Stallman, 2004/05/12
- Re: request for review: Doing direct file I/O in Emacs Lisp, Kai Grossjohann, 2004/05/13
- Re: request for review: Doing direct file I/O in Emacs Lisp, Richard Stallman, 2004/05/14
- Re: request for review: Doing direct file I/O in Emacs Lisp, Kai Grossjohann, 2004/05/14
- Re: request for review: Doing direct file I/O in Emacs Lisp, Richard Stallman, 2004/05/15
- Re: request for review: Doing direct file I/O in Emacs Lisp, Kai Grossjohann, 2004/05/15
- Re: request for review: Doing direct file I/O in Emacs Lisp, Richard Stallman, 2004/05/16
Re: request for review: Doing direct file I/O in Emacs Lisp, John Wiegley, 2004/05/14