rebuild, the buffer contains information that the Lisp state does not, and that unsaved text can be…
انتشار: 2026/08/11 10:07 UTCدریافت: 2026/08/13 05:00 UTCآخرین مشاهده: 2026/08/13 05:00 UTC
rebuild, the buffer contains information that the Lisp state does not, and that unsaved text can be lost.# 4. Display glyphs are not always text columnsGraphical checkbox glyphs and other display properties can occupy a different apparent width from their underlying string.That is usually harmless in a normal widget buffer, but it becomes visible ninside grids, padding and borders. For layout-heavy interfaces, text representations such as \[ \] and \[x\] are much easier to measure reliably.# 5. Recreating every widget is expensive; recreating changed regions can be acceptableThe useful question was not “Is widget.el slow?” but:>Which widgets are recreated, how often, and over what region?Preserving widgets in unchanged regions and adding optional fast paths produced a large improvement without replacing the control system.# 6. Benchmark byte-compiled codeThe source-loaded and byte-compiled results differed substantially, especially around closures and layout traversal.Source-loaded measurements are useful for relative profiling, but release-like performance should be measured with byte-compiled TextUI and widget definitions.# Where TextUI now standsTextUI still does not provide component-local state, a virtual DOM, CSS, a box model, or another widget catalogue.It currently provides:* responsive Flex and Grid layout* Knuth–Plass paragraph justification* native image regions* ordinary widget.el controls* buffer-level state* lifecycle effects and async protection* automatic block reconciliation* explicit region refresh as an optional fast path* optional measurement and attachment acceleration for package-owned widgetsThe project has moved from asking “Can Emacs display this kind of interface?” to a more useful question:>How much layout and refresh behavior can we add while keeping the native Emacs programming model understandable?For now, “automatic by default, explicit after measurement” feels like the right boundary.I would be interested to hear from package authors: which part of widget.el causes the most trouble in real interfaces—layout, editable fields, refresh cost, focus, or something else?\\[github.com/yibie/textui/blob/main/CHANGEL…(github.com/yibie/textui/blob/main/CHANGEL…)redd.it/1vlcqtu@r_emacs