update packages and add valign

This commit is contained in:
2026-04-05 20:00:27 +02:00
parent b062fb98e3
commit 03fb00e374
640 changed files with 109768 additions and 39311 deletions

3
lisp/valign/.elpaignore Normal file
View File

@@ -0,0 +1,3 @@
*.png
Makefile
test.org

49
lisp/valign/README-CN.org Normal file
View File

@@ -0,0 +1,49 @@
#+TITLE: Valign.el
这个包能对齐 Org Mode、Markdown和table.el 的表格。它能对齐包含不等宽字体、中日韩字符、图片的表格。valign 不会影响 Org Mode或 Markdown mode基于等宽字符的对齐。
想要用 valign.el 的话,先加载 valign.el然后把 ~valign-mode~ 加到 ~org-mode-hook~~markdown-mode-hook~ 里即可。
#+begin_src emacs-lisp
(add-hook 'org-mode-hook #'valign-mode)
#+end_src
[[./default.png]]
[[./table.el.png]]
*已知问题:*
- Markdown Mode 里的隐藏链接依然会占用整个链接的宽度,因为隐藏链接用了 valign 还不支持的 character composition。
- 渲染大型表格≥100行速度较慢。
*注意:*
如果想要 valign 对齐 table.el 表格,表格里每个单元格的左侧不能有空格,右侧至少要有一个空格。可以用 [[https://github.com/casouri/ftable][ftable.el]] 自动布局表格成这样。
* 安装
键入如下内容,从 GNU ELPA 获取 valign.el:
#+begin_src
M-x package-install RET valign RET
#+end_src
* 自定义
设置 ~valign-fancy-bar~~non-nil~ 的效果如下:
[[./fancy-bar.png]]
仅影响 Org Mode和Markdown 的表格。
默认情况下valign 不会在普通编辑命令之后对齐表格,例如 ~self-insert-command~~backward-kill-word~​。如果你不想在某些命令后对齐表格,可以把命令加入 ~valign-not-align-after-list~ 中。
因为 valign 性能一般,所以我们不会对齐大于四千个字的表格。你可以修改 ~valign-max-table-size~ 改变这个限制。valign 会把 ~valign-table-fallback~ face 置于这些没有对齐的表格上。
其他自定义选项:
- ~valign-signal-parse-error~: 设为 non-nilvalign 遇到语法分析错误parse error时会报错提示。
- ~valign-lighter~: mode-line 里显示的标识。
- ~valign-box-charset-alist~: 用来定义 table.el 表格,比如 Unicode/ASCII 表格.
* 如果函数 advice 让你浑身发痒
~valign-mode~ 会加一些 advice即使你关闭了 ~valign-mode~​,这些 advice 也不会消失 因为函数advice是全局起效~valign-mode~ 是局部起效。 如果你想删掉这些 advice请用 ~valign-remove-advice~ 。 这时候如果有 buffer 里还开着 ~valign-mode~​,这些 buffer 里的 valign 将无法正常工作。

84
lisp/valign/README-elpa Normal file
View File

@@ -0,0 +1,84 @@
━━━━━━━━━━━
VALIGN.EL
━━━━━━━━━━━
[中文 README]
This package provides visual alignment for Org Mode, Markdown and
table.el tables on GUI Emacs. It can properly align tables containing
variable-pitch font, CJK characters and images. Meanwhile, the
text-based alignment generated by Org mode (or Markdown mode) is left
untouched.
To use this package, load it and add `valign-mode' to `org-mode-hook' or
`markdown-mode-hook':
┌────
│ (add-hook 'org-mode-hook #'valign-mode)
└────
<./default.png>
<./table.el.png>
*Known problems:*
• Hidden links in markdown still occupy the full length of the link,
because it uses character composition which we dont support now.
• Rendering large tables (≥100 lines) is laggy.
*Note:*
For table.el tables to work with valign, each cell has to have at least
one space on the right and no space on the left. You can use
[ftable.el] to auto-layout the table for you.
[中文 README] <file:README-CN.org>
[ftable.el] <https://github.com/casouri/ftable>
1 Install
═════════
You can obtain valign.el from GNU ELPA by typing:
┌────
│ M-x package-install RET valign RET
└────
2 Customization
═══════════════
Set `valign-fancy-bar' to `non-nil':
<./fancy-bar.png>
This only affects Org Mode and Markdown tables.
By default, valign doesnt re-align the table after normal edit
commands like `self-insert-command' and `backward-kill-word'. If you
want valign to not re-align the table after a certain command, add
that command to `valign-not-align-after-list'.
Because valign isnt particularly efficient, it doesnt align tables
larger than 4000 characters in size. If you want to change that
behavior, customize `valign-max-table-size'. Valign puts
`valign-table-fallback' face on those large tables.
Other (less interesting) customization:
• `valign-signal-parse-error': Set to non-nil to be informed of parse
errors.
• `valign-lighter': Lighter in mode-line.
• `valign-box-charset-alist': Used for defining table.el tables, e.g.,
Unicode/ASCII tables.
3 If function advice makes you itch
═══════════════════════════════════
`valign-mode' adds advice and doesnt remove them even if you close
`valign-mode' because function advice is global and `valign-mode' is
local. If you want to remove the advice, use
`valign-remove-advice'. If you run this while some buffer still has
`valign-mode' on, they break.

48
lisp/valign/README.org Normal file
View File

@@ -0,0 +1,48 @@
#+TITLE: Valign.el
[[file:README-CN.org][中文 README]]
This package provides visual alignment for Org Mode, Markdown and table.el tables on GUI Emacs. It can properly align tables containing variable-pitch font, CJK characters and images. Meanwhile, the text-based alignment generated by Org mode (or Markdown mode) is left untouched.
To use this package, load it and add ~valign-mode~ to ~org-mode-hook~ or ~markdown-mode-hook~:
#+begin_src emacs-lisp
(add-hook 'org-mode-hook #'valign-mode)
#+end_src
[[./default.png]]
[[./table.el.png]]
*Known problems:*
- Hidden links in markdown still occupy the full length of the link, because it uses character composition which we dont support now.
- Rendering large tables (≥100 lines) is laggy.
*Note:*
For table.el tables to work with valign, each cell has to have at least one space on the right and no space on the left. You can use [[https://github.com/casouri/ftable][ftable.el]] to auto-layout the table for you.
* Install
You can obtain valign.el from GNU ELPA by typing:
#+begin_src
M-x package-install RET valign RET
#+end_src
* Customization
Set ~valign-fancy-bar~ to ~non-nil~:
[[./fancy-bar.png]]
This only affects Org Mode and Markdown tables.
By default, valign doesnt re-align the table after normal edit commands like ~self-insert-command~ and ~backward-kill-word~. If you want valign to not re-align the table after a certain command, add that command to ~valign-not-align-after-list~.
Because valign isnt particularly efficient, it doesnt align tables larger than 4000 characters in size. If you want to change that behavior, customize ~valign-max-table-size~. Valign puts ~valign-table-fallback~ face on those large tables.
Other (less interesting) customization:
- ~valign-signal-parse-error~: Set to non-nil to be informed of parse errors.
- ~valign-lighter~: Lighter in mode-line.
- ~valign-box-charset-alist~: Used for defining table.el tables, e.g., Unicode/ASCII tables.
* If function advice makes you itch
~valign-mode~ adds advice and doesnt remove them even if you close ~valign-mode~ because function advice is global and ~valign-mode~ is local. If you want to remove the advice, use ~valign-remove-advice~. If you run this while some buffer still has ~valign-mode~ on, they break.

View File

@@ -0,0 +1,2 @@
;; Generated package description from valign.el -*- no-byte-compile: t -*-
(define-package "valign" "3.1.1" "Visually align tables" '((emacs "26.0")) :commit "421c8c0cb4636e5fd87ac1022d6b8268c320f74f" :authors '(("Yuan Fu" . "casouri@gmail.com")) :maintainer '("Yuan Fu" . "casouri@gmail.com") :keywords '("convenience" "text" "table") :url "https://github.com/casouri/valign")

1162
lisp/valign/valign.el Normal file

File diff suppressed because it is too large Load Diff