From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Tracking buffer positions across time, without markers (was Re: PL support) Date: Mon, 11 May 2020 11:33:35 -0400 Message-ID: References: <6a2c7d18-344e-fefb-63d5-79a99d0532fc@gmail.com> <942a8cb1-0382-cf83-5ff9-4e776c2660f0@gmail.com> <7f8bdd43-f4d7-e0a8-dcfa-6679215f9d44@gmail.com> <9e98ccbd-6b01-d076-79eb-6bd06ab803fb@gmail.com> <87ftc71g1l.fsf@t510.orion.oneofus.la> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="87685"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: Eli Zaretskii , emacs-devel To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 11 17:38:17 2020 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 1jYAVU-000MhU-Ew for ged-emacs-devel@m.gmane-mx.org; Mon, 11 May 2020 17:38:16 +0200 Original-Received: from localhost ([::1]:56802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYAVT-0007mP-0I for ged-emacs-devel@m.gmane-mx.org; Mon, 11 May 2020 11:38:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYAR1-0001kc-EB for emacs-devel@gnu.org; Mon, 11 May 2020 11:33:39 -0400 Original-Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]:44823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYAR0-0006Cc-Gu; Mon, 11 May 2020 11:33:38 -0400 Original-Received: by mail-qt1-x82b.google.com with SMTP id g16so7498628qtp.11; Mon, 11 May 2020 08:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZZNr3QFaLU2F26FdQaxLnM5HJXGYo+4ZSzPhqvnDotQ=; b=PbUF/HcQQF2PN++KCEEOaBuj/EbbDLrmToUdIhVi01gqcVWAtvB4hk9rv482dEBqZw nzAwZTCUrhMxJCUOlkdbxSge1MkjW0eDj9fL0t037WvRYmQ+5SCLhj+eNUyB9uj6JPqQ Onml3MrLrnF2sgJgbfLkl+WJNNiCjdY1E1Nb9r775qH6tu9B60D/6h/Kxqar/6mM34HT QLk0Y+WF8nEdoHtkIBdBakh7Jv8Qk8riEcFEWXrb0kLGjuBUmc400EaseaWQiVoYlixz mVbbkbmf+ui+d1jow2UtihcHZZO8yjeaF+uNkCGbxx+8lukIvyxENFg4RK6x8kAxSoUO ozXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZZNr3QFaLU2F26FdQaxLnM5HJXGYo+4ZSzPhqvnDotQ=; b=Kgj8v/9ffHV3cz6ZMY9QAhE4XJfG6zjVXAnzJ1yp80EY/GhV/vJjGz/Ham5EDtq+3E j+HwPT1rBaEUC7xsDHNOHMYwtDsI1SKtCE1h7ZEqn205ps7CJG6vof8tonCZH90RUdnB NOFxKB7Ss5K2WoM7uyGeQtULLNHIh+HUwHxtOrH3g7wdK09fCJC85AfxqZtNy72N7RHp gmteNuab0/ZRRVn96etPdzqjER/3802SGk5rdFdJ96qyOiccL0u0QmPQ5vqwZWiBPmn5 NKABC0pKrnFNKvvhUuUQp3Y1nnmBWgnSQCd31ocJWu2IOjt86bgp4hmvWQhckeILt/CJ 20ow== X-Gm-Message-State: AGi0PubvgLdT1q+z4J2V+KmnhLpLnElbmFa+YW79xFLG6xv3Isjk1jGD FrulJvy1tbqY/tIfiy2J9RceLHZC X-Google-Smtp-Source: APiQypKShvmgDVXC7+I+j65lsGc33qOrEQkYoQJFzrD2dIsF8QpoBEQN0/dzx2bb0tzbwcEpAA/p5A== X-Received: by 2002:ac8:690b:: with SMTP id e11mr17091439qtr.196.1589211216960; Mon, 11 May 2020 08:33:36 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:4d17:b25e:8d9:2188? ([2601:184:4180:66e7:4d17:b25e:8d9:2188]) by smtp.googlemail.com with ESMTPSA id k43sm10047056qtk.67.2020.05.11.08.33.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 May 2020 08:33:36 -0700 (PDT) In-Reply-To: Content-Language: en-GB Received-SPF: pass client-ip=2607:f8b0:4864:20::82b; envelope-from=cpitclaudel@gmail.com; helo=mail-qt1-x82b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:249806 Archived-At: On 11/05/2020 11.16, João Távora wrote: > On Mon, May 11, 2020 at 3:18 PM Clément Pit-Claudel > wrote: > >> Yes, eactly, that's what I meant when I wrote "Visual Studio has a nice API for this: there is a way to snapshot a buffer, and to translate positions between two snapshots. In my example, this allows you to translate 0:3 in the original buffer to 7:10 in the new one." > > Well, if I understand correctly, you can still do this with markers. > You just need to register, somehow, somewher, at the time you > make the request to the server that "3" means "that marker there". > Then recover this information. In the worse case, this means this > means a table of markers that is as the number of positions in the > buffer, which is probably a performance no-no :-( Indeed :( > By the way the way LSP deals with this is by not fixing it. It temporarily > misaligns the syntax errors. But that's because it doesn't take 1 minute > to syntax-check :-), rather around 1 second or so in the common cases. Same in Flycheck :) People who write very slow typecheckers don't blame me, they blame their typecheckers ^^