Closed fab6 closed 2 years ago
On Sat, Jan 01, 2022 at 09:41:15AM -0800, fab6 wrote:
Hi,
Hi Fab6, and happy new year! :)
may I ask if I can share my annotations e.g. with a colleague? I saw the exporting option, but did not see e.g. any import?
Yes, you are right there is no import feature for the annotation. I think this feature would be a good addition, though! :)
To me importing from the diff file produced by export would be too difficult (likely i would need a patch file format parser, and this would be too much work) and, again in my opinion, not the optimal strategy.
I think more simple would be to import annotations from a database (i.e. the file named 'annotations' that probably you have in your .emacs.d).
In a sense this would be a tool to merge two database[1] but quickly questions arise. What to do if two annotation conflicts? For example if annotation from a database partially overlaps with one or more annotation in the other, many strategy comes in my mind but the safer and less prone to bug (and easier to implement! ;-)) would be to just discard annotations -in the imported database- that overlap with the user's database.
What do you think about this solution? Would be acceptable?
Also let's what bastibe think!
Bye! C.
[1] if you want your colleague to just replace theirs database with yours, overwriting the file will suffice
Thank you for your quick reply... I am not so sure yet, what the best way would be. Your approach to discard overlapping annotations from the import would certainly be one option.
Maybe there is an option two work with two databases; one standard + merged and one solely imported one. And the user could switch the database when needed.
Hi!
Thank you for your quick reply...
Thanks to you for using this library!
I am not so sure yet, what the best way would be. Your approach to discard overlapping annotations from the import would certainly be one option.
OK! I think, i am going to start exploring this way.
Maybe there is an option two work with two databases; one standard + merged and one solely imported one. And the user could switch the database when needed.
There is a command called annotate-switch-db
; maybe this message:
https://github.com/bastibe/annotate.el/issues/68#issuecomment-728218022
could contains useful information to get something similar to what you wrote above?
Bye! C.
It might also be possible to merge overlapping annotations into one longer annotation that contains both messages.
Hi @bastibe
It might also be possible to merge overlapping annotations into one longer annotation that contains both messages.
This is a good idea! And perhaps not too difficult to implement. :) Maybe both strategy could be implemented using a customizable variable to let the user choose their favorite.
Bye! C.
Hi, the merging sounds quite similar to the way word
is doing it with its comments... and it sounds quite powerful.
Hi!
Both of you convinced me that the proposal from @bastibe is the best solution! :)
Bye! C.
Hi!
I am starting to work on this: @fab6 , you are very welcome (if you have time, of course :-)) to check the PR #120 for suggestions or criticism.
Bye! C.
thanks, I will see how much I can help
Hi!
The patch is ready for testing. I checked a couple of scenarios and there was problems that i hope i have fixed with the last commit. But some other bugs could be still hiding! :)
Bye! C.
Hi @fab6 !
I believe that the patch in #120 could implement your suggestion, i am closing this issue for now but if you think there is something wrong with the patch feel free to reopen this report so that we can discuss improvements!
Bye and thanks for the suggestion! C.
Hi, thank you and excuse me, that I could not support directly, I am testing it after my vacation time. Thank you!
Hi @fab6 !
No need to excuse at all! Take your time, and wish you happy vacations! :-) :-) C.
Hi,
may I ask if I can share my annotations e.g. with a colleague? I saw the exporting option, but did not see e.g. any import?
Thank you in advance! Fab