Seam tutorial
Installation
To install Seam, clone https://git.plexwave.org/seam
and add it to
your load-path
.
If you’re using Windows and don’t have the Unix find
and grep
commands, you will need to install them.
Basic setup
To use Seam, you must set seam-note-directory
. There is no default.
For our purposes I highly recommend using an empty directory. Seam
can create it if it doesn’t exist.
You should also bind seam-prefix-map
to a key of your choice. It’s
recommended to do this with use-package
, as it can autoload the Seam
package for you. Otherwise, you’ll need to put (require 'seam)
in
your init.el
.
(use-package seam
:load-path "path/to/seam"
:bind-keymap* ("C-c s" . seam-prefix-map))
I will use <S> to mean whatever key you’ve bound the prefix map to.
Create a note
Press <S> f and enter Hello, world!
. This will create a
note like so:
* Hello, world!
This note will automatically be saved to your note directory at
private/hello-world.org
.
When you create your first note, you should get a prompt about
potentially unsafe local variables. Seam requires a directory-local
hook to work properly, and you’ll have to press !
to permanently
accept this.
Export it
Let’s set up seam-export-alist
so Seam knows which notes to export
and to where.
(setq seam-export-alist
'(("/tmp/seam-tutorial"
:types ("public"))))
Here we are specifying the desired output directory for our HTML files, and the note types that will be exported.
By default, Seam defines two note types: private and public. New notes default to being private, so this is an opt-in approach to exporting.
Now, press <S> t and enter public
. This will make it a
public note and export it automatically. Visit
file:///tmp/seam-tutorial/hello-world.html
in your web browser to
check it out!
Setting it to private will delete the HTML file again.
Link to another note
Press <S> l and enter a new title to create another note.
Experiment with setting each note to public or private. An outgoing link is only present in the HTML when the link’s target is public. The Backlinks section will likewise only show incoming links from public notes.
Rename a note
Edit the title headline of the note you just created. Whenever you save it, these things will happen:
- The note buffer and file will be renamed.
- All notes that are linked to it will be re-exported.
If you try titling it something like “hello world…”, its filename would conflict with our first note, and Seam will not let you save. This is something that rarely comes up in practice, but it’s good to know about.
Delete a note
Press <S> k to delete a note, kill its buffer, and remove any associated HTML files. As with renaming, any other affected notes are re-exported.
Search notes
The final command to mention is <S> s. It works like
grep-find
to search your note directory for a given regexp.
Edited