Hacker News new | ask | show | jobs
by singaporecode 1478 days ago
A pretty bad article to be honest, just creating confusion.

Emacs buffers are not the reason why functions like forward-paragraph exists.

That’s just normal abstraction (in programming).

1 comments

> Emacs buffers are not the reason why functions like forward-paragraph exists.

A buffer is essentially a tuple

    (contents, point, mark, definition of a "paragraph", ...)
So the article is correct - without buffers 0-ary (or implicitly 1-ary, since all evaluation is in the context of a buffer) functions like `forward-paragraph` could not exist. And without a wide library of such functions, the correspondence between normal editing commands and idiomatic Emacs Lisp wouldn't exist, and most benefits of Emacs would be lost.
I think of it more as dynamic extent but don’t want to be splitting hairs.

Not that I don’t love how Emacs does it, but I just think it’s not that closely correlated to the notion of what is a buffer as the header of the article implied

Thank you! This single comment explained why Emacs had buffers much more concisely than the article did (although I still liked the article).