Skip to content

[Bug]: line-prefix overlay property is not rendered (text-property line-prefix works) #780

Closed

Description

@ChanaMasa

Bug summary

In neomacs, the line-prefix property set on an overlay is never displayed. The same property set as a text property is displayed, and so is an overlay before-string. GNU Emacs 30.2 displays all three.

This breaks dirvish's subtree view (dirvish-subtree-toggle). Dirvish indents expanded subdirectories only through an overlay line-prefix (dirvish-subtree.el, dirvish-subtree--insert), so in neomacs nested entries show up as a flat list at the same level as their parent.

Environment

  • neomacs 0.0.20 (commit 47fa15cc69ae8f8da1ca3fac25e0beb700e8c118, source date 2026-10-24)
  • GNU Emacs 30.2 (for comparison)
  • Linux 7.0.0, Wayland session
  • dirvish 20260725.1520 (MELPA), for the real-world case

Steps to reproduce

  1. Create a repro.el and save it locally:
;;; -*- lexical-binding: t -*-
(switch-to-buffer (get-buffer-create "lp"))
(insert "A-plain\n")
(let ((b (point))) (insert "B-overlay-line-prefix\n")
  (overlay-put (make-overlay b (point)) 'line-prefix ">>>>"))
(let ((b (point))) (insert "C-textprop-line-prefix\n")
  (put-text-property b (point) 'line-prefix "####"))
(let ((b (point))) (insert "D-overlay-before-string\n")
  (overlay-put (make-overlay b b) 'before-string "@@@@"))
(goto-char (point-min))
  1. Run: neomacs -Q -nw -l repro.el and emacs -Q -nw -l repro.el.
  2. Compare the "lp" buffer results between neomacs and GNU emacs.

Expected behavior

Expected (GNU Emacs 30.2)

A-plain
>>>>B-overlay-line-prefix
####C-textprop-line-prefix
@@@@D-overlay-before-string

Actual (neomacs 0.0.20)

A-plain
B-overlay-line-prefix
####C-textprop-line-prefix
@@@@D-overlay-before-string

Neomacs --version output

❯ neomacs --version
Neomacs 0.0.20
Git commit: 47fa15cc69ae8f8da1ca3fac25e0beb700e8c118
Source date: 2026-10-24T15:13:18.000000000-04:00
Build: release-pgo for x86_64-unknown-linux-gnu with rustc 1.96.1
Standalone Rust binary for Neomacs (no C dependency)

For reference: 
❯ emacs --version
GNU Emacs 30.2
Copyright (C) 2025 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Platform

Linux (Wayland)

Install source

Prebuilt release asset (downloaded from Releases)

Extra context

Variants tested in neomacs

Case Result
overlay line-prefix, string Not shown
overlay line-prefix, propertized string (with face) Not shown
overlay line-prefix covering several lines Not shown on any line
overlay line-prefix + integer text-property line-prefix on the same lines (what dirvish does) Not shown
overlay line-prefix with window-start inside the overlay Not shown
text-property line-prefix, string Shown
overlay before-string Shown

GUI frame, same file (x position from posn-at-point of the first character of each line):

Line Emacs 30.2 neomacs 0.0.20
A (no prefix) 0 0
B (overlay line-prefix) 64 0
C (text-property line-prefix) 64 35
D (overlay before-string) 64 35

Real-world impact: dirvish subtree

emacs -Q/neomacs -Q -nw with dirvish loaded. Expand top, then top/mid, with dirvish-subtree-toggle (./.. lines omitted below):

Emacs 30.2:

   top
 │   a.txt
 │   mid
 │ │   b.txt
 │ │   deep

neomacs 0.0.20:

   top
   a.txt
   mid
   b.txt
   deep

Workaround

Add an advice that draws the same prefix with per-line before-string overlays:

(defun my/dirvish-subtree-neomacs-prefix (&rest _)
  (when-let* ((ov (car dirvish-subtree--overlays))
              (prefix (overlay-get ov 'line-prefix)))
    (save-excursion
      (goto-char (overlay-start ov))
      (while (< (point) (overlay-end ov))
        (let ((o (make-overlay (point) (1+ (point)))))
          (overlay-put o 'before-string prefix)
          (overlay-put o 'evaporate t))
        (forward-line 1)))))
(advice-add 'dirvish-subtree--insert :after #'my/dirvish-subtree-neomacs-prefix)

wrap-prefix on overlays was not tested and may be affected in the same way.

Activity

  1. added
    bug
    status: needs-triage
    on Nov 15, 2026
  2. added a commit that references this issue on Nov 16, 2026
    24ff782
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugstatus: needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions