From: Thien-Thi Nguyen <ttn@glug.org>
Cc: emacs-devel@gnu.org
Subject: Re: where to put eol kludge
Date: 16 May 2003 06:20:10 -0400 [thread overview]
Message-ID: <jk1xyzgplx.fsf@glug.org> (raw)
In-Reply-To: Kenichi Handa's message of "Fri, 16 May 2003 08:49:52 +0900 (JST)"
Kenichi Handa <handa@m17n.org> writes:
It's e_write, not emacs_write, that calls encode-coding.
Anyway, I agree that emacs_write is the better place for
such a job.
oops, my bad.
in any case, it seems to me the criteria for the best place for the
kludge would be where chunking of the write occurs, since the kludge has
the re-chunking nature. which indicates `e_write' after all. in other
words, something like:
result = encode_coding (...);
/* kludge to adjust end of write buffer by way of
adjusting coding->produced goes here */
if (coding->produced)
...
this way, emacs_write can remain dumb. otherwise, to do the kludge at
emacs_write level requires extra information to be passed in, saying
whether or not "this is the last write" and information to be passed
out, saying "here are the leftover unwritten bytes which you can use in
the next call since this call was not the last write".
if this kludge had more general use, i might even suggest moving it into
encode_coding for efficiency (i.e., rather than throw away the tail of
the encoding after eol, add a flag to stop encoding at the "last" eol).
but on second thought probably determining last eol reliably would not
preclude processing post-last-eol anyway...
thi
next prev parent reply other threads:[~2003-05-16 10:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-15 23:05 where to put eol kludge Thien-Thi Nguyen
2003-05-15 23:49 ` Kenichi Handa
2003-05-16 10:20 ` Thien-Thi Nguyen [this message]
2003-05-16 11:07 ` Kenichi Handa
2003-05-16 12:14 ` Thien-Thi Nguyen
2003-05-16 13:06 ` Kenichi Handa
2003-05-19 14:50 ` Thien-Thi Nguyen
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=jk1xyzgplx.fsf@glug.org \
--to=ttn@glug.org \
--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.