> As for the first point, fine grained control for what goes into a commit, that's definitely a power user feature, but an important one of course.
It's not a power-user feature, and it shouldn't be considered one. It should be taught as a standard part of any workflow: before committing, look at the changes you're about to add, and use hunk-staging features (e.g. trivial using Magit) to stage and commit unrelated changes separately.
For example, did you clean up some comments and docstrings while you were adding a new feature? Commit those improvements separately, so that if you need to revert the feature commit later, the improvements won't also be reverted. It also makes reviewing much easier, as each commit or patch, having its own purpose, can easily be reviewed separately, and attention can be focused on parts that need changing.
> Again there are ways to achieve this without introducing new state (the index), for example by allowing to amend the last commit.
Amending a commit does not serve the same purpose as staging files and hunks separately into the index.
It's my impression that few git users understand the value of the index, because few of them use porcelains that expose its power in simple ways. If I had only "git add -p" to use, I might not, either. But Magit is, well, like its name implies, like magic.
gitless has the --partial flag that allows you to commit parts of files interactively.
And your workflow of gradually building up an index of (parts of) files can be achieved by partial/amendable commits. You simply iteratively/interactively add files and partial files to your latest commit until you're done. Instead of building up the index and then committing it, you just build up the commit directly.
This also means you can interact with the "in progress commit" in the same way as with all other commits.
There is no need for having an index to realize what you want.
Another minor point: Your workflow _is_ a power user workflow in my world. Out of twenty people that have reason to use git, one has use for this workflow.
It seems we roughly agree that there is a lot of scope for improving git though. I looked at magit and it looks nice. It exposes all the moving parts in a user interface. I would prefer to just have fewer moving parts, but if they are there it's sensible to make them obvious (and it puts to rest the idea that all you need to understand is that the git data structure is a DAG...)
As active as you are in the Emacs community, you ought to know that there is a steady stream of commits to "core." Anyway, if that's not enough for you, maybe you could allocate some of your own manpower to fixing those bugs.
> In fact, I would have to look up how to even "reopen" an Emacs bug, it is not very clear to users, and this makes it especially frustrating if issues are closed without solution.
At the top of your bug report, it says:
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21526 in the body.
You can then email your comments to 21526 AT debbugs.gnu.org in the normal way.
> Web tech gives you a greater degree of control: e.g., Emacs Lisp cannot put red sqiggles under text like VSCode does, but rather limits the user interface essentially to one large "textarea" (though in contrast to TTY interfaces, Emacs has good support for the mouse), but it is very rare for me to want web tech's greater degree of control.
Emacs can certainly apply red squiggles and many other rich text formatting, through the use of faces (which is how all syntax highlighting is implemented). Emacs also has a rich text-properties API through which any part of a buffer's text may be propertized with metadata. And it also provides overlays, which "overlay" text, also optionally with additional properties, without modifying the buffer text itself.
Together, these features are used to implement GUIs such as the Customization system with widgets, buttons, clickable links, collapsible sections, etc., as well as red-squiggle-style linting tools like flymake, flycheck, and LSP-related tools.
The question is almost like asking a fish to describe water. It's the sudden lack of it that produces a really clear example. :)
Anyway, here's a random example that comes to mind: I have some sexps in a Lisp file and I want to sort them alphabetically. Each sexp (usually a top-level form, but not necessarily) usually spans multiple lines, so line-sorting won't do it. Since they may be top-level forms, there may be comments between them that would lose their context if their position relative to sexps were lost, so comments need to "stick to" sexps they're above.
How would you solve this in a random text editor?
In Emacs, I would develop a command that does what I need. At each stage of the development process, I evaluate the command's definition, and it's instantly available to be used and tested. I could even test the function on its own definition, if I wanted to be silly (undoing the sorting after testing, of course).
When I'm done, I save the command definition to my configuration, and it's now a permanent tool in my toolbox. I didn't have to recompile the editor and start a new process, nor did I have to submit a patch to an upstream and ask for it to be merged. Similarly to a carpenter (forgive me if it sounds silly), my editor is my workbench, and as wood is malleable, so is my editor.
So, here's the command I came up with (maybe not the prettiest implementation, but maybe not the worst): https://github.com/alphapapa/unpackaged.el#sort-sexps And using Emacs and Org mode, I publish it into this "unpackaged" package, which I then install into my configuration as a package, and other users can then easily install it into theirs, too.
I don't know of any other editor that can do all of this, certainly not so easily.
FYI, there are a variety of Org parsing libraries outside of Emacs. Some of them even appear to be robust and well-developed. I collected a list here: https://alphapapa.github.io/org-almanac/#Parsing
It's not a power-user feature, and it shouldn't be considered one. It should be taught as a standard part of any workflow: before committing, look at the changes you're about to add, and use hunk-staging features (e.g. trivial using Magit) to stage and commit unrelated changes separately.
For example, did you clean up some comments and docstrings while you were adding a new feature? Commit those improvements separately, so that if you need to revert the feature commit later, the improvements won't also be reverted. It also makes reviewing much easier, as each commit or patch, having its own purpose, can easily be reviewed separately, and attention can be focused on parts that need changing.
> Again there are ways to achieve this without introducing new state (the index), for example by allowing to amend the last commit.
Amending a commit does not serve the same purpose as staging files and hunks separately into the index.
It's my impression that few git users understand the value of the index, because few of them use porcelains that expose its power in simple ways. If I had only "git add -p" to use, I might not, either. But Magit is, well, like its name implies, like magic.