bastibe / annotate.el

Annotate.el
Other
384 stars 20 forks source link

Annotation without region/word #100

Closed indigoviolet closed 3 years ago

indigoviolet commented 3 years ago

Thank you for this library, it is very useful.

Is it expected that when I call annotate-annotate at end of line or on an empty line, the annotation doesn't get created at all? It is a bit surprising because the prompt shows normally. I would ideally like for the annotation to just be anchored to the end of line.

Note that annotating the beginning-of-line works for me: the annotation anchors to the first space I guess.

cage2 commented 3 years ago

Hi @indigoviolet !

Thank you for this library, it is very useful.

Happy that you appreciate it! :)

Is it expected that when I call annotate-annotate at end of line or on an empty line, the annotation doesn't get created at all?

Yes, this is the expected behaviour, because of the internal design of the library a new line can not be annotated, but note that you can annotate region that contains newline, instead.

It is a bit surprising because the prompt shows normally.

This instead is (my) bad design! ;-) I just added a patch to prevent prompt to shows.

Thank you for your report!
C.

indigoviolet commented 3 years ago

Thanks for the quick update!

indigoviolet commented 3 years ago

Yes, this is the expected behaviour, because of the internal design of the library a new line can not be annotated, but note that you can annotate region that contains newline, instead.

I don't know if it is just me, but even today using the tool I find it very natural to try and add annotations at end-of-line because I'm trying to annotate that whole line (and since my annotations are displayed in the margin, it feels natural). So the fact that this use-case is not supported is a bit inconvenient.

I would suggest that an annotation at the end of line just grab the whole line, or if there's no content on the line, then the nearest line.

bastibe commented 3 years ago

That sounds like an intriguing idea, at least. Perhaps we could add this as optional behavior? A configuration variable could determine weather annotating a newline would annotate the entire line or nothing at all.

cage2 commented 3 years ago

On Sat, Apr 17, 2021 at 08:28:47AM -0700, Bastian Bechtold wrote:

Hi everyone!!

That sounds like an intriguing idea, at least. Perhaps we could add this as optional behavior? A configuration variable could determine weather annotating a newline would annotate the entire line or nothing at all.

I like both ideas too! I mean optionally (using a variable as you wrote) annotate whole line if newline is selected as annotated text, i see this as a good feature for sure!

Bye! C.

cage2 commented 3 years ago

Hi everyone!

I am merging this branch, this should fix #104 #102 and #100

Thanks again to everyone for help, comments and support!

Bye! C.