Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login


"It takes all sorts of in & out-door schooling to get adapted to my kind of fooling" -- R. Frost

computers / / Re: Package critique: modeline for air quality information

o Re: Package critique: modeline for air quality informationtpeplt

Re: Package critique: modeline for air quality information


  copy mid

  copy link   Newsgroups:
From: (tpeplt)
Subject: Re: Package critique: modeline for air quality information
Date: Fri, 01 Sep 2023 11:12:16 -0400
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <>
References: <>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info:; posting-host="2ff57952447aae673dbaa2a9eda5f233";
logging-data="4018483"; mail-complaints-to=""; posting-account="U2FsdGVkX1+RD1gXN2hn8PTZ1G1aszR32MHKGw/6IKM="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:bwjQKYyyf0QYGas23qtSAlfMn9Q=
 by: tpeplt - Fri, 1 Sep 2023 15:12 UTC

John Haman <> writes:

> I wrote a package that adds local air quality statistics to the
> mode-line. Here it is:
> If you are so inclined, I'd like some thoughts on the code. It's
> short, but I'm trying to get better at Emacs Lisp (at least this week,
> while I'm on vacation...)
> --

Some good practices to follow:

1. Byte-compile the source to locate and resolve many types of problems.
Byte compilation is available as a command (‘emacs-lisp-byte-compile’)
or via the Emacs-Lisp menu when editing a .el file. With your
‘air-quality.el’ (version 0.1 from the git repository), it yields the
following message:

> In air-quality--get-update:
> air-quality.el:125:17: Warning: reference to free variable
> ‘url-http-end-of-headers’

2. Emacs Lisp also has a ‘lint’ available via the Emacs-Lisp menu. This
can be helpful, but it can also find spurious (non-existent) problems
that are due to its limitations. For ‘air-quality.el’, it yields:

> In function air-quality--get-update:
> air-quality.el:118:Warning: Reference to unbound symbol:
> url-http-end-of-headers
> Linting finished.

3. ‘Checkdoc’ can help identify good practices, such as doc-string
standards, so that you (and others) will have usable descriptions of
procedures and data structures. It looks as though you have run it on
air-quality.el because it gives no warnings or errors.

4. Consider adding the code as an ELPA package that can be installed via
the Emacs menu Options/Manage Emacs Packages (or the command
‘list-packages’) once it has reached a level of maturity that you
consider acceptable.



rocksolid light 0.9.8
clearnet tor