Subject: bug#32276: closed (Re: bug#32276: char-width of a space is 0 when display-table entry has a face.)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 27 Jul 2018 09:35:02 +0000

Your bug report

#32276: char-width of a space is 0 when display-table entry has a face.

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
32276: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32276
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#32276: char-width of a space is 0 when display-table entry has a face.
From: Eli Zaretskii <[email-masked]>
To: Keith David Bershatsky <[email-masked]>
Cc: [email-masked]
Date: Fri, 27 Jul 2018 12:34:30 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Wed, 25 Jul 2018 20:33:33 -0700
> From: Keith David Bershatsky <[email-masked]>
> 
> EXPECTED RESULT:  The char-width should be 1 in Step 2, just like in Step 4.

Thanks, fixed on the emacs-26 branch.

Subject: char-width of a space is 0 when display-table entry has a face.
From: Keith David Bershatsky <[email-masked]>
To: Emacs Bug Reports <[email-masked]>
Date: Wed, 25 Jul 2018 20:33:33 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Step 1:  Open a newly built GUI version of Emacs master branch.

Step 2:  Open a scratch buffer and evaluate the following code:

;;; char-width == 0
(progn
  (fundamental-mode)
  (setq buffer-display-table (make-display-table))
  (aset buffer-display-table
        ?\s
        (vector (make-glyph-code ?· 'font-lock-warning-face)))
  (char-width ?\s))

Step 3:  The char-width in Step 2 is 0.

Step 4:  In the same or a different scratch buffer, evaluate the following code:

;;; char-width == 1
(progn
  (fundamental-mode)
  (setq buffer-display-table (make-display-table))
  (aset buffer-display-table
        ?\s
        (vector (make-glyph-code ?·)))
  (char-width ?\s))

Step 5:  The char-width in Step 4 is 1.

EXPECTED RESULT:  The char-width should be 1 in Step 2, just like in Step 4.