Emanuel Berg writes: > Dr Arne Babenhauserheide wrote: > >> After having seen how I could write interactive indentation >> highlighting in wisp-mode in a few hours of hacking and >> a few dozen lines of code [...] > > Excellent, now have a look at ispell.el - 4 323 lines - or > flyspell.el that is 2 393 lines - you can reduce it a lot, > I take it. That’s not my point. My point is that the buffer as abstraction is already pretty good. If you forgo that, you add a lot of complexity with finding the right entry points, defining how elisp should interact with text — all while increasing the separation from regular editing, so creating a package requires a higher up-front investment to find the right APIs. As a counter-point: An example of a higher level of abstraction is the org-mode API. But thinking back how long it took me to get that to actually do what I needed, I doubt that that’s the model I want for most packages. But I agree that without this, what I wrote would have been more brittle. Another example for specialized APIs that are used by others, too, are completion APIs — auto-complete or company. Currently Emacs is the environment I know that has the lowest barrier of entry for writing a package. To check my memory on that, I now looked at an IntelliJ plugin that just does replace-regex, and that clocks in at about 200 LOC, using specialized entry points. To get another sample, I checked a VS-code extension that just flashes the region on copy. To implement the equivalent of (if mark-active (list (point) (mark)) '()) it needs 20 lines of code. That said: going by the example of the orgmode API and completion APIs, building specialized APIs for certain tasks and releasing them as packages could be a way to move forward to experiment with abstractions. If similar APIs prove useful for very different tasks, and other people start using them, that would build a case that generalizing them and integrating them in Emacs and elisp as a default API could be a good way forward. Best wishes, Arne -- Unpolitisch sein heißt politisch sein, ohne es zu merken. draketo.de