GNU bug report logs - #79178
[Improvement] Allow auto-insert to have functions as conditions

Previous Next

Package: emacs;

Reported by: Mattias <mattias <at> kojin.tech>

Date: Tue, 5 Aug 2025 16:18:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#79178: closed ([Improvement] Allow auto-insert to have
 functions as conditions)
Date: Thu, 07 Aug 2025 14:42:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 07 Aug 2025 17:40:47 +0300
with message-id <86v7mzp53k.fsf <at> gnu.org>
and subject line Re: bug#79178: [Improvement] Allow auto-insert to have functions as conditions
has caused the debbugs.gnu.org bug report #79178,
regarding [Improvement] Allow auto-insert to have functions as conditions
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
79178: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79178
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mattias <mattias <at> kojin.tech>
To: bug-gnu-emacs <at> gnu.org
Subject: [Improvement] Allow auto-insert to have functions as conditions
Date: Tue, 5 Aug 2025 18:16:48 +0200
[Message part 3 (text/plain, inline)]
--text follows this line--

Hi everyone,

First contribution to emacs. This comes from the fact that I have a 
custom function that overrides auto-insert to fit my needs and I 
realised it was not a big change and could be merged into emacs directly.

This small patch aims to allow any function acting as a predicate with 
no arguments to be used as a condition in auto-insert-alist

[0001-Autoinsert-Allow-condition-to-be-a-function.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Mattias <mattias <at> kojin.tech>
Cc: 79178-done <at> debbugs.gnu.org
Subject: Re: bug#79178: [Improvement] Allow auto-insert to have functions as
 conditions
Date: Thu, 07 Aug 2025 17:40:47 +0300
> Date: Thu, 7 Aug 2025 15:18:43 +0200
> Cc: 79178 <at> debbugs.gnu.org
> From: Mattias <mattias <at> kojin.tech>
> 
> Hi and thanks again,
> 
> > It is best to use change-log-mode for formatting commit log messages,
> > as it will allow you to use M-q and other conveniences, and will obey
> > the formatting according to our conventions.  Also, don't forget the
> > periods at the end of each sentence (I added them above).
> 
> I tried using change-log-mode but it indented the whole commit 
> message with 4 spaces when I used M-q on it. My current mode seems to do 
> the job with M-q, I just didn't use it before (and it removes the : 
> between lisp/autoinsert and (auto-insert-alist) which looks like the 
> intended formatting since other commit logs are formatted this way).

Thanks, installed on the master branch (with a few tiny fixes), and
closing the bug.


This bug report was last modified 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.