GNU bug report logs - #39555
[PATCH] Allow tempo-define-template to reassign tags to new templates

Previous Next

Package: emacs;

Reported by: Federico Tedin <federicotedin <at> gmail.com>

Date: Mon, 10 Feb 2020 22:35:01 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Federico Tedin <federicotedin <at> gmail.com>
To: 39555 <at> debbugs.gnu.org
Subject: bug#39555: [PATCH] Allow tempo-define-template to reassign tags to new templates
Date: Mon, 10 Feb 2020 23:34:04 +0100
[Message part 1 (text/plain, inline)]
(This may apply as a bug and as a wishlist item at the same time - not sure)

Two problems I've found using tempo.el are:

1) If I'm using templates + tags (with `tempo-complete-tag') in a buffer, and I
define new templates + tags from another buffer, I can't immediately use
them in the original buffer (I have to do M-: (setq
tempo-dirty-collection t) ).

2) If I want to assign a different template to an already existing tag,
I have to remove the tag manually from the tags collection.

These two problems can become a bit annoying specially when
writing/trying out new templates with tags. For someone learning about
tempo.el for the first time, I can imagine they could be a problem as
well. To fix these, I'm attaching a patch with some changes.

In `tempo-invalidate-collection', I decided to loop over every buffer to
check if `tempo-dirty-collection' has a local value, and only set it to
t if it does. I am not sure if this is the ideal way of setting a
buffer-local variable to a certain value for all buffers that have bound
a local value to it. Feedback is welcome.

- Fede

[tempo.patch (text/x-diff, attachment)]

This bug report was last modified 5 years and 86 days ago.

Previous Next


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