Commit Graph

259 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
104b5b1d5c Update documentation to use quoted format for define-tp and define-tp-group
- Update README.md with new quoted format examples
- Update README_CN.md with new quoted format examples
- Simplify format descriptions (merged Format 2 and 3 into one)

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-21 02:25:20 +00:00
copilot-swe-agent[bot]
7302795530 Convert tp-define-layer and tp-define-layer-group to functions with quoted args
- Convert tp-define-layer from macro to function that accepts evaluated args
- Add define-tp macro wrapper for convenient syntax
- Convert tp-define-layer-group from macro to function that accepts evaluated args
- Add define-tp-group macro wrapper for convenient syntax
- Update all tests to use new quoted format

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-21 02:16:45 +00:00
copilot-swe-agent[bot]
cedacc6b20 Initial plan 2025-12-21 02:05:15 +00:00
Kinneyzhang
6cb46fe1c6 Merge remote-tracking branch 'origin/copilot/update-define-tp-functionality' 2025-12-20 22:55:35 +08:00
Kinneyzhang
477e9bf0e9 fix bugs on tp-tests.el 2025-12-20 22:55:30 +08:00
copilot-swe-agent[bot]
6d34267f1c Address code review feedback: improve comments and test cleanup
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 14:52:05 +00:00
copilot-swe-agent[bot]
d176d2e7cb Fix re-definition of tp layers to properly update :props, :data, :compute, and :watcher
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 14:47:52 +00:00
copilot-swe-agent[bot]
e90aa03806 Initial plan 2025-12-20 14:39:26 +00:00
copilot-swe-agent[bot]
7d88744f85 Update documentation: tp-set entire-string form now supports layer names
Updated both English and Chinese documentation to reflect that
when setting text properties on an entire string, it now supports
not only flat properties (PROPERTY VALUE ...) but also layer names
defined by tp-define-layer or tp-define-layer-group.

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 14:10:42 +00:00
copilot-swe-agent[bot]
7b4c2a0e63 Fix tp-name property being incorrectly set for layer names in string form
When calling (tp-set str 'layer-name), the layer name symbol was wrapped
in a list by tp--parse-args. tp--resolve-props then incorrectly treated
this single-element list as a plist and generated an anonymous tp-anon-X
name instead of using the actual layer name.

The fix adds detection in tp--resolve-props for single-element lists
containing a defined layer/group name symbol, and correctly resolves
them by recursing with just the symbol.

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 14:01:01 +00:00
copilot-swe-agent[bot]
ab460db3d0 Initial plan 2025-12-20 13:51:55 +00:00
Kinneyzhang
73bc2df78e improve code 2025-12-20 21:51:32 +08:00
copilot-swe-agent[bot]
b2ac7eac15 Refactor: Extract duplicated lambda into named function with documentation
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 13:06:50 +00:00
copilot-swe-agent[bot]
08e7dfc728 Optimize reactive text property updates: only update relevant buffers
1. When using setq-local, only update the current buffer
2. When using setq, update all buffers that have the text property

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 13:05:28 +00:00
copilot-swe-agent[bot]
a32abe5101 Initial plan 2025-12-20 12:59:51 +00:00
Kinneyzhang
250a51ea22 improve code 2025-12-20 20:59:18 +08:00
copilot-swe-agent[bot]
3c698dea8a Add detailed table of contents and layer name support in API documentation
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 11:48:45 +00:00
copilot-swe-agent[bot]
66d9eb7ab9 Initial plan 2025-12-20 11:40:08 +00:00
copilot-swe-agent[bot]
738ef6c34f docs: add tp-reactive-reset documentation section
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 11:29:11 +00:00
copilot-swe-agent[bot]
dde320314f docs: add reactive text properties documentation in English and Chinese
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 11:27:30 +00:00
copilot-swe-agent[bot]
b2e2985fd3 Initial plan 2025-12-20 11:19:58 +00:00
copilot-swe-agent[bot]
be3cc6c147 feat: :data supports initial values with cons cell format
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 11:08:37 +00:00
copilot-swe-agent[bot]
ac0e163e66 fix: :data variables now trigger computed value updates via setq-local
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 11:00:22 +00:00
copilot-swe-agent[bot]
c3ddeede64 test: add test for setq-local reactive updates
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 10:42:23 +00:00
copilot-swe-agent[bot]
36c0a60f3f refactor: redesign :compute to compute reactive variable values, add :data support
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 09:30:17 +00:00
copilot-swe-agent[bot]
33f3ec3d7a refactor: address code review feedback - fix error message and extract helper function
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 08:45:52 +00:00
copilot-swe-agent[bot]
7dad0f1789 feat: add :watch and :compute support for tp-define-layer and tp-define-layer-group
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 08:42:48 +00:00
copilot-swe-agent[bot]
99f33c3af3 Initial plan 2025-12-20 08:26:21 +00:00
Kinneyzhang
77dfd030d0 improve code 2025-12-20 16:12:46 +08:00
copilot-swe-agent[bot]
0dba4d2a07 fix: Address code review feedback
- Remove duplicate tp--resolve-reactive-symbols call (use resolved-props instead)
- Simplify tp--generate-anonymous-layer-name to use counter only

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 07:53:14 +00:00
copilot-swe-agent[bot]
56733e7473 feat: Support anonymous reactive layers with auto-generated tp-name
- Add tp--generate-anonymous-layer-name to create unique layer names (tp-anon-*)
- Update tp--resolve-props to handle anonymous plists:
  - If plist has reactive variables ($...), generate tp-name and register dependencies
  - All anonymous plists now get a tp-name for reactive support
- Update tp--parse-args to process all props through tp--resolve-props
- Update tp--ensure-props to handle plists with reactive variables
- Add tests for anonymous reactive layers with tp-set, tp-match-set, tp-regexp-set

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 07:51:27 +00:00
copilot-swe-agent[bot]
736cfc59d9 fix: Preserve tp-name and tp-layers when setting properties with layer/group names
- tp--resolve-props now uses tp-layer-props (includes tp-name) for layers
- For groups, uses tp--build-layer-props to include tp-layers structure
- Updated tests to verify tp-name and tp-layers are preserved
- Added new test for groups with multiple layers

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 07:34:54 +00:00
copilot-swe-agent[bot]
f775d761bf refactor: Address code review feedback
- Add tp--ensure-props helper to reduce code duplication
- Add nil check for group's first layer in tp--resolve-props
- Improve comments in tp--parse-args to explain the unwrapping logic

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 07:20:45 +00:00
copilot-swe-agent[bot]
8e9b480d4c feat: Allow text property APIs to accept layer/group names defined by define-tp/define-tp-group
- Add tp--resolve-props helper function to resolve layer/group names to property lists
- Modify tp--parse-args to handle layer name symbols for tp-set, tp-reset, tp-add
- Update tp-match-set, tp-match-reset, tp-match-add to accept layer names
- Update tp-regexp-set, tp-regexp-reset, tp-regexp-add to accept layer names
- Update docstrings to document the new functionality
- Add comprehensive tests for all affected functions

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 07:18:15 +00:00
copilot-swe-agent[bot]
fe92965178 Initial plan 2025-12-20 07:10:53 +00:00
copilot-swe-agent[bot]
7667d1a139 Extract only reactive sub-properties for minimal incremental updates
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 06:50:39 +00:00
copilot-swe-agent[bot]
c22b596883 Simplify reactive deps: remove tp-layer-templates, store only reactive props
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 06:36:01 +00:00
copilot-swe-agent[bot]
072b1b3d7d Address code review: fix duplicate deps, iteration safety, improve docs
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 04:56:24 +00:00
copilot-swe-agent[bot]
1c7e37629b Implement reactive text properties feature with $-prefixed variables
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 04:53:35 +00:00
copilot-swe-agent[bot]
bb30bbe7b0 Initial plan 2025-12-20 04:38:46 +00:00
copilot-swe-agent[bot]
e2e440d45a Address code review: improve docstrings to clarify clamping behavior
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-18 03:07:40 +00:00
copilot-swe-agent[bot]
cc98ac4ed8 Add tp-move-layer function and refactor layer switching functions to use it
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-18 03:05:44 +00:00
copilot-swe-agent[bot]
b973611d23 Initial plan 2025-12-18 02:54:35 +00:00
Kinneyzhang
22ee512632 add define-tp && define-tp-group 2025-12-18 10:47:40 +08:00
copilot-swe-agent[bot]
ff96cf25af Address code review feedback: improve format validation and fix index increment logic
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-17 16:10:49 +00:00
copilot-swe-agent[bot]
b6f3f87925 Separate tp-define-layer and tp-define-layer-group macros
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-17 16:08:10 +00:00
copilot-swe-agent[bot]
fd732679a3 Initial plan 2025-12-17 15:57:29 +00:00
Kinneyzhang
ca63866018 misc 2025-12-17 23:38:50 +08:00
copilot-swe-agent[bot]
0903832e6f Fix documentation examples for tp-search-map and tp-forward-do in both README.md and README_CN.md
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-17 09:58:51 +00:00
copilot-swe-agent[bot]
aee47ee8d8 Initial plan 2025-12-17 09:48:26 +00:00