emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Florian Beck <fb@miszellen.de>
To: Thorsten Jolitz <tjolitz@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Creating changelog with magit
Date: Thu, 03 Apr 2014 17:51:52 +0200	[thread overview]
Message-ID: <87mwg2if6v.fsf@sophokles.streitblatt.de> (raw)
In-Reply-To: <87vbuslob4.fsf@gmail.com> (Thorsten Jolitz's message of "Tue, 01 Apr 2014 23:42:07 +0200")

Thorsten Jolitz <tjolitz@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.

-- 
Florian Beck

  parent reply	other threads:[~2014-04-03 15:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01 21:42 Creating changelog with magit Thorsten Jolitz
2014-04-01 23:04 ` Richard Lawrence
2014-04-03 15:51 ` Florian Beck [this message]
2014-04-03 19:59   ` Thorsten Jolitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mwg2if6v.fsf@sophokles.streitblatt.de \
    --to=fb@miszellen.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=tjolitz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).