From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Creating changelog with magit
Date: Thu, 03 Apr 2014 21:59:35 +0200 [thread overview]
Message-ID: <87ppkygp5k.fsf@gmail.com> (raw)
In-Reply-To: 87mwg2if6v.fsf@sophokles.streitblatt.de
Florian Beck <fb@miszellen.de> writes:
> 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.
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
prev parent reply other threads:[~2014-04-03 19: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
2014-04-03 19:59 ` Thorsten Jolitz [this message]
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=87ppkygp5k.fsf@gmail.com \
--to=tjolitz@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).