Notes-mode: 3. Advanced Features

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 3. Advanced Features

Notes-mode, the minutiae, and some other good stuff.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 3.1 Notes files

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 3.1.1 Getting around

Moving between notes entries and around the hierarchy is fairly common, so there are some accelerators.

`C-c C-i`

  Jump to the index entry for the current entry’s subject (`notes-goto-index-entry`).

`C-c C-n`
`C-c C-p`

  Move to the next or prior note with the same subject (`notes-follow-next-link` and `notes-follow-prev-link`). These functions follow the links in the note, if they’re defined. If not, they look through the index file. This approach usually works, but will fail if there are multiple new entries created with the given subject between when the index is recomputed.

`C-c<RTN>`

  Follow the link under the point (`notes-w3-follow-link`), a keyboard equivalent of <S-mouse-2>.

`M-C-a`
`M-C-e`

  Jump to the beginning or end of the current note entry (`notes-beginning-of-defun` and `notes-end-of-defun`).

`C-c C-k`

  Copies the pseudo-URL for the current note into the kill-ring (`current-url-as-kill`). To link two entries, go to the target, grab its URL with `C-c C-k`, go to where you want to make the link, and yank the URL with `C-y`.

Notes mode supports imenu, if you have it bound to something (I use `(global-set-key [down-mouse-3] 'imenu)`).

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 3.1.2 Subject summary

It’s often helpful to look at all entries for a given subject `C-c C-s` collects all entries with the subject of the current entry in a new buffer (`notes-summarize-subject`).

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 3.1.3 Encryption

Notes occasionally contain private material. While Unix has strong services for file protection (compared to other, say, more wide-selling operating systems), in many systems root passwords are shared, while other systems are vulnerable to physical compromise. In such systems, properly used encryption is the best approach to security.

Notes-mode encryption is based Phill Zimmerman’s PGP (Pretty Good Privacy) (see ‘`http://www.mantis.co.uk/pgp/pgp.html`’) and requires either EasyPG (installed with emacs-24) or or LoPresti and Choi’s mailcrypt (from ‘`http://cag-www.lcs.mit.edu/mailcrypt/`’).

`C-c C-e`

  Encrypt the current note (`notes-encrypt-note`). By default this function encrypts the whole entry. With a prefix argument, only the part from the point to the end of the entry is encrypted.

`C-c C-d`

  Decrypt the current note (`notes-decrypt-note`).

By default notes-mode determines your public key by asking you. You can override this default by setting `notes-encryption-key-id` to the desired key-id (usually 8 hex digits).

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 3.1.4 Useful conventions

There are a number of conventions which can make notes-mode easier to use. These conventions are a matter of personal taste, of course. Do what works for you.

First, I find it helpful to keep the date of each notes-file at the top of the file. This makes the file self-identifying if the filename is lost.

Second, I find it useful to have the first entry of each file have the same subject (perhaps “Today”). This entry then links all notes together, making it easy to go to yesterday and tomorrow. I keep a to-do list on this entry, bringing the list forward each day.

A third useful convention is to keep an entry with the name based on the day of the week in each file. Analogous to “Today”, this entry links together weeks.

Notes-mode supports these conventions. When you make a new notes-file in emacs, notes-mode searches for the preceding file. If it follows any of these conventions, the new file is initialized appropriately. Currently the approach to do this process (in the program ‘`mknew`’) is fairly sensitive, so it may not work in all cases. In particular, the date convention works only on for English-language dates. (If you use notes-mode with a non-English language, let me know and I’ll work with you to fix this limitation.)

If you find other helpful conventions, please let me know. Modifications to ‘`mknew`’ to implement new conventions are also invited.

If you don’t want to use these conventions, or if you want to use different ones, set the emacs variable notes-mode-initialization-program to nil or the name of your initialization program.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 3.2 Notes indices

Only two features of notes index mode haven’t yet been described. First, you can open any notes-file based on date with `notes-index-link`, normally bound to <o>.

Second, you can get a subject-summary with <C-c C-s> (see section Subject summary). The subject defaults to that of the current index line.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 3.3 Notes-mode configuration

Several aspects of notes mode are particularly visible to the user. Because I’m not a fascist, a user can change most of these.

Preferences are specified in ‘`~/.notesrc`’. This file lists things to change:

    # lines beginning with a hash are comments
    dir: ~/NOTES
    int_form: %Y%m

Currently, two things can be changed:

`dir`

  Specifies the root of the notes directory hierarchy (see section The notes directories).

`int_form`

  Specifies the form of the intermediate directory. A limited subset of `strftime(3)` formatting is allowed.

The subset of `strftime(3)` supported in `int_form` is:

`%Y`

  The four-digit year.

`%y`

  The two-digit year.

`%m`

  A two-digit numeric month.

`%d`

  A two-digit day.

In addition to ‘`.notesrc`’, there are a number of emacs-specific variables. These variables are documented in the file ‘`notes-variables.el`’.

[ << ] | [ >> ] |  |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated on December 19, 2014 using texi2html 1.82.