Repository navigation
Description
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(commit47fa15cc69ae8f8da1ca3fac25e0beb700e8c118, source date 2026-10-24) - GNU Emacs
30.2(for comparison) - Linux 7.0.0,
Waylandsession - dirvish
20260725.1520(MELPA), for the real-world case
Steps to reproduce
- Create a
repro.eland 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))- Run:
neomacs -Q -nw -l repro.elandemacs -Q -nw -l repro.el. - Compare the "lp" buffer results between
neomacsandGNU 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
fix(layout): read line-prefix and wrap-prefix from overlays