3

I just stumbled across the archives directory of my .emacs.d/archives/ . Here's the beginning of .../archives/gnu/archive-contents

(1
 (ace-window .
         [(0 9 0)
          ((avy
        (0 2 0)))
          "Quickly switch windows." single
          ((:url . "https://github.com/abo-abo/ace-window")
           (:keywords "window" "location"))])
 (ack .
      [(1 5)
       nil "interface to ack-like tools" tar
       ((:keywords "tools" "processes" "convenience")
    (:url . "https://github.com/leoliu/ack-el"))]) ...

Can someone "deep in the lore" enlighten me to what this is about, specifically, how this s-expression AST(?) is built, on what criteria. What is the data schema used here, et cetera....

Drew
  • 75,699
  • 9
  • 109
  • 225
147pm
  • 2,907
  • 1
  • 18
  • 39
  • This question is really too broad ("What is this about?"), and you pose several questions in it. And then you pose more questions in comments to @wasamasa's answer. And then you add another, separate question that is nearly identical, and nearly as broad. Q&A for this site should be specific, typically how-to, questions. Asking what considerations were involved in designing a particular package repository (or even a particular library) is too broad to be useful here, IMHO. You might want to try a site such as Reddit, which is more geared toward discussion. – Drew Jun 21 '19 at 22:55

1 Answers1

2

This is a list of packages available in the specific ELPA repository. It's created by the admin of that repository and downloaded by Emacs to know what's installable.

Here's a pseudo-grammar:

PACKAGE-ARCHIVES: (PACKAGE-ARCHIVE-VERSION PACKAGE ...)
PACKAGE-ARCHIVE-VERSION: <integer>
PACKAGE: (PACKAGE-NAME . PACKAGE-DESCRIPTOR)
PACKAGE-NAME: <symbol>
PACKAGE-DESCRIPTOR: [VERSION DEPENDENCIES DESCRIPTION TYPE METADATA]
VERSION: (<integer> ...)
DEPENDENCIES: ((PACKAGE-NAME VERSION) ...)
DESCRIPTION: <string>
TYPE: single | tar
METADATA: (METADATUM ...)
METADATUM: (<keyword> ARG ...)
wasamasa
  • 21,803
  • 1
  • 65
  • 97
  • Know where the code is that handles (creates, reads) these archive files? – 147pm Feb 28 '17 at 02:31
  • It's in `package.el`, `package-x.el` contains a bit more for uploading and publishing packages. – wasamasa Feb 28 '17 at 07:27
  • Can anyone show me more of these sorts of "in the wild" uses of s-expressions for data management? I'm really needing to get my head around this -- beyond the baby examples in Lisp/Scheme textbooks. If not anyone reading this, then maybe suggest the proper forum(s)? Also, as a beginner, I'm not really grokking your "pseudo-grammar" wasamasa. Can you direct me to a tutorial of this pseudo-grammar? – 147pm Feb 28 '17 at 18:17
  • Read actual lisp source code and you'll discover more of these. There is no tutorial for this grammar because I made it up on the spot and consider it pretty easy to read: "Package-archives are a list of a package-archive-version and one or more packages, packave-archive-version is an integer, package is a cons of a package-name and a package-descriptor, package-name is a symbol, etc.". – wasamasa Feb 28 '17 at 20:09