emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Timothy <tecosaur@gmail.com>
To: orgmode <emacs-orgmode@gnu.org>
Subject: [Aside] Generating commit messages for Org
Date: Sun, 21 Nov 2021 04:27:45 +0800	[thread overview]
Message-ID: <871r3a8svb.fsf@gmail.com> (raw)


[-- 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 --]

             reply	other threads:[~2021-11-20 20:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-20 20:27 Timothy [this message]
2021-11-26 10:21 ` [Aside] Generating commit messages for Org Robert Pluim
2021-11-26 11:13   ` Timothy

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=871r3a8svb.fsf@gmail.com \
    --to=tecosaur@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).