Skip to content

Cannot see where Point is when it is on the edge of an Org table #252

@mbarton98

Description

@mbarton98

I have been using org-modern with the following config for a while now.

(use-package org-modern
  :ensure t
  :config
  (setq org-modern-tag t)
  (setq org-modern-todo nil)
  (setq org-modern-table t)
  (setq org-modern-keyword nil)
  (setq org-modern-timestamp nil)
  (setq org-modern-block-name nil)
  (with-eval-after-load 'org (global-org-modern-mode)))

I had noticed at times when switching buffers that I would have a hard time locating Point. I would use C-n or C-p to move Point, but not see it sometimes. Today I finally noticed it was when Point was on the edge of a table. I did not see any issues logged here, so I started gptel and asked ChatGPT what it thought about the describe-char on the vertical bar. The answer about the display text property sounds reasonable.

Now that I'm aware of it, I can just try moving Point forward instead to get it off the edge of a table or temporarily toggle org-modern-mode.

-----ChatGPT question
In Emacs, what would prevent the Point from blinking when on a vertical bar?

Below is the output of describe-char

             position: 1342202 of 1833452 (73%), column: 0
            character: | (displayed as |) (codepoint 124, #o174, #x7c)
              charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x7C
               script: latin
               syntax: _    which means: symbol
             category: .:Base, a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET 7c" or "C-x 8 RET VERTICAL LINE"
          buffer code: #x7C
            file code: #x7C (encoded by coding system utf-8-unix)
              display: by this font (glyph code):
    mac-ct:-*-Fira Code-regular-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#x52F)

Character code properties: customize what to show
  name: VERTICAL LINE
  old-name: VERTICAL BAR
  general-category: Sm (Symbol, Math)
  decomposition: (124) ('|')

There are text properties here:
  display              (space :width (3))
  face                 (:inherit org-table :inverse-video t)
  fontified            t
  line-prefix          #("      " 0 6 (face org-indent))
  wrap-prefix          #("      " 0 6 (face org-indent))

This char was set by org-modern-mode to make org table borders look
solid. If I turn off that mode the Point will appear again.

-----ChatGPT answer
The point in Emacs may not blink on a vertical bar due to the display
property applied to that character. In the describe-char output you
provided, we see that the vertical bar character has a display
property set to (space :width (3)). This property effectively replaces
the character with a custom space of a specific width, which may obscure
the point.

When text has a display property that alters how it's rendered, it can
lead to situations where the point doesn't appear to blink because the
character's visual representation is different.

To resolve this, you could either:

  1. Remove or modify the display property for that character.
  2. Change the org-modern-mode settings to not use a display property
    for that character, if possible.

To view the blinking point, you'll need to ensure that no such display
properties are interfering with the normal rendering of the point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions