dotemacs/simplenote.el — pull request #2 by alpha22jp (2014-11-14 14:20:48+00:00)
Title: Added a function to sync a specified note

Dear dotemacs,

I want a command to sync only one note because _simplenote-sync-notes_ takes a bit long time when there are many notes since it always get indexes for all notes first. But so far _simplenote-push-buffer_ and _simplenote-pull-buffer_ are available only to a note created by _simplenote-create-note-from-buffer_.

So I modified those functions so they can be used to sync a note which isn't created by _simplenote-create-note-from-buffer_. Now they behave as below.

**simplenote-push-buffer**
1. If _simplenote-key_ is set, it works as the original function.
2. If _simplenote-key_ is not set and the note is located on existing notes dir, set _simplenote-key_ from the file name and do the same thing as 1.
3. If _simplenote-key_ is not set and the file is located on new notes dir, do _simplenote-create-new-note_ and then rename and move it into existing notes dir.
4. Otherwise, just output error message.

**simplenote-pull-buffer**
1. If _simplenote-key_ is set, it works as the original function.
2. If _simplenote-key_ is not set and the note is located on existing notes dir, set _simplenote-key_ from the file name and do the same thing as 1.
3. Otherwise, just output error message.

I believe these changes are useful for most users :smiley: