bastibe/annotate.el

render overlay as a whole block

randomwangran opened this issue · 7 comments

In a multi-lines note, there will be some blank lines. These
lines will not be render. This will make the notes a little bit
strange looking.

I have post two images to show what I mean.

The first one is the current state. The second one is the desired
state, which I use GIMP to render.

image

2020-12-16_124247

cage2 commented

Hi @randomwangran !

A little question: you added manually (i mean with ^Q ^J two times) the linebreak in the annotation text, right?

Bye!
C.

I use this function to create new line: default-indent-new-line

M-j runs the command default-indent-new-line (found in global-map),
which is an interactive compiled Lisp function in ‘simple.el’.

It is bound to C-M-j, M-j.

(default-indent-new-line &optional SOFT)

Break line at point and indent.
If a comment syntax is defined, call ‘comment-line-break-function’.

The inserted newline is marked hard if variable ‘use-hard-newlines’ is true,
unless optional argument SOFT is non-nil.

Let me know if I am make it clear. Thank you.

cage2 commented

Hi @cage2

c103381 works perfectly on my side!

the rendering of the "box" around the multiline annotated text is
slightly different

Your version is the best. I mocked up just for illustration purpose. No worried about it.

Thanks for your effort!

cage2 commented

I think i am more or less ready to ask for merging, i would like to
thank you in the NEWS file, are you OK with that? How should i mention
you, is "randomwangran" fine?

I've done very little compare to you. It's my pleasure to be mentioned in the NEWS file. You can just call me "Ran".

Thanks again for your contribution.

cage2 commented