* [Aside] Generating commit messages for Org
@ 2021-11-20 20:27 Timothy
2021-11-26 10:21 ` Robert Pluim
0 siblings, 1 reply; 3+ messages in thread
From: Timothy @ 2021-11-20 20:27 UTC (permalink / raw)
To: orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1267 bytes --]
Hi All,
A few hours ago I noticed that I’ve made a few very minor mistakes in some of my
recent commit messages for Org. Realistically I don’t think I’m going to stop
making occasional mistake any time soon, eve if they do become rarer. So, I’ve
whipped up a magit hook that looks at the diff and fills in a /correct/ skeleton
in the commit message buffer.
For example, here’s what I get if a queue a few of my currently unstaged changes
┌────
│ * lisp/org.el (org-place-formula-image, org-format-latex):
│
│ * lisp/org-macs.el (org-compile-file, org-async-queue):
└────
This currently works with elisp functions/variables/etc. and headings from
documentation files. I’m sure it has a few rough edges, but it’s looking
promising so far.
Maybe a few of you might also find it of interest?
<https://tecosaur.github.io/emacs-config/config.html#commit-message-templates>
(the relevant commit is <https://github.com/tecosaur/emacs-config/commit/d1e3042a>).
Another thought I’ve had is a commit lint function for flycheck to check some
extra things (two spaces after sentences, commit subject starting with a capital
letter, etc.), but I haven’t looked into that at all.
All the best,
Timothy
[-- Attachment #1.2: Type: text/html, Size: 4443 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Aside] Generating commit messages for Org
2021-11-20 20:27 [Aside] Generating commit messages for Org Timothy
@ 2021-11-26 10:21 ` Robert Pluim
2021-11-26 11:13 ` Timothy
0 siblings, 1 reply; 3+ messages in thread
From: Robert Pluim @ 2021-11-26 10:21 UTC (permalink / raw)
To: Timothy; +Cc: orgmode
>>>>> On Sun, 21 Nov 2021 04:27:45 +0800, Timothy <tecosaur@gmail.com> said:
Timothy> Hi All,
Timothy> A few hours ago I noticed that I’ve made a few very minor mistakes in some of my
Timothy> recent commit messages for Org. Realistically I don’t think I’m going to stop
Timothy> making occasional mistake any time soon, eve if they do become rarer. So, I’ve
Timothy> whipped up a magit hook that looks at the diff and fills in a /correct/ skeleton
Timothy> in the commit message buffer.
Timothy> For example, here’s what I get if a queue a few of my currently unstaged changes
Timothy> ┌────
Timothy> │ * lisp/org.el (org-place-formula-image, org-format-latex):
Timothy> │
Timothy> │ * lisp/org-macs.el (org-compile-file, org-async-queue):
Timothy> └────
Timothy> This currently works with elisp functions/variables/etc. and headings from
Timothy> documentation files. I’m sure it has a few rough edges, but it’s looking
Timothy> promising so far.
I suggest you look at `add-change-log-entry-other-window' and/or
`magit-generate-changelog'.
Robert
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Aside] Generating commit messages for Org
2021-11-26 10:21 ` Robert Pluim
@ 2021-11-26 11:13 ` Timothy
0 siblings, 0 replies; 3+ messages in thread
From: Timothy @ 2021-11-26 11:13 UTC (permalink / raw)
To: Robert Pluim; +Cc: orgmode
[-- Attachment #1: Type: text/plain, Size: 331 bytes --]
Hi Robert,
> I suggest you look at `add-change-log-entry-other-window’ and/or
> `magit-generate-changelog’.
Thanks for the suggestions. I happen to have already had a peek, but thought it
would be easier to make something from scratch than integrate those to create
the experience I wanted.
All the best,
Timothy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-26 11:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-20 20:27 [Aside] Generating commit messages for Org Timothy
2021-11-26 10:21 ` Robert Pluim
2021-11-26 11:13 ` Timothy
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).