Hi Arash,
>> Here's a minor patch for preview.el I had lying around.
> Thanks, I installed it under your name (782efc99).
Great, thank you.
> While we're at it, can you help me with my question here[1]? The
> relevant CAPF code in AUCTeX hasn't changed for years now, and it used
> to work. So I'm not sure if something in Emacs or Corfu has changed.
Probably something that changed in Corfu, but the underlying problem is
most likely the following:
With `\setlength{}`, `LaTeX--arguments-completion-at-point` returns
(POS POS TABLE) where POS is the position of point and TABLE contains
things like `\columnsep`.
But with `\setlength{\}` (and with point right after the `\`),
`LaTeX--arguments-completion-at-point` return (POS+1 POS+1 OTHER-TABLE)
where OTHER-TABLE contains things like `columnsep`, i.e. now the
backslash is *not* part of the completion any more.
So from the point of view of the UI, it looks like after TAB inserted
`\` we ended up in a new completion field, rather than continuing the
previous completion.
Stefan