* Best practices for writing an Emacs package
@ 2022-10-25 18:05 Akib Azmain Turja
2022-10-27 10:03 ` Theodor Thornhill
2022-10-27 20:12 ` Richard Stallman
0 siblings, 2 replies; 4+ messages in thread
From: Akib Azmain Turja @ 2022-10-25 18:05 UTC (permalink / raw)
To: Emacs Developer List
[-- Attachment #1: Type: text/plain, Size: 1182 bytes --]
There are certainly some best practices for doing something. But what
are the best practices for writing and maintaining an Emacs package?
Here are what I already know,
For programming in general,
* Write readable code, so that anyone else can also understand it.
* Write enough comments to explain what's going on.
* Write as many automated tests as possible.
* Use a version control system.
* Maintain a ChangeLog.
* Never publish code with syntax errors.
* Never throw out your computer through a window due to buggy code.
For Emacs packages,
* Write the summary line properly.
* Write package headers properly.
* Use lexical binding.
* Write good commentary.
* Define user options with `defcustom' instead of `defvar'.
* Write docstrings.
* Follow Emacs Lisp coding conventions.
* Never corrupt user data.
* Never left Emacs in a unusable state.
* Never uninstall Emacs due to frustration.
And what else?
--
Akib Azmain Turja
Find me on Mastodon at @akib@hostux.social, and on Codeberg (user
"akib").
This message is signed by me with my GnuPG key. Its fingerprint is:
7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Best practices for writing an Emacs package
2022-10-25 18:05 Best practices for writing an Emacs package Akib Azmain Turja
@ 2022-10-27 10:03 ` Theodor Thornhill
2022-10-27 20:12 ` Richard Stallman
1 sibling, 0 replies; 4+ messages in thread
From: Theodor Thornhill @ 2022-10-27 10:03 UTC (permalink / raw)
To: Akib Azmain Turja, Emacs Developer List
Akib Azmain Turja <akib@disroot.org> writes:
> There are certainly some best practices for doing something. But what
> are the best practices for writing and maintaining an Emacs package?
I haven't read it, but there's a repo by a prolific package dev
describing many such things here
https://github.com/alphapapa/emacs-package-dev-handbook
Theo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Best practices for writing an Emacs package
2022-10-25 18:05 Best practices for writing an Emacs package Akib Azmain Turja
2022-10-27 10:03 ` Theodor Thornhill
@ 2022-10-27 20:12 ` Richard Stallman
2022-10-28 18:14 ` Akib Azmain Turja
1 sibling, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2022-10-27 20:12 UTC (permalink / raw)
To: Akib Azmain Turja; +Cc: emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> * Never throw out your computer through a window due to buggy code.
However, do throw Windows out of the computer due to its unjust manner
of distribution. Unjust code is worse than buggy code.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Best practices for writing an Emacs package
2022-10-27 20:12 ` Richard Stallman
@ 2022-10-28 18:14 ` Akib Azmain Turja
0 siblings, 0 replies; 4+ messages in thread
From: Akib Azmain Turja @ 2022-10-28 18:14 UTC (permalink / raw)
To: Richard Stallman; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 968 bytes --]
Richard Stallman <rms@gnu.org> writes:
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> > * Never throw out your computer through a window due to buggy code.
>
> However, do throw Windows out of the computer due to its unjust manner
> of distribution. Unjust code is worse than buggy code.
I tried to throw out Losedows, but my stupid BIOS searches for Windows
to boot. However I don't start Losedows, fortunately the BIOS has an
option to choose a GNU GRUB's EFI file. But I need to do that every
time I boot it, a little bit annoying.
--
Akib Azmain Turja
Find me on Mastodon at @akib@hostux.social, and on Codeberg (user
"akib").
This message is signed by me with my GnuPG key. Its fingerprint is:
7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-28 18:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 18:05 Best practices for writing an Emacs package Akib Azmain Turja
2022-10-27 10:03 ` Theodor Thornhill
2022-10-27 20:12 ` Richard Stallman
2022-10-28 18:14 ` Akib Azmain Turja
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).