From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: MPS: dangling markers Date: Sat, 29 Jun 2024 20:20:32 +0300 Message-ID: <86cynzis2n.fsf@gnu.org> References: <87v81u85hv.fsf@localhost> <87frsx81m2.fsf@localhost> <87cyo180y2.fsf@localhost> <874j9d7zqe.fsf@localhost> <87sewvg6lw.fsf@localhost> <86ed8fiug3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14152"; mail-complaints-to="usenet@ciao.gmane.io" Cc: yantar92@posteo.net, monnier@iro.umontreal.ca, emacs-devel@gnu.org, eller.helmut@gmail.com To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 29 19:21:08 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sNbl6-0003UA-Ef for ged-emacs-devel@m.gmane-mx.org; Sat, 29 Jun 2024 19:21:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNbkg-0003qf-7F; Sat, 29 Jun 2024 13:20:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sNbka-0003qI-Uf for emacs-devel@gnu.org; Sat, 29 Jun 2024 13:20:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sNbka-0004vQ-Eq; Sat, 29 Jun 2024 13:20:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=h8oxXRDulz3aPGdxyuZe1YBaBR3SgjlqdYvlHp98aQk=; b=AIh6uJUAx3tm7Eu9MTRC p5pqgVvJ+jYOFHLjuGoeaCFtlQJj8Q+xoen5IySf7zWg0Cs51Zhj6G5QmqsyAEaPlTtOh0weG1ZJp aRDKuq9ITpy5pjQhC77nVxSeUOUXxdIHNGbNpdDRdEzRAFHfnWnhMUJIBH7EUJ95kLe+KSkXK8eJD lkca3lV4/0wlCh8zuJZJSwAu+dwV3Jc2YIo22kUqqwkIyOs2gbwnpGWNnkPb4XRG+YG0jOq/dVMbA PRWpm4qwlnkQrsl03SkUDMJ0rhec7SO433znlX8HMuJGpRzHIIuJq+D8wgTh21WqWWlNMtbq2wycf gesq48ZxFVmLLw==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Sat, 29 Jun 2024 19:09:03 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320871 Archived-At: > From: Gerd Möllmann > Cc: yantar92@posteo.net, monnier@iro.umontreal.ca, emacs-devel@gnu.org, > eller.helmut@gmail.com > Date: Sat, 29 Jun 2024 19:09:03 +0200 > > > I think we can use a completely different data structure for > > character-to-byte conversions. There's no need to use markers for > > that, and there's no need to create extra markers. We could instead > > maintain an itree of positions with their character and byte values, > > as a field of 'struct buffer' that is not exposed to Lisp. > > > > WDYT? > > I must admit that my overview of that whole area is pretty limited. > I only remember that markers were always kind of a problem :-). > > Would such a data structure be similar to recording deletions/insertions > of buffer text? No, just pairs of character position and the corresponding byte position. > Anyway, it's a lot of work, of course. But the itree structure and the supporting code already exist, so why would that be a lot of work?