[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Explain a bit more on how to configure language server in Eglot's ma
From: |
Augusto Stoffel |
Subject: |
Re: Explain a bit more on how to configure language server in Eglot's manual' |
Date: |
Thu, 09 Mar 2023 09:28:12 +0100 |
>> The utility function belongs to map.el. It is called `assoc-in` in
>> Clojure.
>
> Yuri presented some pretty good arguments about how that would
> be a bad idea. Also, not a Clojure expert, but AFAIK that
> function doesn't take dotted notation strings as input.
Good, let's not do it then. In any case, just for fun and because it
could be useful in some other situation, I proposed in bug#62068 the
suitable additions to map.el. Then the conversion we were discussing
looks like this:
(defun dotted-to-nested (items)
(seq-reduce
(pcase-lambda (map `(,ks . ,v))
(map-insert-in map
(mapcar 'intern (string-split ks "\\."))
v
'plist))
(map-pairs items)
nil))
(dotted-to-nested '("a.b.c" 1
"a.b.d" 2
"a.e.f" 3))
=> (a (e (f 3) b (d 2 c 1))) [modulo bug#62067]
- Re: Explain a bit more on how to configure language server in Eglot's manual, (continued)
- Re: Explain a bit more on how to configure language server in Eglot's manual, Yuan Fu, 2023/03/08
- Re: Explain a bit more on how to configure language server in Eglot's manual, Augusto Stoffel, 2023/03/09
- Re: Explain a bit more on how to configure language server in Eglot's manual, Juri Linkov, 2023/03/09
- Re: Explain a bit more on how to configure language server in Eglot's manual, Yuan Fu, 2023/03/10
- Re: Explain a bit more on how to configure language server in Eglot's manual, João Távora, 2023/03/10
- Re: Explain a bit more on how to configure language server in Eglot's manual, João Távora, 2023/03/09
- Re: Explain a bit more on how to configure language server in Eglot's manual, Juri Linkov, 2023/03/09
- Re: Explain a bit more on how to configure language server in Eglot's manual, Augusto Stoffel, 2023/03/09
- Re: Explain a bit more on how to configure language server in Eglot's manual',
Augusto Stoffel <=
- Re: Explain a bit more on how to configure language server in Eglot's manual, Yuri Khan, 2023/03/08
- Re: Explain a bit more on how to configure language server in Eglot's manual, João Távora, 2023/03/08
- Re: Explain a bit more on how to configure language server in Eglot's manual, Yuri Khan, 2023/03/08
- Re: Explain a bit more on how to configure language server in Eglot's manual, João Távora, 2023/03/08
- Re: [SPAM UNSURE] Explain a bit more on how to configure language server in Eglot's manual, João Távora, 2023/03/09
- Re: [SPAM UNSURE] Explain a bit more on how to configure language server in Eglot's manual, Yuan Fu, 2023/03/10
- Re: Explain a bit more on how to configure language server in Eglot's manual, Michael Eliachevitch, 2023/03/14
- Re: Explain a bit more on how to configure language server in Eglot's manual, João Távora, 2023/03/14
- Re: [PATCH] Explain a bit more on how to configure language server in Eglot's manual, Michael Eliachevitch, 2023/03/14
- Re: [PATCH] Explain a bit more on how to configure language server in Eglot's manual, Michael Eliachevitch, 2023/03/15