[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding git-commit highlight mode?
From: |
Arsen Arsenović |
Subject: |
Re: Adding git-commit highlight mode? |
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.
--
Arsen Arsenović
signature.asc
Description: PGP signature
- 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ć <=
- 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, 2025/01/03
Re: Adding git-commit highlight mode?, Jim Porter, 2025/01/02