[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding git-commit highlight mode?
From: |
Eli Zaretskii |
Subject: |
Re: Adding git-commit highlight mode? |
Date: |
Fri, 03 Jan 2025 08:45:19 +0200 |
> From: Arsen Arsenović <arsen@aarsen.me>
> Cc: Konstantin Kharlamov <Hi-Angel@yandex.ru>, emacs-devel@gnu.org
> Date: Thu, 02 Jan 2025 22:19:47 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
> >> Cc: emacs-devel@gnu.org
> >> Date: Thu, 02 Jan 2025 22:07:46 +0300
> >>
> >> On Thu, 2025-01-02 at 21:01 +0200, Eli Zaretskii wrote:
> >> > Do you plan to make this mode be descendant of change-log-mode?
> >> > something else?
> >>
> >> I thought of deriving from text-mode. I don't know much of change-log-
> >> mode besides what it says in the mode title and now that I'm looking at
> >> mode description it also sounds pretty vague. So… I could derive it
> >> from change-log-mode if you think it's useful, but I'd rely on your
> >> judgment here 😊
> >
> > change-log-mode is also a derivative of text-mode. Its advantage is
> > that it already provides font-lock for the style of log entries we
> > use.
>
> A thing that a git commit mode ought to do, however, is set fill-column
> to 72, highlight any content on line 2 as erroneous, and limit the first
> line to 50 characters. This is conventional in Git:
> https://git-scm.com/docs/git-commit#_discussion
> https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project.html#_commit_guidelines
>
> Naturally, all of this ought to be configurable, but these are important
> features and sane defaults, and are one of the primary reasons why I
> initially installed magit (though, I now use it for general Git
> interaction while editing).
>
> As far as I know, some of these guidelines conflict with changelog
> guidelines.
Being a descendant of change-log-mode doesn't mean the derivative mode
cannot change the settings it needs to change. ChangeLog files are
indented, whereas commit log messages aren't, so some customization of
the whitespace and fill-column will sure be needed. But, for example,
the change-log-fill-parenthesized-list capability will come in very
handy.
- Re: Adding git-commit highlight mode?, (continued)
- Re: Adding git-commit highlight mode?, Jonas Bernoulli, 2025/01/03
- Re: Adding git-commit highlight mode?, Eli Zaretskii, 2025/01/02
- Re: Adding git-commit highlight mode?, Arsen Arsenović, 2025/01/02
- Re: Adding git-commit highlight mode?, Stefan Kangas, 2025/01/02
- Re: Adding git-commit highlight mode?, Arsen Arsenović, 2025/01/02
- Re: Adding git-commit highlight mode?, Sean Whitton, 2025/01/03
- Re: Adding git-commit highlight mode?, Eli Zaretskii, 2025/01/04
- Re: Adding git-commit highlight mode?, Sean Whitton, 2025/01/04
- Re: Adding git-commit highlight mode?, Konstantin Kharlamov, 2025/01/15
- Re: Adding git-commit highlight mode?, Jim Porter, 2025/01/18
- Re: Adding git-commit highlight mode?,
Eli Zaretskii <=
Re: Adding git-commit highlight mode?, Jim Porter, 2025/01/02
- Re: Adding git-commit highlight mode?, Konstantin Kharlamov, 2025/01/02
- Re: Adding git-commit highlight mode?, Eli Zaretskii, 2025/01/02
- Re: Adding git-commit highlight mode?, Björn Bidar, 2025/01/03
- Re: Adding git-commit highlight mode?, Konstantin Kharlamov, 2025/01/03
- Re: Adding git-commit highlight mode?, Björn Bidar, 2025/01/03
- Re: Adding git-commit highlight mode?, Konstantin Kharlamov, 2025/01/03
- Re: Adding git-commit highlight mode?, Björn Bidar, 2025/01/04
- Re: Adding git-commit highlight mode?, Konstantin Kharlamov, 2025/01/04
Re: Adding git-commit highlight mode?, Jonas Bernoulli, 2025/01/04