Hi Arash,

OK, I see.  The commit that you shared improves the situation for
vc.el, except that I think 64 should be 66 (= 74 - 8).  I attach what
I'm using, which also tells magit how long the summary should be.
Unfortunately, I don't see a way to set the fill-column in magit via
directory local variables (without eval).  I've added the following
hack to my config:

(defvar git-fill-column-alist '(("auctex" . 66)))

(defun set-git-commit-fill-column ()
  (when-let ((project (project-current))
             (root (project-root project))
             (name (file-name-nondirectory (directory-file-name root)))
             (assn (assoc name git-fill-column-alist)))
    (setq fill-column (cdr assn))))

(add-hook 'git-commit-mode-hook 'set-git-commit-fill-column)


Paul
From 367a6c4d81cb60e075b26018f1d2a1669de0043f Mon Sep 17 00:00:00 2001
From: Paul Nelson <ultrono@gmail.com>
Date: Sun, 14 Apr 2024 17:21:03 +0200
Subject: [PATCH] Tweak .dir-locals.el

* dir-locals.el: Change log-edit-mode fill-column to 66 (= 74 -
8), set git-commit-max-summary-length to 50.
---
 .dir-locals.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index aa4f0335..310697b8 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -7,11 +7,12 @@
          (emacs-lisp-docstring-fill-column . 72)
          (bug-reference-url-format . "https://debbugs.gnu.org/%s";)
          (diff-add-log-use-relative-names . t)
-         (vc-prepare-patches-separately . nil)))
+         (vc-prepare-patches-separately . nil)
+         (git-commit-summary-max-length . 50)))
  (log-edit-mode . ((log-edit-font-lock-gnu-style . t)
                    (log-edit-setup-add-author . t)
                    (vc-git-log-edit-summary-target-len . 50)
-                   (fill-column . 64)))
+                   (fill-column . 66)))
  (change-log-mode . ((mode . bug-reference)
                      (add-log-time-zone-rule . t)
                      (fill-column . 74)))
-- 
2.39.3 (Apple Git-145)

_______________________________________________
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to