[[https://www.notion.so][Notion]] is a web-based application with a similar purpose. It works well on all platforms and has some cool features including databases, realtime collaboration, and as of 2021 an [[https://developers.notion.com/][official API]].
=org-notion= is an Emacs package that uses this API to integrate the beauty of Notion with your Org-mode workflow.
** Status
state :: ON HOLD This package is not yet complete. I plan to continue development in the next few months but am open to contribs and chatting about design/features in the meantime. Check the [[*Dev Log][Dev Log]] for updates.
TODO Introduction
Design This package wraps the full Notion API with support for all web requests and object types. The requests are dispatched via the methods specializing on the =org-notion-request= EIEIO class instance. The responses are parsed to create a subclass instance of =org-notion-object= which contain the actual contents as =org-notion-rich-text= instances. This is the low-level interface which can be hacked to your liking.
All classes are shown below. There's an abstract =org-notion-class= which all classes inherit as well as a special =org-notion-cache= class which stores a cache of =org-notion-object= instances.
org-notion-class
+--org-notion-request
+--org-notion-cache
+--org-notion-object
| +--org-notion-block
| +--org-notion-page
| +--org-notion-database
| +--org-notion-user
+--org-notion-rich-text
| +--org-notion-inline-equation
| +--org-notion-inline-mention
| +--org-notion-inline-text
The parsing is achieved with the help of [[https://orgmode.org/worg/dev/org-element-api.html][org-element]] and [[https://github.com/emacs-mirror/emacs/blob/master/lisp/json.el][json.el]]. An =org-notion-mode= minor-mode is provided for interacting with the API from an Org buffer and custom properties are used to keep headlines/files in sync with their Notion counterparts.
git clone https://github.com/richardwesthaver/org-notion
hg clone https://hg.rwest.io/org-notion
and make sure your =load-path= is setup correctly in your config:
(add-to-list 'load-path "/path/to/org-notion")
Now you can load the package with:
(require 'org-notion)
This package will be uploaded to MELPA upon reaching v1.0.0.
When running a command for the first time such as =org-notion-get-users= you will be prompted for your token. This is cached internally for future calls but will not persist across sessions (after restarting the emacs daemon).
The default behavior is to first check with [[https://www.gnu.org/software/emacs/manual/html_mono/auth/index.html][auth-sources]] before sending requests (=~/.authinfo= or =~/.authinfo.gpg=). This is highly recommended as it avoids the prompt and is more secure. You can disable the check if you wish to temporarily use a different token with =(setq org-notion-check-auth-source nil)=.
(add-hook 'org-mode-hook #'org-notion-mode)
You can customize the keymap =org-notion-mode-map= to your liking. The defauls are show below.
| key | function | description | |-----------+---------------------+---------------------------------| | C-c n p | org-notion-push | Push local changes to Notion | | C-c n f | org-notion-pull | Pull remote changes from Notion | | C-c n o | org-notion-browse | Open Notion page in browser | | C-c n r s | org-notion-search | Search Notion | | C-c n r u | org-notion-get-user | Get Notion Users |