From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: internal data structure Date: Sat, 20 May 2017 16:27:42 +0200 Message-ID: <20170520142742.GA14705@tuxteam.de> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1495290509 12855 195.159.176.226 (20 May 2017 14:28:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 20 May 2017 14:28:29 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 20 16:28:24 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dC5Ml-0003E2-PB for geh-help-gnu-emacs@m.gmane.org; Sat, 20 May 2017 16:28:23 +0200 Original-Received: from localhost ([::1]:34440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dC5Mr-000390-8t for geh-help-gnu-emacs@m.gmane.org; Sat, 20 May 2017 10:28:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dC5MK-00038f-3X for help-gnu-emacs@gnu.org; Sat, 20 May 2017 10:27:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dC5MG-0000Rs-Vf for help-gnu-emacs@gnu.org; Sat, 20 May 2017 10:27:56 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:49706 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dC5MG-0000H4-PE for help-gnu-emacs@gnu.org; Sat, 20 May 2017 10:27:52 -0400 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1dC5M6-0003zV-Dv for help-gnu-emacs@gnu.org; Sat, 20 May 2017 16:27:42 +0200 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113085 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, May 20, 2017 at 02:54:23PM +0200, Alexander Doe wrote: > Good day Ladies and Gentleman, > > > which data structure is used by GNU/Emacs for storing and editing text > strings on low-level? List, balanced tree, gap buffer, something else? It's a gap buffer. > Which language is used for programming this? C or ELisp? The machinery is C, but there are some Lisp introspection functions: https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-Gap.html If you have a source installation, then C-h f "describe function" on e.g. "gap-position" will take you all the way to the C source (somewhere in editfns.c). Here's a link to an online resource, for your browsing convenience: https://git.savannah.gnu.org/cgit/emacs.git/tree/src/editfns.c?h=emacs-25#n1090 Cheers - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlkgUl4ACgkQBcgs9XrR2kY0IgCfV1ZksYeRDlZxkMbFaAlUrI7W U5YAnjb/b7rBzaJIiXHa7NvI8C5GhVFz =c3TR -----END PGP SIGNATURE-----