Eli Zaretskii 于2023年11月15日周三 20:32写道: > I actually wonder why we need it as a defcustom. If you use > truncate-string-ellipsis, you will get both a customizable setting and > the correct string for the terminal at hand. Why do we need an extra > option? As Stefan promptly pointed out, the ellipsis defcustom is actually useless because the display of ellipsis is determined by the display table. So I have deleted it in the attached patch. > So you consider using the 'invisible' property a good feature? I > actually don't like using it for such purposes, as it gets in the way. I don't know the drawback of the 'invisible' property. This patch is inspired by dired-hide-details-mode, which uses the property to hide file information. > Btw, using string-width might not be the best possibility here. I > would recommend string-pixel-width instead (with subsequent division > by what default-char-width returns), as that will produce a better > approximation, especially on GUI frames. I agree using pixel width is more accurate, though the approximation based on character width is good enough in most cases. In fact, in addition to string-width, move-to-column also needs to be replaced by a function that moves the point to the character at a specific pixel position. It seems there isn't such a built-in function.