3 ms·
Sorry, the "problem" you have is just too alien to me personally. I never had any issues with that feature of Magit, never thought about it until now. Maybe the
by iLemming 7y ago
Sorry, the "problem" you have is just too alien to me personally. I never had any issues with that feature of Magit, never thought about it until now. Maybe there are people just like you who'd say it's important to them - I can't relate, once again: my apologies.
I'm sure this can be "fixed" by writing some non-trivial Emacs lisp by tapping into `with-editor-finish` or `magit-commit` functions. But honestly, is that worth your time?
Emacs is weird, it makes you want weird things. So many times I would find myself irritated by "an issue" that I just stumbled on, I would write some emacs lips to fix the problem (just because I can), only later to realize there's no problem to begin with.
- Myrmornis 7y agoThere's no need to apologize! It's just two different possibilities for the design of Magit. I already wrote the code this morning to do this as a quick hack. It's just a few lines and I've been writing lots of emacs lisp recently, so it didn't cost me much time. The question is whether it would be useful as a setting for other magit users. Like I say, I can see arguments for this (being able to update you commit in conjunction with working on the commit message) but neither of us have suggested an advantage of the other model yet. (defun myrmornis--magit-commit-staged () (interactive) (let ((commit-message (buffer-string))) (let ((with-editor-cancel-message "")) (with-editor-cancel nil)) (with-temp-buffer (insert commit-message) (goto-char (point-min)) (delete-matching-lines "^[ \t]*#") ;; hack (magit-run-git-with-input "commit" "-F" "-"))) (magit-refresh-all)) (use-package magit :bind (:map with-editor-mode-map ("C-c C-c" . myrmornis--magit-commit-staged))
- iLemming 7y agoI apologized so it is clear that I'm not rejecting your idea due to my shallow thinking. Maybe you are trying to convey a story that potentially opens wide-range of possibilities and I just don't see it. As I said, maybe there are people who'd find it extremely useful. Would you mind sharing your "hack" in https://github.com/magit/magit https://github.com/magit/magit or https://gitter.im/magit/magit https://gitter.im/magit/magit ?
- deleted 7y ago[deleted]
- Myrmornis 7y ago(Replying to a child node because we've hit a HN depth limit I believe). Yep sure, I can open an issue to add a setting for this. I suspect it will be rejected but that's OK; I think an issue is justified because I use git and magit very intensively and have been unable to escape the `git commit -m` mental model.
- iLemming 7y agoCool. I would like to see the discussion. Perhaps this isn't an entirely unreasonable request, I'm inclining to take your side on this.