From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Wed, 24 Aug 2011 18:45:58 +0200 Message-ID: From: Mathieu Lonjaret To: golang-nuts , Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: [9fans] get the last write offset in p9p acme Topicbox-Message-UUID: 14f70c3a-ead7-11e9-9d60-3106f5b1d025 Hi, After I've written a bunch of lines in an acme win ( with (w *Win) Write("body",...), I need to know (and save) the position of the last char I've written. I need that position because I want everything I write afterwards to be written there, and not appended. (constantly overwriting the last thing that was written). So the silly trick I've used to get that position is to first select the whole text and then get the address of the end of the selection, as the following: err = w.Addr("%s", "#0,") if err != nil { return err } _, pos, err := w.ReadAddr() Is there a more direct way? Thanks, Mathieu