Function: eca-table--source-width

eca-table--source-width is a natively compiled function defined in eca-table.el.

Signature

(eca-table--source-width STR)

Documentation

Return the width of STR in buffer columns, ignoring compositions.

Sums char-width the way current-column does. string-width is not used because it reflects cached automatic compositions
(flags, ZWJ sequences), so its result changes once the text has
been displayed.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-table.el
(defun eca-table--source-width (str)
  "Return the width of STR in buffer columns, ignoring compositions.
Sums `char-width' the way `current-column' does.  `string-width'
is not used because it reflects cached automatic compositions
\(flags, ZWJ sequences), so its result changes once the text has
been displayed."
  (cl-loop for c across str sum (char-width c)))