Fix a typo in diff without going back to the file reddit / emacs ---------------------------------------------------------------------- ndamee · 2022-04-15 05:25 There is a snippet on the emacs help list which can do this, so you can fix typos right in the diff after making the diff writable (C-x C-q) with the changes also being applied to the file automatically. I've often wanted to do this when finding a typo in the diff: https://lists.gnu.org/archive/html/help-gnu- emacs/2022-02/msg00568.html ---------------------------------------------------------------------- mplscorwin · 2022-04-15 05:52 OP: here is a thing vscode can do that Emacs can't ML: here is that feature in 13 loc Ten person team that built the vscode feature in seven three week sprints: \*sobbing quietly\* ---------------------------------------------------------------------- ndamee · 2022-04-15 06:09 I don't use vscode, so I don't know how the feature works there, it's probably more polished and can handle newline changes too, but surely for simple fixes this emacs snippet does the job well with a few lines of code. ---------------------------------------------------------------------- quantum_mattress · 2022-04-16 02:48 Why not just use ediff and fix it right there? ---------------------------------------------------------------------- Phil-Hudson · 2022-04-16 09:26 Great fan of ediff here, but I don't see any particular advantage to it in this case; on the contrary, I think the recipe given here requires fewer keystrokes, doesn't it? ---------------------------------------------------------------------- quantum_mattress · 2022-04-16 16:25 ok. I might not have completely understood the OP’s issue.