Skip to content

[1293] 草稿文件放开 .stem 后缀支持并导出样式包为 .stem 草稿 - #4533

Merged
da-liii merged 3 commits into
mainfrom
da/1293/style_package
Sep 9, 2026
Merged

[1293] 草稿文件放开 .stem 后缀支持并导出样式包为 .stem 草稿#4533
da-liii merged 3 commits into
mainfrom
da/1293/style_package

Conversation

@da-liii

@da-liii da-liii commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

任务描述

关联任务文档:devel/1293.md

What

  1. 草稿文件放开 .stem 后缀
    • scratch-buffer-name 支持可选扩展名参数,生成 draft_YYYYMMDD_HHMMSS.stem
    • draft-stamp 放开对 .stem 扩展名的匹配与数字时间戳提取;
    • C++ propose_title 识别 draft_*.stem,使 .stem 草稿享有与 .tmu 相同的时间标题推导;
    • C++ 与 Glue 导出带扩展名支持的 new-buffer
  2. 样式包导出与原文档关联
    • 导出样式包时创建 .stem 草稿文件并记录原文档路径;
    • 保存和另存为首选项均设置为 stem 格式(STEM files (*.stem));
    • 默认建议保存目录为原文档所在目录,默认文件名与原文档同名(仅后缀由 .tmu 改为 .stem,如 xxx.tmu 对应 xxx.stem)。
  3. 宏菜单清理
    • 移除「导出样式文件」,保留「导出样式包」。

Why

  • 任务 1131 将样式包统一为 .stem 格式存储;导出样式包时原先生成 .tmu 草稿且保存引导为 TMU 格式,需放开 .stem 草稿并自动引导到原文档目录及同名 .stem 格式。

测试

  • xmake r tm-files-test 全部通过(16 checks);
  • xmake r extract-style-package-test 全部通过(10 checks)。

@MoonL79 MoonL79 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@da-liii
da-liii merged commit 13e762d into main Sep 9, 2026
6 checks passed
@da-liii
da-liii deleted the da/1293/style_package branch September 9, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants