From: Oliver Scholz <epameinondas@gmx.de>
Cc: emacs-devel@gnu.org
Subject: Re: request for review: Doing direct file I/O in Emacs Lisp
Date: Mon, 10 May 2004 19:46:32 +0200 [thread overview]
Message-ID: <uoeowcgzr.fsf@ID-87814.user.dfncis.de> (raw)
In-Reply-To: <87vfj4uzzs.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "10 May 2004 10:19:19 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> The following patch implements a file-handle interface for Emacs Lisp,
>> which allows files to be directly opened and read/written to without
>> an intervening buffer. Eshell can now use this, for example, to
>> greatly speed up output redirection (by several orders of magnitude).
>
> Doesn't seem like a bad idea, but I'd rather postpone it to
> after-the-release.
[...]
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.
Thus I have a low-level feature request (for after-the-release):
provide an interface to the file visiting routines such that Lisp code
which is meant to deal with formatted text can handle the file’s
content as a character stream (of course this makes sense only if it
is efficient).
For example, add an optional CHARSTREAMP element to the elements of
‘format-alist’. If it is non-nil, FROM-FN and TO-FN get a file handler
as additional argument and take the full responsibility for writing to
the file/inserting the file’s content into the buffer.
Oliver
--
Oliver Scholz 22 Floréal an 212 de la Révolution
Taunusstr. 25 Liberté, Egalité, Fraternité!
60329 Frankfurt a. M. http://www.jungdemokratenhessen.de
Tel. (069) 97 40 99 42 http://www.jdjl.org
next prev parent reply other threads:[~2004-05-10 17:46 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-10 5:59 request for review: Doing direct file I/O in Emacs Lisp John Wiegley
2004-05-10 6:52 ` Kim F. Storm
2004-05-10 8:27 ` David Kastrup
2004-05-10 14:21 ` Stefan Monnier
2004-05-10 15:59 ` David Kastrup
2004-05-10 16:36 ` Stefan Monnier
2004-05-10 17:00 ` David Kastrup
2004-05-10 17:22 ` Stefan Monnier
2004-05-11 9:23 ` John Wiegley
2004-05-11 10:22 ` David Kastrup
2004-05-10 9:38 ` Andreas Schwab
2004-05-10 11:29 ` Eli Zaretskii
2004-05-10 11:23 ` Andreas Schwab
2004-05-10 15:04 ` Eli Zaretskii
2004-05-10 14:19 ` Stefan Monnier
2004-05-10 17:46 ` Oliver Scholz [this message]
2004-05-10 18:21 ` Stefan Monnier
2004-05-10 22:40 ` Oliver Scholz
2004-05-11 12:22 ` Richard Stallman
2004-05-10 17:54 ` Richard Stallman
2004-05-11 9:20 ` John Wiegley
2004-05-12 19:41 ` Richard Stallman
2004-05-13 7:59 ` Kai Grossjohann
2004-05-14 9:21 ` Richard Stallman
2004-05-14 10:42 ` Kai Grossjohann
2004-05-15 8:53 ` Richard Stallman
2004-05-15 16:27 ` Kai Grossjohann
2004-05-16 13:20 ` Richard Stallman
2004-05-14 21:43 ` John Wiegley
2004-05-15 18:33 ` Richard Stallman
2004-05-15 21:36 ` John Wiegley
2004-05-15 22:13 ` David Kastrup
2004-05-16 6:41 ` Eli Zaretskii
2004-05-16 17:46 ` David Kastrup
2004-05-17 11:04 ` Richard Stallman
2004-05-13 22:50 ` John Wiegley
2004-05-14 21:02 ` Richard Stallman
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=uoeowcgzr.fsf@ID-87814.user.dfncis.de \
--to=epameinondas@gmx.de \
--cc=emacs-devel@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.