From: Kyle Meyer <kyle@kyleam.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: piem@inbox.kyleam.com
Subject: Re: [PATCH] piem-inboxes: Support mapping inbox to multiple coderepos
Date: Thu, 05 May 2022 23:28:14 -0400 [thread overview]
Message-ID: <877d6zmjap.fsf@kyleam.com> (raw)
In-Reply-To: <874k238l7y.fsf@localhost>
Ihor Radchenko writes:
> Kyle Meyer <kyle@kyleam.com> writes:
[...]
>> @@ -100,8 +102,7 @@ (defcustom piem-inboxes nil
>> ;; `piem--merge-config-inboxes' so that the value can also be set in
>> ;; ~/.public-inbox/config.
>> :type '(alist :key-type string
>> - :value-type
>> - (plist :value-type string))
>> + :value-type plist)
>
> :value-type plist seems wrong, unless I miss something. Even a list of
> strings will not necessarily match this value type when there are e.g. 3
> repos associated with an inbox.
Hmm, aren't you mapping at the wrong level? This type is supposed to
match an alist like this:
(("git"
:url "https://lore.kernel.org/git/"
:address "git@@vger.kernel.org"
:listid "git.vger.kernel.org"
:coderepo "~/src/git/")
...)
And it looks to me like it does:
(alist :key-type string => "git"
:value-type plist) => (:url ...)
Before I was specifying that the plist values should be strings, but,
given that :coderepo can now be a list of strings, this patch loosens
the plist type to its default value type (sexp).
>> - (when-let ((coderepo
>> + (when-let ((coderepos
>> (and (eq prop-name :coderepo)
>> - (car (gethash
>> - (format "coderepo.%s.dir" (car val))
>> - pi-cfg)))))
>> + (mapcar
>> + (lambda (v)
>> + (car (gethash (format "coderepo.%s.dir" v)
>> + pi-cfg)))
>> + val))))
>
> Does it mean that :coderepo "a single string" format is no longer supported?
A string value is still supported. This mapcar is working with the
values returned by piem--git-config-list, and that returns all values as
a list of strings. (Notice in the pre-image above its `(car val)`.)
next prev parent reply other threads:[~2022-05-06 3:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-24 7:48 [FR] Support multiple repositories associated with the same ML Ihor Radchenko
2022-04-24 22:12 ` Kyle Meyer
2022-04-26 9:19 ` Applying the same patch multiple times (was: [FR] Support multiple repositories associated with the same ML) Ihor Radchenko
2022-04-27 3:49 ` Applying the same patch multiple times Kyle Meyer
2022-04-27 12:46 ` Ihor Radchenko
2022-05-07 14:19 ` Kyle Meyer
2022-05-06 1:40 ` [PATCH] piem-inboxes: Support mapping inbox to multiple coderepos Kyle Meyer
2022-05-06 2:10 ` Ihor Radchenko
2022-05-06 3:28 ` Kyle Meyer [this message]
2022-05-07 5:21 ` Ihor Radchenko
2022-05-07 14:18 ` Kyle Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://git.kyleam.com/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877d6zmjap.fsf@kyleam.com \
--to=kyle@kyleam.com \
--cc=piem@inbox.kyleam.com \
--cc=yantar92@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.kyleam.com/piem/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).