Subject: Re: bug#74255: 30.0.91; artist-mode right to left input introduces gaps

From: Eli Zaretskii <[email-masked]>
Date: Sun, 10 Nov 2024 11:03:43 +0200

> Date: Fri, 08 Nov 2024 12:06:55 +0000
> From:  Van Ly via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Drawing a rectangle in artist-mode going in the directions
> 
>  . down
>  . left to right
>  . up
>  . right to left
> 
> introduces gaps unexpectedly at the final closing top side.  See,
> 
> => http://sdf.org/~van.ly/img/emacs-30-0-91-artist-mode-rectangle-draw.jpeg .
> 
> To demonstrate,
> 
>  1. start, emacs -Q
>  2. open buffer and activate artist-mode
>     a. C-x b a RET
>     b. M-x artist-mode
>  3. draw line going down
>     a. C-c .
>     b. type +, type 40 .
>  4. draw line going left to right
>     a. C-c >
>     b. type +, type 40 .
>  5. draw line going up
>     a. C-c ^
>     b. type +, type 40 .
>  6. draw line going right to left
>     a. C-c <
>     b. type +, type 40 .
>     c. gaps are introduced between sequences of .
> 
> Expected result is a rectangle with no gaps on the top side.

This was because in Emacs 25 picture-mode started to use string-width,
which is inaccurate when TAB characters are inserted into the buffer.

Now fixed on the emacs-30 release branch.