From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4OocBN6n119jWwAA0tVLHw (envelope-from ) for ; Mon, 14 Dec 2020 17:58:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id VSB5O92n11+dQgAAB5/wlQ (envelope-from ) for ; Mon, 14 Dec 2020 17:58:53 +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 368089402C8 for ; Mon, 14 Dec 2020 17:58:53 +0000 (UTC) Received: from localhost ([::1]:44646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kos7Y-0005tl-1L for larch@yhetil.org; Mon, 14 Dec 2020 12:58:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kos6f-0005bK-A8 for emacs-orgmode@gnu.org; Mon, 14 Dec 2020 12:57:57 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:38842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kos6Q-0007U3-1J for emacs-orgmode@gnu.org; Mon, 14 Dec 2020 12:57:57 -0500 Received: by mail-ed1-x52b.google.com with SMTP id cw27so18096415edb.5 for ; Mon, 14 Dec 2020 09:57:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GZKNJdqMlhHXDLrK12ge+jk813tKHFiS0BVCueUsUWI=; b=WYvJVi8VthESAAvsi2V/UCPcfMUwnamYuaxKzCudUcc6ydxR6GxSTxBnQ2Hq5/G33U JRBzvNhJMOWiVRrqRdfo0jQJzUl9EKJ6Av6G/EpEkR5UowJcoHyPEeychwPxadOBjFCp 73+8XneB3m8GlaTFQ8fVm0nBWL8GEStJ+XsJdFcMYoOwnedBjDDHKWux4NSTovbXIbfT axyn2Qwii/FtFJP9ckXXa9fKDdDXhqKfyGMMG5VbUcJD8qXOuwedZ4aFdN8b5j7BAFFz et7Dv6wahaf5rNnZX95hKSko3P3QbJIgsoUB71IR+LvLShSmOa3J62/yyukGUIawGPeh vslA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GZKNJdqMlhHXDLrK12ge+jk813tKHFiS0BVCueUsUWI=; b=D1JIHShLlpzlC2pq8WeiNu2qhJ5D31+EnvgkaX9nX93QSVpweQnGSukdwHKRNKnj78 sIMXLIDA//nCwFiy1TqWjk1bJrZ6yrCq7wnjvAF1HxpO2PxaEeqyhEZdWGPN/1xGuA73 F214umkziCnSJIM/nd63HtpdYu5DQwpdT5NdB1BbJArgE/Wg4zkzbDmlweydUXBdWXCo dxGvVCGOnlMcFiT8O1N8o0WrT+two6NLJG4kJdwUqGU5y25MT3NqOOJqwg5pDYeZT/gR H9+2fbmAF9HmP9JiWgDX/KCjFgrILSLgXTBB1XaNbvUqdBk5SNs/ekqK9bGwut6YqQpU k4PA== X-Gm-Message-State: AOAM531eGwvBkXgR1L9gtxXIzSfFBILF7eAmTLBdkZinQgMUx7iCGMWD iS6TwwD31EAlw0b+CIC5Ee4/qBrzXLRHseInkzU= X-Google-Smtp-Source: ABdhPJyAdxL3y3YHVXlro0OqmG/biVmhBCYRVqfRTznE0mSx4ANY9R2g9jWJGI1EW/QmxdfK68uqZcQs/C65GOIaJYM= X-Received: by 2002:aa7:d3cc:: with SMTP id o12mr26913005edr.235.1607968658503; Mon, 14 Dec 2020 09:57:38 -0800 (PST) MIME-Version: 1.0 References: <87o8kf69tm.fsf@ucc.asn.au> <87v9d66l75.fsf@gmail.com> <87a6ugpftr.fsf@gmail.com> <877dpkpefs.fsf@gmail.com> <871rfspa4y.fsf@gmail.com> In-Reply-To: <871rfspa4y.fsf@gmail.com> From: Neil Jerram Date: Mon, 14 Dec 2020 17:57:27 +0000 Message-ID: Subject: Re: Emacs as an Org LSP server To: TEC Content-Type: multipart/alternative; boundary="000000000000b33e5c05b6706027" Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=neiljerram@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: org-mode-email Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.01 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=WYvJVi8V; 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: 368089402C8 X-Spam-Score: -3.01 X-Migadu-Scanner: scn0.migadu.com X-TUID: KETGn4SYfFGK --000000000000b33e5c05b6706027 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes, thanks, I'm seeing the picture now. I guess that some of those things would require extensions to the LSP standard/protocol, as well as just implementation, wouldn't they? On Mon, 14 Dec 2020 at 17:31, TEC wrote: > Hi Neil, > > Ah, I see what you=E2=80=99re getting at now. I=E2=80=99ll try to give yo= u an idea of what > I think could apply. > > - Provide nice text manipulation actions, e.g. structural editing > - Completion, with company > - Org Export > - Run Babel blocks > - Org syntax highlighting (potentially) > - Folding (maybe) > - All the nice stuff like table alignment, checkbox state propagation= =E2=80=A6 > > Does that help? > > All the best, > *Timothy* > > * From*: Neil Jerram <%22Neil+Jerram%22+%3Cneiljerram@gmail.com%3E> > * Subject*: Re: Emacs as an Org LSP server > * To*: TEC <%22TEC%22+%3Ctecosaur@gmail.com%3E> > * Cc*: "org-mode-email" > * Date*: Tue, 15 Dec 2020 01:22:55 +0800 > I'm afraid things still aren't clear for me. Is there a reason it's so > hard to give a concrete example? > > If I try to analogise from how LSP works for golang, I believe the LSP > server does things like > - complete symbol beginning with "Xyz" > - tell me where so-and-so function is defined (e.g. so that the client > editor can jump to it). > I'm not sure if operations like that make sense for Org. > > Another possibility might be interacting, from a 3rd party editor, with a > body of Org content that has been primarily written and managed in Emacs. > If so, what would those interactions be? Marking a task as done? > Something more complex than that? > > Or is it like: 3rd party editor opens an Org file and the user types some > . Editor asks the LSP server (Emacs) "what does > mean?", and the server replies "it means the Org > entry should now look like this: ..." > > > On Mon, 14 Dec 2020 at 15:58, TEC wrote: > >> Hi Neil, >> >> Good to hear that you did take a look at the readme =F0=9F=99=82. >> >> You can think of the LSP as a specification for cross-editor/IDE >> extensions. The intent of this is to make some of Org=E2=80=99s function= ality >> accessible to the ~95% of people who don=E2=80=99t use Emacs, by hooking= into Emacs >> itself. >> >> Does that clear things up for you? You can also see >> https://langserver.org/. >> >> All the best, >> *Timothy* >> >> * From*: Neil Jerram <%22Neil+Jerram%22+%3Cneiljerram@gmail.com%3E> >> * Subject*: Re: Emacs as an Org LSP server >> * To*: TEC <%22TEC%22+%3Ctecosaur@gmail.com%3E> >> * Cc*: "org-mode-email" >> * Date*: Mon, 14 Dec 2020 23:46:12 +0800 >> Thanks Timothy. I did read the README, but I'm afraid I still can't >> quite picture a specific use. >> >> >> On Mon, 14 Dec 2020 at 15:28, TEC wrote: >> >>> Hi Neil, >>> >>> I=E2=80=99m going to quote you the readme from the linked github repo: >>> >>> Allow the unwashed masses to use Org, without using Emacs, using Emacs. >>> >>> Here=E2=80=99s the image from the readme [image: model.png] >>> >>> And here=E2=80=99s the first line from the first result of a google sea= rch for >>> &ldquoLSP=E2=80=9D: >>> >>> The Language Server Protocol (LSP) defines the protocol used between an >>> editor or IDE and a language server that provides language features >>> like auto complete, go to definition, find all references etc. >>> >>> That should give you an idea of the intent here. >>> >>> All the best, >>> *Timothy* >>> >>> * From*: Neil Jerram <%22Neil+Jerram%22+%3Cneiljerram@gmail.com%3E> >>> * Subject*: Re: Emacs as an Org LSP server >>> * To*: TEC <%22TEC%22+%3Ctecosaur@gmail.com%3E> >>> * Cc*: "org-mode-email" >>> * Date*: Mon, 14 Dec 2020 19:41:05 +0800 >>> Could you describe a use case? Apologies if I missed this in earlier >>> threads. >>> >>> >>> On Sun, 13 Dec 2020 at 10:44, TEC wrote: >>> >>>> >>>> A little progress update. >>>> >>>> https://github.com/tecosaur/org-lsp now exists. >>>> >>>> I have no idea what I'm doing, so if anyone has feedback on the curren= t >>>> idea, that would be much appreciated. >>>> >>>> TEC writes: >>>> >>>> > Hi Everyone, >>>> > >>>> > From the Org standardisation effort the idea of using Emacs as the >>>> basis >>>> > of an LSP server for Org has been mentioned a few times. >>>> > >>>> > I thought this deserved it's own thread so here it is :) >>>> > >>>> > I'm quite keen to investigate the viability of this idea. >>>> > Some key questions that I think need addressing are: >>>> > 1. How can we 'package' Emacs into an LSP client? >>>> > 2. Assuming we use some language as the basis for the host how do w= e >>>> > want to pick it? LSP library? Lisp? Are there any outstanding >>>> > contenders. >>>> > 3. How much effort is involved? Is it worth it to try to make Org >>>> more >>>> > approachable* (without Emacs)? >>>> > >>>> > Lastly, but perhaps even more crucially --- who would be interested = in >>>> > working on this? I certainly am, but this feels like something that >>>> > would be more viable with a small working group. >>>> > >>>> > Who's interested? >>>> > >>>> > Timothy. >>>> > >>>> > >>>> > * I can't help but think that this hypothetical LSP server may >>>> serve as >>>> > a 'gateway drug' to Org in Emacs =F0=9F=98=89 >>>> >>>> >>>> --000000000000b33e5c05b6706027 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes, thanks, I'm seeing the picture now.=C2=A0 I guess= that some of those things would require extensions to the LSP standard/pro= tocol, as well as just implementation, wouldn't they?

On Mon, 14 Dec 202= 0 at 17:31, TEC <tecosaur@gmail.co= m> wrote:

Hi Neil,

Ah, I see what you=E2=80=99re getting at now. I=E2=80=99ll try to give you = an idea of what I think could apply.

  • Provide nice text manipulation actions, e.g. struc= tural editing
  • Completion, = with company
  • Org Export
  • Run Babel bl= ocks
  • Org syntax h= ighlighting (potentially)
  • Folding (may= be)
  • All the nice= stuff like table alignment, checkbox state propagation=E2=80=A6

Does that help?

All the best,
Timothy<= /b>

From: Neil Jerram=
Subject: Re: Emacs as an Org LSP server
To: TEC
Cc: "org-mode-email" <emacs-orgmode@gnu.org>
Date: Tue, 15 Dec 2020 01:22:55 +0800

I'm afraid things still aren't clear for me.=C2=A0= Is there a reason it's so hard to give a concrete example?

If I try to analogise from how LSP works for golang, I believe the = LSP server does things like
- complete symbol beginning with &quo= t;Xyz"
- tell me where so-and-so function is defined (e.g. s= o that the client editor can jump to it).
I'm not sure if ope= rations like that make sense for Org.

Another poss= ibility might be interacting, from a 3rd party editor, with a body of Org c= ontent that has been primarily written and managed in Emacs.=C2=A0 If so, w= hat would those interactions be?=C2=A0 Marking a task as done?=C2=A0 Someth= ing more complex than that?

Or is it like: 3rd par= ty editor opens an Org file and the user types some <random key sequence= >.=C2=A0 Editor asks the LSP server (Emacs) "what does <random k= ey sequence> mean?", and the server replies "it means the Org = entry should now look like this: ..."


On Mon, 14 D= ec 2020 at 15:58, TEC <tecosaur@gmail.com> wrote:

Hi Neil,

Good to hear that you did take a look at the readme =F0=9F=99=82.

You can think of the LSP as a specification for cross-editor/<= span>IDE extensions. The intent of this is to make some of Org=E2=80=99s functionality accessible to= the ~95% of people who don=E2=80=99t use Emacs, by hooking into Emacs itself.

Does that clear things up for you? You can also see https://langs= erver.org/.

All the best,
Timothy<= /b>

From: Neil Jerram=
Subject: Re: Emacs as an Org LSP server
To: TEC
Cc: "org-mode-email" <emacs-orgmode@gnu.org>
Date: Mon, 14 Dec 2020 23:46:12 +0800

Thanks Timothy.=C2=A0 I did read the README, but I'm a= fraid I still can't quite picture a specific use.

<= br>
On Mon,= 14 Dec 2020 at 15:28, TEC <tecosaur@gmail.com> wrote:

Hi Neil,

I=E2=80=99m going to quote you the readme from the linked github repo:

Allow the unwashed masses to use Org, without using Emacs, using Emacs.

Here=E2=80=99s the image from the readme 3D"model.png"<= /p>

And here=E2=80=99s the first line from the first result of a google search = for &ldquoLSP=E2=80=9D:

The Language Server Protocol (LSP) defines the protocol used b= etween an editor or IDE and a language server that provides language features l= ike auto complete, go to definition, find all references etc.

That should give you an idea of the intent here.

All the best,
Timothy<= /b>

From: Neil Jerram=
Subject: Re: Emacs as an Org LSP server
To: TEC
Cc: "org-mode-email" <emacs-orgmode@gnu.org>
Date: Mon, 14 Dec 2020 19:41:05 +0800

Could you describe a use case?=C2=A0 Apologies if I missed= this in earlier threads.


On Sun, 13 Dec 2020 at 10:44, TEC &= lt;tecosaur@gmail.c= om> wrote:
https://github.com/tecosaur/org-= lsp now exists.

I have no idea what I'm doing, so if anyone has feedback on the current=
idea, that would be much appreciated.

TEC <tecosaur@gm= ail.com> writes:

> Hi Everyone,
>
> From the Org standardisation effort the idea of using Emacs as the bas= is
> of an LSP server for Org has been mentioned a few times.
>
> I thought this deserved it's own thread so here it is :)
>
> I'm quite keen to investigate the viability of this idea.
> Some key questions that I think need addressing are:
> 1. How can we 'package' Emacs into an LSP client?
> 2. Assuming we use some language as the basis for the host how do=C2= =A0 we
>=C2=A0 =C2=A0 want to pick it? LSP library? Lisp? Are there any outstan= ding
>=C2=A0 =C2=A0 contenders.
> 3. How much effort is involved? Is it worth it to try to make Org=C2= =A0 more
>=C2=A0 =C2=A0 approachable* (without Emacs)?
>
> Lastly, but perhaps even more crucially --- who would be interested in=
> working on this? I certainly am, but this feels like something that > would be more viable with a small working group.
>
> Who's interested?
>
> Timothy.
>
>
> * I can't help but think that this hypothetical LSP server may=C2= =A0 =C2=A0serve as
>=C2=A0 a 'gateway drug' to Org in Emacs =F0=9F=98=89

--000000000000b33e5c05b6706027--