From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Drawing to cairo context from within emacs module? Date: Fri, 06 Dec 2019 16:55:26 +0200 Message-ID: <837e39h5b5.fsf@gnu.org> References: <87eexlb1d4.fsf@randomsample> <83d0d2izdu.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="98293"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Eivind Fonn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 06 18:55:45 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1idHpP-000PK4-3I for ged-emacs-devel@m.gmane.org; Fri, 06 Dec 2019 18:55:43 +0100 Original-Received: from localhost ([::1]:42636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idHpN-0007Du-2A for ged-emacs-devel@m.gmane.org; Fri, 06 Dec 2019 12:55:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48767) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idGCx-0005eg-Ao for emacs-devel@gnu.org; Fri, 06 Dec 2019 11:11:56 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1idGCw-0000B3-BR; Fri, 06 Dec 2019 11:11:54 -0500 Original-Received: from [176.228.60.248] (port=3173 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1idF0x-0000P1-S9; Fri, 06 Dec 2019 09:55:29 -0500 In-reply-to: (message from Eivind Fonn on Fri, 6 Dec 2019 11:20:01 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243185 Archived-At: [Please keep the list on the CC, so that others could see this discussion.] > From: Eivind Fonn > Date: Fri, 6 Dec 2019 11:20:01 +0100 > > Like Stephen I'm trying to do 'live' parsing. I don't think I understand what "live parsing" is, and Stephen said he would up not using any direct access to buffer text. > Boxing and unboxing (and copying) Emacs strings over and over isn't > impossible, but it feels like unfettered access to the buffer should > be in scope for a text editor that has dynamic module support. Modules were designed to be able to communicate with Emacs via Lisp objects, they don't get direct access to the internals of those objects. > If the gap can move at will that is unfortunate, but I'm not after > a very long-term view, so I was hoping something might anyway > be possible. > > I need the gap because the buffer pointer isn't very useful on its > own without that information. You should also be aware of the fact that the internal representation of buffer text is a superset of UTF-8, so direct access to it will also need to copy a lot of code that Emacs uses internally to present characters to Lisp programs. And I still don't think I understand the rationale. How about if you explain why modules should be any different from a Lisp program in this respect?