From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Adding git-commit highlight mode? Date: Thu, 2 Jan 2025 15:53:29 -0600 Message-ID: References: <37733be4476e1c2b6e873c967c79cb0035959a9e.camel@yandex.ru> <86wmfdhwg7.fsf@gnu.org> <0347118b217c57e4e62018547883fad5f1d1e63e.camel@yandex.ru> <86r05lht77.fsf@gnu.org> <875xmwykuk.fsf@aarsen.me> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37192"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Konstantin Kharlamov , emacs-devel@gnu.org To: =?UTF-8?Q?Arsen_Arsenovi=C4=87?= , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 02 22:54:20 2025 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tTT92-0009YF-A2 for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Jan 2025 22:54:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTT8K-0001Hz-CU; Thu, 02 Jan 2025 16:53:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTT8I-0001Hd-M6 for emacs-devel@gnu.org; Thu, 02 Jan 2025 16:53:34 -0500 Original-Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTT8H-0004hf-2V; Thu, 02 Jan 2025 16:53:34 -0500 Original-Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5d3d0205bd5so17453779a12.3; Thu, 02 Jan 2025 13:53:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735854810; x=1736459610; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=JmArzyE1h8M3A/9MHmRZCQd3wIdocmXP42Xf5XcrV/4=; b=OtOS+n9VcHuzVr0whVgvPNLBsm7dI78zVFJIg/6LMm/Sa5394Chnu6yBDS/lz0u+oe UA4xykxurBkbw6igEAgmq0L2DCQR9CKXZj9+J6m+6J2OaWxwcObiRFxPiE1gsbYMeHWt gfARcrQb4NpeSZvx7F1KxwtiqUj/0EXMtimTs/3HzLORemRFWoqDycWTnFcPbKS4B8Zp LjiEKE47uqbBeQgckj7h7KirquVtDJrzeCS8HTHeTClNwjIPdLG4maZ684CtPLBKB6i+ 9IuaZ8946C5vYUYZ/V2J8X+rK53Fl3PVt7sI2Xaq9OeTW1Mlcd5FzGEm7qadFmjkGtqL MZLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735854810; x=1736459610; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=JmArzyE1h8M3A/9MHmRZCQd3wIdocmXP42Xf5XcrV/4=; b=wxEJgxwgy9dT2623rPeQR08Wwkz+r/RHBNfCUvO2ldWb/xyXEE/Am9L+D5cNSwtuVI z9GK1RuSdD29uRtLhQoHdBMXls1lWTyLbZTJpjlLBNxFIEUpVZTDXZ7CrrjL0Z7Jg/z5 vWxwcwZLTIz9+e74u51ifroSQhZDiK6RoPLP8BUnRvPihueenae7V5PPMJi1oMS9J18/ L/R1hYbd03WMu8T9W2CwuNi2Uqyio6pSP1YcgkA6smqhwdknDlyL07eCLZbfhAStsbsn SXMjVz2oBkIgGQ/cxXznEkjwqPqrIiXxqW40jmvLtC1xS1BdV/Yw8wJNqZSe6RNrblnO KiDA== X-Forwarded-Encrypted: i=1; AJvYcCUht728Xm9FM9TrjLxY5V2HxN3M2ESxVeU4I01a6N1qi0Qr840DNntLJiB+LFtXxYWA/77LAhd37Igplzc=@gnu.org, AJvYcCVPB+6KCM1aO3OTBSflMXRTHpgbHuuCDTSFap+ofYHM0AESdP1gI61OF7nStdxzYmzBriSR@gnu.org X-Gm-Message-State: AOJu0Yw0vUqI9vad5Vwk7M8W0JuVBq/WfYBTmp7t8s7WNKER3Rt8wIYY MCtTDOi4fYBcYX2pokczKdvdnzGlcijVeXVaPbj75XVr0a+Wzs5KuJpAF4V44BFVFW2p/CXjw9E GhRJRKCpa2fGfbf7Lz8BY2rU1vas= X-Gm-Gg: ASbGncs6Y412hOmo+80i5ucg2Tywy8XlK53GJG8wwg+2wGWmDJArGkcpdAR1VMgK73y DKNfF5FZ7yF5tU2nMDl7g2qfnlvMMtSxLnAPk0I0= X-Google-Smtp-Source: AGHT+IHCl6dE4ZLuyeEgD2y0emLAXkflSj4Cu3MULOk1MZVVuZAOBzJhbS3ChbhoE7o5jAz9XPD6SwnfhAn0QwHNBB0= X-Received: by 2002:a05:6402:2109:b0:5cf:e66f:678d with SMTP id 4fb4d7f45d1cf-5d81de083bamr42610193a12.28.1735854809302; Thu, 02 Jan 2025 13:53:29 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 2 Jan 2025 15:53:29 -0600 In-Reply-To: <875xmwykuk.fsf@aarsen.me> Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=stefankangas@gmail.com; helo=mail-ed1-x530.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327601 Archived-At: Arsen Arsenovi=C4=87 writes: > 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 I agree with the 72 character fill-column, and have in the past suggested using that for ChangeLog's also. (There was recently a decision to reduce the fill-column even further instead.) AFAICT, the 50 character line limit for the summary line is not really followed very strictly in practice by most projects, including the Linux kernel. It's more of a recommendation. Even the link you provide above says that it's "a good idea" to use "no more than 50 characters" for it. For that reason, I think that this should be a warning (with a highlight if you go over), and not a hard limit. In `git-commit-mode`, the user option `git-commit-summary-max-length' is 68 by default, which strikes me as unopinionated enough. > As far as I know, some of these guidelines conflict with changelog > guidelines. They are not fundamentally incompatible, AFAIU.