From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pedro Andres Aranda Gutierrez Newsgroups: gmane.emacs.devel Subject: Re: Explain a bit more on how to configure language server in Eglot's manual Date: Mon, 6 Mar 2023 12:30:44 +0100 Message-ID: References: <87cz5mqicb.fsf@gmail.com> <874jqyqh51.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23005"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Augusto Stoffel , Yuan Fu , Emacs developers , Stephen Leake To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 06 12:32:25 2023 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 1pZ94p-0005pj-H9 for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Mar 2023 12:32:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZ93o-0002D7-7d; Mon, 06 Mar 2023 06:31:20 -0500 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 1pZ93m-0002BV-2C for emacs-devel@gnu.org; Mon, 06 Mar 2023 06:31:18 -0500 Original-Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZ93g-0007zj-NY for emacs-devel@gnu.org; Mon, 06 Mar 2023 06:31:15 -0500 Original-Received: by mail-ed1-x534.google.com with SMTP id cw28so37135537edb.5 for ; Mon, 06 Mar 2023 03:31:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678102271; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JP29cpyMvjcE26FfYxRrTODaPdWi+V58PrpzRtCYumE=; b=AYkkI0eq+hbkJl/kydAIz0h+R8MNEqp9geyW5OyD7ew9eAkhpJRkl3kRrB5/sBaw/0 6Kgs7Tt9KeNdkQFYN9YtTs8BnF1EMxd8dRTVQ2UsGTM+NCckH1ReFumyQLixEb6zJYnz yGeM8mVETAM1ICa+TsJhw0VXwdleCbA2YHWG1yCs2/DI8EMEAIhHiGQnMmNK4royxDWp /qbf/i95nP7oAdlMzqtP7Gc9jXmh7sGFTW9wnJts9GnW6tR+zI0CwyGJ6joZMLk3fFeF Oek5VUTmbfHoe9SMCa0ot2V3BTvMgFD/qqZlq+Fbe/xWcIn565OEb7VxLeiKdDz0hwyc wggQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678102271; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JP29cpyMvjcE26FfYxRrTODaPdWi+V58PrpzRtCYumE=; b=Af1I4wKZS2sCa00uOIfgimgtu4FWymaN0BRWXUK/MnA6Y5s45IHILt8oXl5vC4J4nA DHjFSM3hKveIk2dAXQvkXQ1dt7lFn+NeLGpsQhTnNeFx3jr/k298puh0zWFcckPBQXaL aipcJCKtF26PghruEgMhxBloKO4Rz0AkaB8yUoQhgzB6JjZaho8rC2b8kDcwkqEyHzgl 4JxtGsD6WFUFwga9g8/PSTtIYxKmKskSXwv4J0kqxkY0kOg0cjWoyzld5FJLWAgtRNvD IED0wLRDi3U1kQMeNNchbIAsIr0tJ6KEzzNEp/F7t//uSk9sQltRIs4jp8Szn4JiV61Q 4fwQ== X-Gm-Message-State: AO0yUKVLTRbiJzcfjyk4b7TzdVYRox10T6c5RSUzIYIMeHXrFTx294w8 Tz9SHJeF/3fZLwhHKNlnIckD5BNrvREAaa2yi4M= X-Google-Smtp-Source: AK7set82ku6RW739cTXzqcm88lgIzzj0w5xbSablY/dQJYdnsaMmOdCDGyTGyyBwc1WHfIGv8nmRFEghK4XJc5ihcos= X-Received: by 2002:a17:906:6a93:b0:8b1:7ac6:318a with SMTP id p19-20020a1709066a9300b008b17ac6318amr4533656ejr.4.1678102270793; Mon, 06 Mar 2023 03:31:10 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=paaguti@gmail.com; helo=mail-ed1-x534.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-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:304030 Archived-At: Hi, >> But this exists: add-local add-dir-local-variable, >> add-file-local-variable, customize-set-variable, set-variable are all >> interactive functions that use the minibuffer. But I don't think this >> UI is the most suitable for this purpose. >Then they should be upgraded so that they do become suitable, because >this is first and foremost about editing variables. There you could face resistance from people using the already existing functionality. > For example, there could be: > * a way to ask to do do the editing in a separate buffer customize-set-variable > * a way to insert the current value of the variable to be added > as the initial value of the thing to be read .emacs.d/init.el or .dirlocals.el > * a way to ask to use 'eval' of the user's input rather then just > 'read' (here, an Eglot function could be used to spit out a plist > from a bunch of dotted strings in VSCode style). > * maybe more? I for me am not completely convinced that "VSCode-alike is good" ;-) And to be 'positive', if the main issue here is VScode <-> emacs compatibil= ity what about a layer to read VSCode configs and converting them to Emacs LISP= . Because that's something that may be challenging. /PA On Mon, 6 Mar 2023 at 12:13, Jo=C3=A3o T=C3=A1vora w= rote: > > On Mon, Mar 6, 2023 at 11:00=E2=80=AFAM Augusto Stoffel wrote: > > > > On Mon, 6 Mar 2023 at 10:51, Jo=C3=A3o T=C3=A1vora wrote: > > > > > Conveniently editing Emacs variables (file-local, dir-local, buffer > > > -local, global) interactively from the minibuffer (or some other simi= lar > > > place) is an idea that has been discussed before here. We could > > > restart that discussion. > > > > But this exists: add-local add-dir-local-variable, > > add-file-local-variable, customize-set-variable, set-variable are all > > interactive functions that use the minibuffer. But I don't think this > > UI is the most suitable for this purpose. > > Then they should be upgraded so that they do become suitable, because > this is first and foremost about editing variables. For example, there > could be: > > * a way to ask to do do the editing in a separate buffer > * a way to insert the current value of the variable to be added > as the initial value of the thing to be read > * a way to ask to use 'eval' of the user's input rather then just > 'read' (here, an Eglot function could be used to spit out a plist > from a bunch of dotted strings in VSCode style). > * maybe more? > > Also, the LSP use case you're asking for here is for add-dir-local-variab= le > where the directory is the current project's project-root. So maybe a > add-project-local-variable or somesuch would be a good first step. > > > > If such a mechanism is eventually agreed on for Emacs in general, Eg= lot > > > could very well take advantage, but don't think eglot.el should just = make > > > its own idiosyncratic take on that. > > > > AFAICT this mechanism has been agreed upon. VC log, Magit commit, Org > > capture, to name a few, all use the kind of UI I described. > > These are not for editing values of Emacs Lisp variables. > > Jo=C3=A3o --=20 Fragen sind nicht da um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet