[201_86] Remove popups to improve UI when inserting Automatic Content#2895
[201_86] Remove popups to improve UI when inserting Automatic Content#2895git-lakshy wants to merge 2 commits intoMoganLab:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce UI popups/screen flashing when inserting “Automatic” content (TOC, Index, Glossary, List of Figures/Tables) by avoiding a full document update on each insertion.
Changes:
- Added developer note
devel/201_86.mddescribing Issue #2814, the rationale, and test steps. - Updated
automatic-menuinsertion actions intext-menu.scmto callupdate-documentwith per-item keys instead of"all".
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
devel/201_86.md |
Adds a short write-up of the issue, the behavioral change, and manual test steps. |
TeXmacs/progs/text/text-menu.scm |
Switches automatic insertion flows from update-document "all" to per-item update keys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
TeXmacs/progs/text/text-menu.scm
Outdated
| (make-aux "list-of-figures" "figure-list-prefix" "figure") | ||
| (update-document "all"))) | ||
| (update-document "list-of-figures"))) | ||
| ("List of tables" | ||
| (begin | ||
| (make-aux "list-of-tables" "table-list-prefix" "table") | ||
| (update-document "all")))) | ||
| (update-document "list-of-tables")))) |
There was a problem hiding this comment.
Switching these actions from (update-document "all") to a specific key (e.g. "the-index") routes through update-document’s (generate-aux what) path. In edit_process_rep::generate_aux_recursively, all auxiliary blocks are cleared unconditionally before the conditional which check, so calling generate-aux with a non-empty key can leave any other existing automatic content (TOC/index/glossary/lists) empty in documents that contain multiple auxiliary blocks. To avoid a regression vs the previous full update, consider regenerating all aux content without the heavyweight UI path (e.g. a helper that does generate-all-aux/generate-aux "" without system-wait), or adjust aux generation so only matching blocks are cleared/regenerated.
devel/201_86.md
Outdated
| - List of figures | ||
| - List of tables | ||
| Content is inserted and generated as before. | ||
| No more popupo or screen flashing. |
There was a problem hiding this comment.
Typo: "popupo" should be "popups".
| No more popupo or screen flashing. | |
| No more popups or screen flashing. |
Issue :
On inserting Automatic Content Screen popups causing flash and bad ui, the editor shows repeated popup/wait dialogs and visible screen disturbance.
also issue #2814
on debian:
Screencast.From.2026-02-28.22-34-00.mp4
How to Test
Open any text document with section/index/glossary markers.
Trigger any of this via
Insert -> Automatic:Content will be inserted just like before but without popup, Wait cursor appears during the update and resets after. (wait cursor may not be visible due to fast update)
Instead of popup now "Updating current buffer ..." message is shown in status bar.
What Changed
document-edit.scm:system-wait→set-message+ wait cursorset-cursor-style "wait"/"normal"aroundupdate-documentedit_process.cpp:system_wait→set_messageReplaced popup in
generate_bibliography,generate_index,generate_glossary.Screen-Rec
(Cursor not visible due to my system settings)
Screencast.From.2026-02-28.23-05-47.mp4