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

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.