tecosaur / engrave-faces

Mirror of https://code.tecosaur.net/tec/engrave-faces
GNU General Public License v3.0
98 stars 5 forks source link

Not self-documenting #5

Closed PhilHudson closed 2 years ago

PhilHudson commented 2 years ago

What do you do with it once you've installed it?

tecosaur commented 2 years ago

After installing it, you use it.

PhilHudson commented 2 years ago

Seriously? I've given you important and useful feedback here, and you've come back with... that? Your. Doco. Does. Not. Describe. How. To. Use. It. Not. Even. A. Little. Bit. What do you do? require it? Then what? You must have seen an Emacs package before. They describe how to use themselves in fairly standard ways. Do that. Don't make users read every line of code to deduce what you mean by "use it".

elken commented 2 years ago

I don't want to pile onto this, but quoting the README

This is very much a work in progress

It's fair that a package that isn't in a state of completion doesn't have fleshed out documentation yet. The key functions have docstrings, and if you're unsatisfied with the degree of that you are welcome to try and improve it :D

PhilHudson commented 2 years ago

Fair enough, sorry for the static, I'll wait patiently.

On Fri, 3 Jun 2022 at 15:42, Ellis Kenyő @.***> wrote:

I don't want to pile onto this, but quoting the README

This is very much a work in progress

It's fair that a package that isn't in a state of completion doesn't have fleshed out documentation yet. The key functions have docstrings, and if you're unsatisfied with the degree of that you are welcome to try and improve it :D

— Reply to this email directly, view it on GitHub https://github.com/tecosaur/engrave-faces/issues/5#issuecomment-1146034679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADNWMUIYCQMJXL2IPQOHC3VNIKTZANCNFSM5XY66IUQ . You are receiving this because you authored the thread.Message ID: @.***>

tecosaur commented 2 years ago

What do you do? require it? Then what?

I don't know about you, but I usually poke around and see what the package provides. The engrave-faces library exposes a mere 20 public functions/variables. They all have non-placeholder docstrings, and I think I can reasonably expect somebody having a bit of a look at them to get a picture of how they fit together. Docstrings are not second-class citizens. After the package has matured a bit more I'll think about maybe describing some common entry points, but that's in the future.

PhilHudson commented 2 years ago

Like I said, I'll wait. Sounds like an excellent project. I appreciate anyone taking the time and putting in the effort to add cool new stuff to the ecosystem. I do. I try to contribute in small ways when I can.

On Fri, 3 Jun 2022 at 15:47, tecosaur @.***> wrote:

What do you do? require it? Then what?

I don't know about you, but I usually poke around and see what the package provides. The engrave-faces library exposes a mere 20 public functions/variables. They all have non-placeholder docstrings, and I think I can reasonably expect somebody having a bit of a look at them to get a picture of how they fit together. Docstrings are not second-class citizens. After the package has matured a bit more I'll think about maybe describing some common entry points, but that's in the future.

— Reply to this email directly, view it on GitHub https://github.com/tecosaur/engrave-faces/issues/5#issuecomment-1146039586, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADNWMTILAI7L32UG665RGLVNILHVANCNFSM5XY66IUQ . You are receiving this because you authored the thread.Message ID: @.***>

tecosaur commented 2 years ago

Actually, it will only take me a moment to add a demo of the predominant entry point here.

(defun engrave-faces-demo--face-apply (faces content)
  (format "{%S %s}" faces content))

(engrave-faces-define-backend
 "demo" ".demo" #'engrave-faces-demo--face-apply)

;; Using our new "demo" backend

(with-current-buffer
    (with-temp-buffer
      (emacs-lisp-mode)
      (insert "(message \"hey %s\" 'you)")
      (font-lock-ensure)
      (engrave-faces-demo-buffer))
  (buffer-string))

For more comprehensive examples, there's engave-faces-{html,latex,ansi}.el.