From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#61868: 29.0.60; Eglot: setting "workspace" configurations should be easier Date: Wed, 01 Mar 2023 02:02:00 +0000 Message-ID: <87v8jlns9z.fsf@gmail.com> References: <878rgiar9o.fsf@gmail.com> <87o7pdpotl.fsf@gmail.com> <87sfepa5pz.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="17368"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 61868@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 01 03:08:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pXBtE-0004MC-NC for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Mar 2023 03:08:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXBsy-00044y-0Q; Tue, 28 Feb 2023 21:08:04 -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 1pXBsw-0003yr-Jf for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 21:08:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXBsw-0008WJ-BF for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 21:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pXBsv-0003oX-Or for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 21:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Mar 2023 02:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61868 X-GNU-PR-Package: emacs Original-Received: via spool by 61868-submit@debbugs.gnu.org id=B61868.167763643814611 (code B ref 61868); Wed, 01 Mar 2023 02:08:01 +0000 Original-Received: (at 61868) by debbugs.gnu.org; 1 Mar 2023 02:07:18 +0000 Original-Received: from localhost ([127.0.0.1]:52282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXBsD-0003nb-Tc for submit@debbugs.gnu.org; Tue, 28 Feb 2023 21:07:18 -0500 Original-Received: from mail-ed1-f50.google.com ([209.85.208.50]:41846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXBs8-0003nI-4W for 61868@debbugs.gnu.org; Tue, 28 Feb 2023 21:07:16 -0500 Original-Received: by mail-ed1-f50.google.com with SMTP id ec43so47958361edb.8 for <61868@debbugs.gnu.org>; Tue, 28 Feb 2023 18:07:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677636425; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6ZVEYOBXD8jvhRQ8tTP8oT45/CBNwZv5qeGwGDi9M38=; b=WfksxRH1ntWUtDFjb5Z/V3rvUy4gGpfIeCXDeRwYANsMi+FSHKPBcZOyCvND1oiNAk VwS2ro0ZbQhPvdG14s0isH3YvscPbHB1RMux7/aDrqc/IjSL0CsP6/sV4wBWKSrCR35w rqE/icC/WvnFeRi2K2OCn2LL+ecYc8Pf+otQqcGyfGE4IxLmbHXTPoUQgC0XNaXLzqMi ntNmKY5XtY3HBRzshlkR0G6+9JGiPJ1ZAuYKiL81a+heVgvs8uX7wBglR7QsCSgB3LuX csL6ZszRd2fTzxH4+c0jfXufzuHsONLqB0geLKzuAWRJTDTQL6TLxfySQ+5tMxJtAG7A EFjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677636425; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6ZVEYOBXD8jvhRQ8tTP8oT45/CBNwZv5qeGwGDi9M38=; b=a+4vFbLqZJ6UzwMPJuCQEG+ZaMWSoEtgf92S8p1QWNeHs9W6hPFmh9vrl5F8A1QZR5 CGxWfQPdPrdi1/XZbRzlEmXNlWFljb3NQBae3OZ7MluAU6jaVfcMgo49TtGC/f0N5ceM iqLq5sWjtMyODb2LDfS0VaHhiPZIyoOZoydsOLIQN9Ia0J1wADaVABicLugEf6wwsoQV SJz8pKgWZtFvOAgIAKHczZBCMWiffGV7SPI2NuSHo+1KSQEDEAy5ZSQF2cWYNtIuPtaV IKtFgb4x86AK72RCfF/r2reUdxBYnD2tJuGWXkCBmd1EQXWBeD32z4vljjvYCfX3P+iB e3lw== X-Gm-Message-State: AO0yUKXeyYSiSFPy50dvk8euAg1xNFhgg4Y2cM6v01eBzfnbKrCUPNr8 k5OTwyld2C5XJEOAUqoWchHZR/4bgCQ= X-Google-Smtp-Source: AK7set/S00mbUsJ4er6HgwRTFLtWlIqWeKO1Sk/PSrCQMnCnxNEaFWk7qtKbxreY1MDB748wo9qvdA== X-Received: by 2002:a5d:5604:0:b0:2c7:832:8fc0 with SMTP id l4-20020a5d5604000000b002c708328fc0mr3599532wrv.3.1677636006072; Tue, 28 Feb 2023 18:00:06 -0800 (PST) Original-Received: from krug (87-196-72-142.net.novis.pt. [87.196.72.142]) by smtp.gmail.com with ESMTPSA id v16-20020a5d4b10000000b002c56013c07fsm11046508wrq.109.2023.02.28.18.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 18:00:05 -0800 (PST) In-Reply-To: <87sfepa5pz.fsf@gmail.com> (Augusto Stoffel's message of "Tue, 28 Feb 2023 21:35:20 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257025 Archived-At: Augusto Stoffel writes: > I see this differently. Emacs doesn't have deeply nested namespaces for > variables and user options. It's all pretty flat, so there is almost > surely never going to be a variable that is nearly as tricky to set. Oh but no :-) there are even scary DSLs in Emacs variables. See project-kill-buffer-conditions for example. And customize-variable groks it. In effect you want something like customize-variable, but different UI and with support for saving to .dir-locals.el. I sympathize with the idea, I really do, for two distinct reasons: * I agree learning about dir-locals.el and its relation to a project's configuration is confusing for newcomers * I personally get extremely confused, even intimidated, by the Custom UI. So if this UI appears elsewhere, like a separate package, Eglot can take advantage. But I'm afraid I don't like the idea of starting this in Eglot, so it's probably not going to happen as long as I am maintainer. > [ Incidentally, when I suggested to allow such syntax: > > ((python-mode > . ((eglot-workspace-configuration > . (("pylsp.plugins.jedi_completion.include_params" . t) > ("pylsp.plugins.jedi_completion.fuzzy" . t) > ("pylsp.plugins.pylint.enabled" . :json-false)))))) > > you said it was un-Lispy or something, but I really think it's rather > the opposite. Emacs has flat names pretty much like the above. ] It's indeed un-Lispy, but it's not very hard to write a helper function to turn that into a plist, is it? >> (defun eglot-edit-workspace-configuration () (interactive) >> (find-file (expand-file-name ".dir-locals.el" (project-root (project= -current))))) >> >> My bet is that that two-liner would go a long way. > > No, this is not enough. At the very least I need a history variable to > look at the previous configurations. This feature has to be a thing on > top of of `eglot-show-workspace-configuration'. That idea is the best I can offer for now. You'd have undo for history, which is not bad. And Git, since it's a file after all. Jo=C3=A3o