unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Identifying the face between STRETCH and right fringe.
@ 2018-11-20 16:39 Keith David Bershatsky
  2018-11-20 17:20 ` Eli Zaretskii
  0 siblings, 1 reply; 41+ messages in thread
From: Keith David Bershatsky @ 2018-11-20 16:39 UTC (permalink / raw)
  To: Emacs Devel

Step 1:  Open a buffer and evaluate:

(fundamental-mode)
(setq word-wrap t)
(setq buffer-display-table (make-display-table))
(aset buffer-display-table
      ?\t
      (vector (make-glyph-code ?\u00BB 'font-lock-warning-face)
              (make-glyph-code ?\t 'highlight)))

Step 2:  On a new line, type C-q TAB and then hold down the semi-colon key ';' to repeat the semi-colon character until it carries over to the next line.

Step 3:  Observe that the result is different on Emacs --with-ns, versus --with-x and also on a Windows machine.  Specifically, the STRETCH on an NS platform is seen spanning all the way to the right fringe.  On an X11 and NT platform, the STRETCH is only visible for the width of the STRETCH (depicted in the dump-glyph-row for each platform below).

EXAMPLE NS (OSX):  https://www.lawlist.com/images/tab_stretch_ns__2018_11_20.png

EXAMPLE WINDOWS:  https://www.lawlist.com/images/tab_stretch_nt__2018_11_20.png

EXAMPLE X11:  https://www.lawlist.com/images/tab_stretch_x11__2018_11_20.png

QUESTION #1:  In terms of identifying the face between the STRETCH and the right fringe, how can I programmatically know the difference between the NS situation, versus the NT and X11 situation?

QUESTION #2:  Is the difference in behavior between the different platforms "a bug", and should the X11 and NT ports be "fixed" so that they behave like the NS port in this situation?

BACKGROUND:  In the context of feature request #17684 (crosshairs); I am drawing vertical/horizontal lines on the screen using the built-in draw cursor mechanisms.  When there is no glyph at the desired location, I simply draw/erase a vertical/horizontal line with the desired color.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(fundamental-mode)
(setq word-wrap t)
(setq buffer-display-table (make-display-table))
(aset buffer-display-table
      ?\t
      (vector (make-glyph-code ?\u00BB 'font-lock-warning-face)
              (make-glyph-code ?\t 'highlight)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; NS

Row     Start       End Used oE><\CTZFesm     X    Y    W    H    V    A    P
==============================================================================
 11       384       385    2 010010101000     0  176   56   16   16   12   12
           -1        -1	    0
           -1        -1
           -1        -1
 Glyph#  Type       Pos   O   W     Code      C Face LR
      0     C       384   B   7 0x0000bb      .   30 00
      1     S       384   B  49 0x000000          29 00

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; X11

Row     Start       End Used oE><\CTZFesm     X    Y    W    H    V    A    P
==============================================================================
 11       384       385    2 010010100000     0  165   64   15   15   12   12
           -1        -1     0
           -1        -1
           -1        -1
 Glyph#  Type       Pos   O   W     Code      C Face LR
      0     C       384   B   8 0x0000bb      .   33 00
      1     S       384   B  56 0x000000          26 00

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; NT

Row     Start       End Used oE><\CTZFesm     X    Y    W    H    V    A    P
==============================================================================
 12       385       386    2 010010100000     0  192   64   16   16   12   12
           -1        -1     0
           -1        -1
           -1        -1
 Glyph#  Type       Pos   O   W     Code      C Face LR
      0     C       385   B   8 0x0000bb      .   31 00
      1     S       385   B  56 0x000000          30 00

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2018-11-30  8:22 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-20 16:39 Identifying the face between STRETCH and right fringe Keith David Bershatsky
2018-11-20 17:20 ` Eli Zaretskii
2018-11-21  7:44   ` Robert Pluim
2018-11-23 10:04     ` Eli Zaretskii
2018-11-23 13:25       ` Robert Pluim
2018-11-23 13:48         ` Eli Zaretskii
2018-11-23 14:04           ` Robert Pluim
2018-11-23 15:51             ` Eli Zaretskii
2018-11-23 15:58               ` Robert Pluim
2018-11-23 20:33                 ` Eli Zaretskii
2018-11-27  8:56                   ` Robert Pluim
2018-11-27  9:34                     ` Eli Zaretskii
2018-11-27 11:02                       ` Robert Pluim
2018-11-27 11:29                         ` Eli Zaretskii
2018-11-27 13:55                           ` Robert Pluim
2018-11-27 18:55                             ` Eli Zaretskii
2018-11-27 19:14                               ` Robert Pluim
2018-11-27 19:38                                 ` Robert Pluim
2018-11-28  6:03                                   ` Eli Zaretskii
2018-11-28  9:00                                     ` Robert Pluim
2018-11-28  9:42                                       ` Eli Zaretskii
2018-11-28  9:49                                         ` Eli Zaretskii
2018-11-28 13:24                                           ` Robert Pluim
2018-11-28 16:19                                             ` Eli Zaretskii
2018-11-28  7:13                                 ` Eli Zaretskii
2018-11-28  8:36                                   ` Robert Pluim
2018-11-28  9:45                                     ` Eli Zaretskii
2018-11-28  9:56                                       ` Robert Pluim
2018-11-28 10:11                                         ` Eli Zaretskii
2018-11-28 13:21                                           ` Robert Pluim
2018-11-28 16:20                                             ` Eli Zaretskii
2018-11-29 12:51                                               ` Robert Pluim
2018-11-29 14:15                                                 ` Eli Zaretskii
2018-11-28 21:14                                   ` Alan Third
2018-11-29 12:26                                     ` Robert Pluim
2018-11-29 12:54                                       ` Eli Zaretskii
2018-11-29 13:52                                         ` Robert Pluim
2018-11-29 14:08                                           ` Eli Zaretskii
2018-11-30  7:59                                             ` Robert Pluim
2018-11-30  8:04                                             ` Robert Pluim
2018-11-30  8:22                                               ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).