simplenote2.el
simplenote2.el copied to clipboard
not all notes are listed
Fresh installed plugin and browsing notes only 6 are shown (I have more than 45) in addition, I can not access any other note than listed
Problem still exists?
Yes, tested on two different machines. Latest Ubuntu both
I found one way around it. I am not sure if this is the correct fix, but here is my finding.
In function: (defun simplenote2--get-index-deferred (&optional index mark)
change this line:
(if (equal (cdr (assq 'deleted (cdr (assq 'd e)))) :json-false)
to this:
(if (not (equal (cdr (assq 'deleted (cdr (assq 'd e)))) 1))
Basically it was filtering on messages that have this attribute: (deleted . :json-false)
but only a few messages have this attribute, so the list was small.
Delete messages seem to have (deleted . 1)
By doing the not
of this test, seems to get all the messages.
I am sure there is a proper fix, but I haven't seen enough messages to determine that.
The problem is that different clients set the value of the deleted
flag differently. The backend accepts both true/false and 1/0 when a note is deleted/updated and for some reason returns this value unchanged when the list is fetched, resulting in a mixture of boolean styles in many cases. So in order to filter the list as intended, one has to treat both ways of representing a boolean as equivalent. Thus the change by @stuartclayman will not work for everyone. Maybe something like this would work instead:
(if (member (cdr (assq 'deleted (cdr (assq 'd e)))) '(:json-false 0))
any fix on this? the mentioned workaround is not working on my pc.
The fix suggested by @bk appears to work with notes shared between emacs, ios, web and electron clients.