From: David Kastrup <dak@gnu.org>
To: raman@users.sf.net
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: suggestion: function: buffer-bytes
Date: Sun, 01 Jul 2007 08:31:05 +0200 [thread overview]
Message-ID: <85ir941vpy.fsf@lola.goethe.zz> (raw)
In-Reply-To: <18055.5127.154758.705881@gargle.gargle.HOWL> (T. V. Raman's message of "Sat\, 30 Jun 2007 19\:40\:07 -0700")
"T. V. Raman" <raman@users.sf.net> writes:
> Stephane,
>
> Where I used this:
>
> Package g-client
> http://emacspeak.googlecode.com/svn/trunk/lisp/g-client
>
> I use curl to talk HTTP in that package -- uses Atom Publishing
> Protocol to talk to servers --
> and I needed the byte count for computing HTTP headers
> correctly.
> It does appear to work, but also because I do set buffer-encoding
> appropriately in those buffers where I am building up the HTTP
> message being posted.
You can't: buffers are always encoded in Emacs-mule (or its own
version of utf-8 in Emacs 23), or in unibyte (in which case the
position-byte function becomes rather pointless). I don't know what
you call "set buffer-encoding appropriately".
You can. presumably, talk in unibyte with your server and do the
encoding and decoding on the way to the buffer manually. In which
case you can just use buffer positions in characters as synonyms with
those in bytes.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next prev parent reply other threads:[~2007-07-01 6:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-01 0:18 suggestion: function: buffer-bytes T. V. Raman
2007-07-01 1:39 ` Stefan Monnier
2007-07-01 2:40 ` T. V. Raman
2007-07-01 6:31 ` David Kastrup [this message]
2007-07-01 8:22 ` Kenichi Handa
2007-07-01 12:39 ` Stefan Monnier
2007-07-02 0:48 ` Kenichi Handa
2007-07-01 17:47 ` T. V. Raman
2007-07-02 1:11 ` Kenichi Handa
2007-07-04 16:31 ` T. V. Raman
2007-07-05 14:42 ` Stefan Monnier
2007-07-09 2:44 ` Kenichi Handa
2007-07-01 19:34 ` Eli Zaretskii
2007-07-02 0:55 ` Kenichi Handa
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=85ir941vpy.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=raman@users.sf.net \
/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.