forked from cursorless-everywhere/emacs-cursorless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HAT IDEAS
32 lines (28 loc) · 1.22 KB
/
HAT IDEAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
- svg-of-character
but alignment and styling are hard then
- hack emacs C code to allow overlaying svgs on characters
not clear how practical this is.
- OVERLAYS BEFORE EACH LINE
see also: https://www.gnu.org/software/emacs/manual/html_node/elisp/Line-Height.html
https://www.gnu.org/software/emacs/manual/html_node/elisp/Special-Properties.html
see line-height, line-spacing, line-prefix
- negative width spaces?
https://www.gnu.org/software/emacs/manual/html_node/elisp/Specified-Space.html
(defun put-before-line ()
(interactive)
(clear-overlays)
(let* ((pos (save-excursion (beginning-of-line) (point)))
(overlay (make-overlay pos pos))
(face '(;(:height 120)
(:background "lightgrey")))
(text (copy-sequence "x\n"))
(image (let* ((w (window-font-width))
(svg (svg-create w w)))
(svg-circle svg 0 0 w)
(svg-image svg :scale 1))))
(message "%s" image)
(put-text-property 0 (length text) 'face face text)
(put-text-property 0 (length text) 'line-height t text)
(put-text-property 0 1 'display image text)
(overlay-put overlay 'cursorless t)
(overlay-put overlay 'before-string text)))