emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-30 f0daa2f2153: Conservative heuristic for tree-sitter parser


From: Eli Zaretskii
Subject: Re: emacs-30 f0daa2f2153: Conservative heuristic for tree-sitter parser ranges (bug#73324)
Date: Mon, 23 Sep 2024 14:49:12 +0300

> From: Kévin Le Gouguec <kevin.legouguec@gmail.com>
> Cc: Po Lu <luangruo@yahoo.com>,  Stefan Kangas <stefankangas@gmail.com>,
>  emacs-devel@gnu.org
> Date: Sun, 22 Sep 2024 23:23:06 +0200
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
> > I took a look and it’s set for log-edit-mode only. It would be nice if 
> > magit can pick it up. I’m sure a lot of people (me included) use magit for 
> > developing Emacs. The only problem is magit’s commit message editing buffer 
> > doesn’t have a special major mode. It does git-commit-mode which is a minor 
> > mode, and runs git-commit-setup-hook. But I’m not sure how to edit 
> > dir-locals to set fill-column using a hook or minor mode.
> 
> Kludge from my personal config reproduced below¹, if it can help.  It
> adds a function to git-commit-setup-hook that sets fill-column when it
> detects that one of the remotes is Emacs's Savannah repo.
> 
> Thinking more about it, and considering the existence of the
> git-commit-major-mode variable, I guess one could also
> 
> 1) define a major mode derived from text-mode in their personal config;
> 2) add a .dir-locals-2.el file to their Emacs checkout that sets
> git-commit-major-mode to that-new-mode, and fill-column to
>   *checks config*
> 63
>   *checks discussion*
> ^W64
>   *ponders git-blaming to see what Past Self has to say for himself*
>   *looks at the time*
>   *you're off the hook, Past Self*
> for that-new-mode.

Isn't it a bug in magit that it doesn't do something like that
already?  Fill column is just the tip of an iceberg, because a log
message is generally human-readable text, and so should benefit from
other features of Text mode and its descendants, like spell-checking
etc.

Perhaps magit should simply use log-edit-mode?

Should we perhaps submit a feature request to the magit developers?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]