From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Beck Subject: Re: Creating changelog with magit Date: Thu, 03 Apr 2014 17:51:52 +0200 Message-ID: <87mwg2if6v.fsf@sophokles.streitblatt.de> References: <87vbuslob4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVk1n-0006qr-Th for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 11:58:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVk1h-0005pQ-Un for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 11:58:07 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::5]:14978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVk1h-0005pI-JU for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 11:58:01 -0400 In-Reply-To: <87vbuslob4.fsf@gmail.com> (Thorsten Jolitz's message of "Tue, 01 Apr 2014 23:42:07 +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: Thorsten Jolitz Cc: emacs-orgmode@gnu.org 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. -- Florian Beck