Skip to content

Treat computed space better in embark--display-string#809

Open
minad wants to merge 1 commit into
oantolin:masterfrom
minad:improve-display-string
Open

Treat computed space better in embark--display-string#809
minad wants to merge 1 commit into
oantolin:masterfrom
minad:improve-display-string

Conversation

@minad
Copy link
Copy Markdown
Contributor

@minad minad commented May 21, 2026

See also minad/vertico@14cc82f

It would be good to keep these in sync.

@oantolin I found this when working with computed space in Elfeed buffers. The problem is that align-to is relative to the left border by default, and since the candidates obtained by consult-line are reformatted with line numbers in front, the align-to space might collapse to a zero width space. Vertico and the Embark snapshot buffer are affected by this. Therefore always add a single space to make sure that the candidates do not look compressed. Compute space with :width does not have that problem. See emacs-elfeed/elfeed@b92434b for reference.

I believe I had such zero space compression in other buffers with alignment before, when invoking consult-line. But I don't remember which mode was affected. So it seems good to do this, even if it is a bit of a hack.

See also minad/vertico@14cc82f

It would be good to keep these in sync.
@oantolin
Copy link
Copy Markdown
Owner

I'm a little confused about why this affects embark collect, it uses tabulated-list for alignment. Isn't that different enough from Vertico (which, if I recall, has to assemble the entire candidate line) that it wouldn't be an issue here? Is there a simple completing-read call for which embark-collect shows the problem?

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