[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add helper for .desktop file creation?
From: |
Nicolas Goaziou |
Subject: |
Re: Add helper for .desktop file creation? |
Date: |
Mon, 27 May 2019 19:39:32 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Pierre Neidhardt <address@hidden> writes:
> Nope, the current function only forces "Type" (the only mandatory
> field), everything else is omitted unless the key is explicitly set by
> the user. This is because I looped over ALL-ARGS (the #:rest argument)
> and I force-added #:type to it.
Oh, true. I stand corrected.
> I did not implement the full specs simply because I decided to draw an
> arbitrary line between short code, convenience and completeness. This
> is debatable of course and maybe a simple type-checking would not cost
> much.
I was thinking about a match against key before (match value ...), which
would then match value against a chosen predicate, and return an error
if it doesn't match.
- If key is either :no-display, :hidden, :d-bus-activatable, :terminal,
or :startup-notify, predicate should be `boolean?'.
- If it is :type, :version, :try-exec, :exec, :path, :startup-wm-class,
or :url, it should be `string?`.
- If it
is :only-show-in, :not-show-in, :actions, :mime-type, :categories,
:implements,
it should be a string or a list of strings only.
- If it is :name, :generic-name, :comment, :icon, :keywords, it should
be a a string or an alist.
- If key is anything else, it should be an error, because it is a typo.
I realize that we don't need numbers actually.
> Supporting the full specs would require a significant amount of work
> however.
Possibly, but we do not need more than this simple value type checking.
>> The docstring may explain that, e.g., compound :mime-type key becomes
>> MimeType.
>
> Hmm, OK but why? The procedure produces the expected behaviour with
> #:mime-type, is there anything else to clarify?
As a packager, I need to know what key is going to produce
StartupWMClass (note that :startup-wm-class produces, StartupWmClass, if
that matters), or DBusActivatable. Unless I'm missing something, it is
not obvious from the docstring.
WDYT?
- Re: Add helper for .desktop file creation?, (continued)
- Re: Add helper for .desktop file creation?, Nicolas Goaziou, 2019/05/25
- Re: Add helper for .desktop file creation?, Pierre Neidhardt, 2019/05/25
- Re: Add helper for .desktop file creation?, Amin Bandali, 2019/05/25
- Re: Add helper for .desktop file creation?, Nicolas Goaziou, 2019/05/25
- Re: Add helper for .desktop file creation?, Nicolas Goaziou, 2019/05/25
- Re: Add helper for .desktop file creation?, Pierre Neidhardt, 2019/05/25
- Re: Add helper for .desktop file creation?, Pierre Neidhardt, 2019/05/25
- Re: Add helper for .desktop file creation?, Pierre Neidhardt, 2019/05/27
- Re: Add helper for .desktop file creation?, Nicolas Goaziou, 2019/05/27
- Re: Add helper for .desktop file creation?, Pierre Neidhardt, 2019/05/27
- Re: Add helper for .desktop file creation?,
Nicolas Goaziou <=
- Re: Add helper for .desktop file creation?, Pierre Neidhardt, 2019/05/27
- Re: Add helper for .desktop file creation?, Nicolas Goaziou, 2019/05/27
- Re: Add helper for .desktop file creation?, Pierre Neidhardt, 2019/05/30
- Re: Add helper for .desktop file creation?, Marius Bakke, 2019/05/27
- Re: Add helper for .desktop file creation?, Pierre Neidhardt, 2019/05/27
Re: Add helper for .desktop file creation?, Danny Milosavljevic, 2019/05/25