Skip to content

Commit

Permalink
Change conventions for the local storage of notes in `simplenote-dire…
Browse files Browse the repository at this point in the history
…ctory`

* Notes that exist on the server are placed in the directory `notes/` under
`simplenote-directory`, notes that have been marked locally as deleted are
placed in `trash/`, and new notes that have not been synchronized yet to the
server are placed in `new/`.

* Calling `simplenote-setup` after loading simplenote.el checks the existence of
the sub-directories `notes/`, `trash/` and `new/`, and creates them if they
don't exist.

* Fixes a bug where notes that have been marked locally as deleted are being
downloaded again from the server.
  • Loading branch information
cefstat committed Nov 27, 2009
1 parent 8ff7bfa commit ff1014d
Show file tree
Hide file tree
Showing 2 changed files with 207 additions and 155 deletions.
41 changes: 25 additions & 16 deletions README.markdown
Expand Up @@ -15,31 +15,42 @@ The software is distributed under the GPL license version 2.


## Requirements ## Requirements


This package relies on your system having either `gnutls-cli` or `openssl` in This package relies on your system having a program that can establish secure
order to make secure connections to the Simplenote server. The latter comes connections to the Simplenote serverm, such as `openssl`. `openssl` comes
pre-installed with Mac OS X and (usually) Linux. For Windows you will need to pre-installed with Mac OS X and Linux. For Windows you will need to install
install one of these clients. The `openssl` client appears to be available from `openssl` before using `simplenote.el`. The `openssl` client appears to be
[http://openssl.org/related/binaries.html]() or available from [http://openssl.org/related/binaries.html]() or
[http://gnuwin32.sourceforge.net/packages/openssl.htm]() and `gnutls-cli` from [http://gnuwin32.sourceforge.net/packages/openssl.htm]().
[http://josefsson.org/gnutls4win/]().

If you have `gnutls-cli` installed on your system, then Emacs' `tls.el` will
It is possible to set the command that is used for the secure connection to the first try to use this program to establish a secure connection. This doesn't
Simplenote server by changing the value of the `tls-program` variable. For more work for me. If you have problems with `gnutls-cli` you can either uninstall it,
information consult the documentation for the `tls.el` package. or change the value of the `tls-program` variable. For more information consult

the documentation for the `tls.el` package.
## Installation
## Installation and configuration

**Important note:** If you are already using a version of `simplenote.el` before
Nov. 26 2009, first make sure that your local notes are synced to the
Simplenote server and then do a clean install of `simplenote.el` by removing
the `simplenote-directory` (by default `~/.simplenote`). Then follow the
current installation instructions.


After downloading the package, put the file `simplenote.el` in a directory where After downloading the package, put the file `simplenote.el` in a directory where
Emacs can find it during startup and then add in your `.emacs` the lines Emacs can find it during startup and then add in your `.emacs` the lines


(require 'simplenote) (require 'simplenote)
(setq simplenote-email "email@company.com") (setq simplenote-email "email@company.com")
(setq simplenote-password "yourpassword") (setq simplenote-password "yourpassword")
(simplenote-setup)


where the email and password are the ones that you use to login to the where the email and password are the ones that you use to login to the
Simplenote application. `simplenote.el` keeps a local copy of your notes in a Simplenote application. `simplenote.el` keeps a local copy of your notes in a
directory defined in the variable `simplenote-directory`. Its default value is directory defined in the variable `simplenote-directory`. Its default value is
`~/.simplenote`. `~/.simplenote`. You can change the value of `simplenote-directory` before
calling `simplenote-setup`. The latter checks for the existence of
`simplenote-directory` and some necessary sub-directories and creates these if
they do not exist.


## Usage ## Usage


Expand Down Expand Up @@ -85,8 +96,6 @@ the server respectively.


## Future ## Future


* Improve the documentation.
* Clean up the code.
* Get rid of the need for a **[Refresh]** button. * Get rid of the need for a **[Refresh]** button.
* Handle gracefully the case where there is no connection to the Simplenote server. * Handle gracefully the case where there is no connection to the Simplenote server.


Expand Down

0 comments on commit ff1014d

Please sign in to comment.