From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Creating changelog with magit Date: Thu, 03 Apr 2014 21:59:35 +0200 Message-ID: <87ppkygp5k.fsf@gmail.com> References: <87vbuslob4.fsf@gmail.com> <87mwg2if6v.fsf@sophokles.streitblatt.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVnmT-0000wk-Sv for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 15:58:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVnmN-00052D-Ck for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 15:58:33 -0400 Received: from plane.gmane.org ([80.91.229.3]:35929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVnmN-000529-7K for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 15:58:27 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WVnmL-0004Ei-MK for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 21:58:25 +0200 Received: from g231227208.adsl.alicedsl.de ([92.231.227.208]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Apr 2014 21:58:25 +0200 Received: from tjolitz by g231227208.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Apr 2014 21:58:25 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Florian Beck writes: > Thorsten Jolitz writes: > >> I get a meager >> >> ,------------------- >> | >> | * org.el: >> | >> | # <> >> | >> `------------------- > > 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