Florian Beck <f...@miszellen.de> writes: > Thorsten Jolitz <tjol...@gmail.com> writes: > >> I get a meager >> >> ,------------------- >> | >> | * org.el: >> | >> | # <<comment text>> >> | >> `------------------- > > You get this when you are on the file that has changed. Press TAB > (magit-toggle-section) and you see a diff. Move to the chunk you want to > comment on and press "C": this should insert the defun/defvar/etc in the > commit buffer. > > To automate this I have > > (defun fb/magit-commit-add-log () > (interactive) > (let* ((ol (car (overlays-at (point)))) > (beg (overlay-start ol)) > (end (overlay-end ol)) > commit-buffer) > (save-excursion > (goto-char beg) > (while (re-search-forward "^[+-]" end t) > (save-window-excursion > (magit-commit-add-log) > (setq commit-buffer (current-buffer))))) > (display-buffer commit-buffer))) > > ... but I don't really use this, because it is very slow and, usually, > you want to arrange things differently.
Thanks, I hoped there is more than just this minimal skeleton, and there is, like so often with emacs/org-mode. I will try TAB/C and your function next time I commit. -- cheers, Thorsten