[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39555: [PATCH] Allow tempo-define-template to reassign tags to new t
bug#39555: [PATCH] Allow tempo-define-template to reassign tags to new templates
Mon, 10 Feb 2020 23:34:04 +0100
(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.
- bug#39555: [PATCH] Allow tempo-define-template to reassign tags to new templates,
Federico Tedin <=