From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id J/3BLcXZ119IXgAA0tVLHw (envelope-from ) for ; Mon, 14 Dec 2020 21:31:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kAM+KcXZ11+zQAAA1q6Kng (envelope-from ) for ; Mon, 14 Dec 2020 21:31:49 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E06999402C8 for ; Mon, 14 Dec 2020 21:31:47 +0000 (UTC) Received: from localhost ([::1]:60374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kovRZ-0000u2-AE for larch@yhetil.org; Mon, 14 Dec 2020 16:31:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kovR3-0000tp-9X for emacs-orgmode@gnu.org; Mon, 14 Dec 2020 16:31:13 -0500 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:39706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kovR0-0006mN-7y for emacs-orgmode@gnu.org; Mon, 14 Dec 2020 16:31:12 -0500 Received: by mail-pj1-x1032.google.com with SMTP id hk16so7539973pjb.4 for ; Mon, 14 Dec 2020 13:31:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=5vbwm7KMe4pcYZdVBt4uNs0Dw3n++Ll4BHxBLBHp2VE=; b=ftsVPzNE9WYnZjFewjAl3k5xmeCOEnD0oggG8eDy+6ATqhFCPPBQCcLGlHRz0M/0M/ mp9nQGZmeYzAcZGRIcVNm92HQrKhogP7W4+eawwo2Oe8DeV1PExHdTCKGBCv/Ut/W7bV 4XVpTLmVxQkkXoXmvQ4QuLSHG+zNjfUsbP8hcrcIGEvM7VkpZ/D6N0iVT3da7U/eO5Dn 0UQdFmMT1e4CCP3ePgUnunW8fjjU5TWtlB2MBIJeNbbwJV78Wbm8L0li1exku4JaPiZs ilJsjCJt0UiFlVZJqorLJx97/VEggp2YewKQrnfqTa+mbZzpkqOD1yT+7BAvmFvfiyv4 LpwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version; bh=5vbwm7KMe4pcYZdVBt4uNs0Dw3n++Ll4BHxBLBHp2VE=; b=qKfnFJXxEfGh3BXrcMD8mNKIi7OGB7K7Hql1tXSCoOy+Avw+uUzcIg/90MC1P7DCSo BW5BYSLNyZCQgo0RWNyiimvunDzmA3hVnlm8b5cXY84sbIUTW64OaMGphg8DCpLn2VOi oFHcadAdw3j7E2injnOco50zZXAhUNftoiMABYtUxHgo5Ys3gDKzxNF8jxCzHZlk3L16 N32QvjNQpqwUQ4ozTZrxFGtFHP3Oi7406Hvi2DPmBmWajsk3gGraX1uMqFc4G0LiW4Tl UztfiDrnLaCweidMaqopAtYMAue3kxCVxjHKpmm4rCGUwfWG0/KN1p2zFqt3DouBc9jX kHtw== X-Gm-Message-State: AOAM53319dnPJf48StgNTTkjizE/A5a7DLRBNFiE/HU6X1HLoq464pRd PnevUsqrKs8u+9MyMlKUYn7uzoLf9ALv6Q== X-Google-Smtp-Source: ABdhPJx9ufEUlf2/UWzq/1XR8qDkDC/q6fjZJNEuPYWI6x31SdIe1HPLa0ROLtEAg1LGXAmGSWQl+g== X-Received: by 2002:a17:90a:e64a:: with SMTP id ep10mr25907041pjb.60.1607981467995; Mon, 14 Dec 2020 13:31:07 -0800 (PST) Received: from tim-desktop (106-69-123-93.dyn.iinet.net.au. [106.69.123.93]) by smtp.gmail.com with ESMTPSA id s10sm21219366pgg.76.2020.12.14.13.31.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 13:31:07 -0800 (PST) References: <87o8kf69tm.fsf@ucc.asn.au> <87v9d66l75.fsf@gmail.com> <87a6ugpftr.fsf@gmail.com> <877dpkpefs.fsf@gmail.com> <873608pai7.fsf@gmail.com> <20201214180549.GE6352@maokai> User-agent: mu4e 1.5.7; emacs 27.1.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: Emacs as an Org LSP server Date: Tue, 15 Dec 2020 07:20:17 +1100 In-reply-to: <20201214180549.GE6352@maokai> Message-ID: <87v9d4krc7.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x1032.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.51 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ftsVPzNE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: E06999402C8 X-Spam-Score: -1.51 X-Migadu-Scanner: scn0.migadu.com X-TUID: RO2tg7z5v6AE I am no fan of Microsoft. I have run Linux as my primary desktop since 1994. I have been working as a developer since 1988 and have first hand experience regarding many of the poor business practices of Microsoft. However, I think the LSP is actually a positive imitative and a potential benefit to all developers and all editors and development tools, both closed and open source. I have outlined some points I think are relevant below. Russell Adams writes: > On Tue, Dec 15, 2020 at 01:08:47AM +0800, TEC wrote: >> >> Jean Louis writes: >> >> > [LSP is a evil plot from microsoft] >> >> I can see that you're overly concerned about Microsoft being able to >> somehow exert control over this. It may assuage your concerns to see an >> example "technology stack" that Org-LSP could fit into. > > REST API calls to a remote server as a core part of editing text in > your editor isn't concerning? How remote? How would you know? If they > use HTTPS could you even see what is sent? > LSP is not restricted to REST. It uses JSON as the message format, but can use any form of remote procedure call. It could be REST, it could be basic Unix socket interface, it could be some other TCP interface. Any interface both sides understand will work. >> Microsoft has provided a /standard/ that a huge number of editors/IDEs >> have adopted with /independent implementations/. At this point there is >> /nothing/ M$ could do to interfere with how the above works. > > Microsoft doesn't make standards that it can't corrupt or take > advantage of. See LDAP/AD, HTML extensions, programming language > extensions that makes their solutions incompatible with standards. > Yes, Microsoft does have a poor reputation when it comes to standards. However, if you consider why they have proposed the LSP and what their business model is, it becomes fairly obvious there is no benefit for them in changing this specification without good technical reasons. Microsoft has proposed the LSP because it has the potential to make their editors more popular and able to support more languages. They want others to implement the LSP server so that they can support the language in their editor or development tools with minimal development effort, increasing market share and reducing maintenance costs. Nothing unusual with that - basic business principal. They won't want to modify or change the protocol unnecessarily as that will break their own integration with these servers. Their business model relies on maintaining the standard they have proposed. The key point here is that other technologies, including free software tools like Emacs, can also benefit from this technology. I'm sure Microsoft would prefer to prevent this, but they can't if they want others to develop the language server modules. One of the biggest challenges for editors like Emacs is how to provide support for new languages which include all the features people expect in a modern editor. Often, it is extremely difficult to provide these features without incorporating some form of language parser or compiler. this is difficult to do with just Elisp. To try and work around these limitations, Emacs has used things like ECLIM to interface with the Eclipse editor and leverage off the internal facilities it provides. What the LSP does is provide a generic interface definition which works in a similar fashion, but is not dependent on an external server like Eclipse. Consider the potential of a future where in addition to defining a new language, tools to compile/parse and execute the language the projects which develop/maintain that language also provide an LSP server for that language. this would mean that in order to use that language in your editor, all you need to do is configure your LSP client to communicate with that server. I currently use 4 different LSP servers in my Emacs setup. None of them require a web server. They are all just scripts/executables which sit in my bin directory. When I open a file in a language which has a LSP server, Emacs starts the server and communicates with it to handle completion, linting, format hints etc. There is no external network connection required, no remote services, no reporting to MS. Even if Microsoft changes the specification, it has no impact on my current use. >> You seem to be focusing on the term "server" in the name. This seems to >> be a red herring in this case. In LSP the server is analogous to "emacs >> --daemon" and the client to "emacsclient". > > REST = web server. Using to make JSON requests over what you are > editing and your editor requiring the ability to send/receive to a > potential remote web server is a valid concern. > Except that isn't how it works. There is no requirement for a web server and there is no requirement for it to be based on REST. The message format is JSON, but how these messages are passed between the editor and the server is not restricted to a HTTP protocol. > Emacs daemon is a local socket interface (by default) for > communication between processes on the same box. > As are some of the LSP interfaces. >> I appreciate your concerns Jean, and am aware of Microsoft's history, >> however I do not believe there is any factual basis for your conclusions >> in this instance. > > Tainted, definitions quoted from https://www.thefreedictionary.com/tainted > > - To affect or associate with something undesirable or reprehensible: > a reputation that was tainted by allegations of illegal activity. > > - An undesirable or corrupting influence or association: wanted to > avoid the taint of an accounting scandal. > > This is the point. Given Microsoft's shameful history, any project > they are supporting is *tainted* by their corrupting influence and > association. That LSP is pushed by MS makes it undesirable due to > their reputation. That Github is now owned by MS makes it tainted by > their reputation. > And yet Microsoft has submitted and had patches accepted into the Linux kernel. Does this mean the Linux kernel is now tainted? > Companies, just like individuals should be judged by their actions. > Microsoft's well earned poor reputation is sufficient reason to > exclude them from any open source effort. > > I must conclude that MS is supporting LSP because they believe it will > increase market share for their proprietary editors. This is due to > their reputation and historic behavior. Thus I have no desire to > support LSP and thus not support MS indirectly. > Just because something is a benefit for Microsofts market share is no reason it can not also be a benefit to others. I have no illusions that Microsoft has proposed the LSP because they can see a benefit for their editors and tools. However, there is such a thing as mutual benefit. The LSP is a good idea regardless of its origin. Similar ideas have been proposed before, but have failed to gain traction because they lacked sufficient support. In fact, LSP could be a benefit to open source because it now means editors like Emacs could incorporate feature rich support for closed languages, such as Microsoft's .net and visual basic and make it more feasible to use Emacs in environments where this was not possible or as productive as using a native Microsoft editor. As to the question of indirect support for Microsoft, I have some bad news. It is more than likely, if you are using Emacs, you are already providing indirect support. I recently had a look at the packages in the GNU ELPA repository. I found 98 of these packages, all of them with copyright assigned to the FSF, are maintained and developed on github. If you are using GNU ELPA packages, it is highly likely you are using a package which relies on github for maintenance of the code base, supporting github which is owned by Microsoft. We are right to be sceptical about anything proposed by Microsoft. However, we also need to look more deeply than just a "everything microsoft does is bad". Even bad people can have good ideas. We need to evaluate the idea on its own merit and use it to meet our own requirements. In this case, an LSP server for org mode has the potential to bring org mode to others who don't use Emacs. I have reservations about how successful this can be because much of what I think makes org mode such a powerful tool is too highly tied to Emacs, but I think it is a great experiment which might prove to be beneficial to both org mode and free software more generally. -- Tim Cross