bastibe / annotate.el

Annotate.el
Other
384 stars 20 forks source link

render overlay as a whole block #90

Closed randomwangran closed 3 years ago

randomwangran commented 3 years ago

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 3 years ago

Hi @randomwangran !

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

Bye! C.

randomwangran commented 3 years ago

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 3 years ago

On Thu, Dec 17, 2020 at 10:11:56AM -0800, randomwangran wrote:

Hi randomwangran!

I just pushed some modification to add this feature on the package.

May i ask to do some testing if it works fine or not? Thanks in advance! C.

NB: the rendering of the "box" around the multiline annotated text is slightly different from the mock up you posted as i do not extend the background (i mean, non printable text with "coral" as background color) to the border of the window (this could results in rendering if the window is shrunk even by single column), but just enough to wrap the text.

randomwangran commented 3 years ago

Hi @cage2

c103381862f5124e5871c37282e67f3d2e0c588a 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 3 years ago

On Sun, Dec 20, 2020 at 08:18:17AM -0800, randomwangran wrote:

Hi @cage2

Hi!

c103381862f5124e5871c37282e67f3d2e0c588a 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!

My pleasure! :)

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?

Bye! C.

randomwangran commented 3 years ago

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 3 years ago

On Sun, Dec 20, 2020 at 10:44:59AM -0800, randomwangran wrote:

Hi!

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.

You suggested two new features (and with good explanation, i would say) and helped with testing. I think the mention is well deserved! :)

Bye! C.