Subject: Re: bug#70331: [PATCH] Call custom folding functions with consistent point

From: Paul Nelson <[email-masked]>
Date: Sun, 14 Apr 2024 17:32:08 +0200

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