--- Begin Message ---
Subject: |
[PATCH] Allow tempo-define-template to reassign tags to new templates |
Date: |
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.
- Fede
tempo.patch
Description: patch
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#39555: [PATCH] Allow tempo-define-template to reassign tags to new templates |
Date: |
Fri, 21 Feb 2020 11:20:40 +0200 |
> From: Federico Tedin <address@hidden>
> Cc: address@hidden
> Date: Mon, 17 Feb 2020 22:27:51 +0100
>
> No problem, I'm attaching a new patch with those corrections applied.
Thanks, pushed to the master branch.
Please see my follow-up commit with minor punctuation fixes. Also,
please try to always mention in the log message the bug number when
it's known (this is impossible if your original message that opens a
bug report already includes the patch, but it _is_ possible when you
post additional versions to the same bug report).
--- End Message ---