Closed indigoviolet closed 3 years ago
Hi!
Very good catch! Fixed in #102 (or so i hope!). ;-)
Bye! C.
@cage2 - Thank you for your work on this! I just pulled #102 and tested this, and now I see that the annotation file is still saved, but it contains the text nil
.
Hi @indigoviolet !
I have checked the issue but the last version of the package seems not to be affected by this problem, may i ask to recheck using this use case?
(setq annotate-file "/a/file")
annotate a file
save the annotated file
check that the annotation database contains an entry like:
(("~/an/annotated/file" ((90530 90548 "annotation text" "annotated-text")) "hex-digits"))
nil
Thank you!
C.
@cage2 That is the behavior I see as well.
But I think it is a bit inconvenient even to have nil
in the annotation database file, because it means that if I open a file with annotate-mode
on, then saving that file will lead to an empty annotation database file even if I never added any annotations.
So there are two cases:
annotate-mode
on -> ideally no database file should be creatednil
containing) annotation database file. Anyway, I'm also fine with shipping #102 as is for now - you have improved a lot of things in that PR! This is not such a big deal for me.
Hi!
@cage2 That is the behavior I see as well.
Sorry i did not read your previous message properly! :(
But I think it is a bit inconvenient even to have
nil
in the annotation database file, because it means that if I open a file withannotate-mode
on, then saving that file will lead to an empty annotation database file even if I never added any annotations.So there are two cases:
I never added any annotations and saved a buffer with
annotate-mode
on -> ideally no database file should be createdI removed all annotations from a buffer that previous had them, and the annotation database file was previously created -> in this case I don't feel that strongly but it would be nice to remove the ("empty" ==
nil
containing) annotation database file.
Well honestly i would prefer to not overload meanings of the existence of a file as synonym for "empty database", we could rather use this for: "this is the first time annotate mode has been activated". But, anyway, i think my preference is matter of personal tastes as my arguments are pretty weak as you can see :)
Anyway, I'm also fine with shipping #102 as is for now - you have improved a lot of things in that PR! This is not such a big deal for me.
Thank you! I am going to merge the branch in a minute. C.
fixed by #102
Could we leave this open? I still think it's inconvenient for empty database files to be created when no annotations have been created - perhaps it's helpful to explain why:
annotate-file
a buffer-local like <filename>.annotate
In this scenario, every single file I open and save creates an empty .annotate
file, which I would like to avoid.
Hi!
Sure, i am reopening the issue! What you have written seems quite valid points to me. 👍
Bye! C.
Hi @indigoviolet !
May i ask to check if PR #107 solve this issue?
Thank! C.
will try and check soon, thank you!
On Fri, May 7, 2021, 6:39 AM cage2 @.***> wrote:
Hi @indigoviolet https://github.com/indigoviolet !
May i ask to check if PR #107 https://github.com/bastibe/annotate.el/pull/107 solve this issue?
Thank! C.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bastibe/annotate.el/issues/104#issuecomment-834400179, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA32WTXIEEVY2V64WLBH6LTMPUR3ANCNFSM43G755KA .
Hi!!
will try and check soon, thank you!
Good! Looking forward for your comments!
Bye! C.
Hi!
Fixed by #107
Bye! C.
I noticed the source code appears to prevent this, but I see files containing no annotations like this
Note that I have customized
annotate-file
to be local to the file. Is this a bug?