[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Byte offset from point
From: |
senny |
Subject: |
Re: Byte offset from point |
Date: |
Wed, 12 Aug 2009 12:06:26 -0700 (PDT) |
User-agent: |
G2/1.0 |
On 12 Aug., 20:57, Teemu Likonen <tliko...@iki.fi> wrote:
> On 2009-08-12 11:44 (-0700), senny wrote:
>
> > I am looking for a way to get the exact byte-offset from the cursor
> > position. I need this value to call an external service. Is there a
> > way to achieve this in emacs?
>
> Perhaps this:
>
> (position-bytes (point))
I tried that but it gave me incorrect results when dealing with
newlines on windows. The lisp function counted them as 1 byte but the
service i was calling counted them as 2 bytes.