summaryrefslogtreecommitdiff
path: root/HTML/notes-mode_2.html
blob: 470a21a0b248ad2cc9e39f90a954bc16fe32333a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on December 19, 2014 by texi2html 1.82
texi2html was written by: 
            Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>Notes-mode: 2. Basics</title>

<meta name="description" content="Notes-mode: 2. Basics">
<meta name="keywords" content="Notes-mode: 2. Basics">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Basics"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="notes-mode_1.html#Staying-on-top" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Getting-started" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="notes-mode_1.html#Introduction" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="notes-mode.html#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_3.html#Advanced-Features" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="notes-mode.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_6.html#Keystroke-index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Basics-1"></a>
<h1 class="chapter">2. Basics</h1>

<p>All you need to use notes-mode
 in a chapter.
(Except for installation, See section <a href="notes-mode_5.html#Installation">Installation</a>.)
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Getting-started">2.1 Getting started</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">             
</td></tr>
<tr><td align="left" valign="top"><a href="#A-notes-file">2.2 A notes file</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">                
</td></tr>
<tr><td align="left" valign="top"><a href="#The-notes-index">2.3 The notes index</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">             
</td></tr>
<tr><td align="left" valign="top"><a href="#The-notes-directories">2.4 The notes directories</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">       
</td></tr>
</table>

<hr size="6">
<a name="Getting-started"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Basics" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#A-notes-file" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Basics" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Basics" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_3.html#Advanced-Features" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="notes-mode.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_6.html#Keystroke-index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Getting-started-1"></a>
<h2 class="section">2.1 Getting started</h2>
<a name="index-notesinit"></a>
<a name="index-setup"></a>

<p>To get started with notes-mode,
 read the introduction this chapter,
 then either:
</p>
<ul>
<li>
Start emacs, do 
 <kbd>M-x</kbd> <code>load-library</code> <kbd>RET</kbd> <code>notes-mode</code> <kbd>RET</kbd>
This approach will set up notes-mode with the default parameters.

</li><li>
OR, from the shell, 
 run the program &lsquo;<tt>notesinit</tt>&rsquo;.
This approach will ask you some questions about how you want to configure
 notes mode.

</li></ul>

<p>Either way these should set up everything notes-mode needs.
This program will modify your environment (as described in this section),
 or it will give you the exact commands you should run yourself.
</p>
<p>After you&rsquo;ve done one of these,
 start up emacs and note-away.
I usually begin a
 day of note-taking by running the command
 <kbd>M-x</kbd> <code>notes-index-todays-link</code>
 to jump directly to today&rsquo;s note.
You may even wish to bind this to something,
 perhaps with
 <code>(define-key global-map &quot;\C-cn&quot; 'notes-index-todays-link)</code>
 in your &lsquo;<tt>.emacs</tt>&rsquo;. 
</p>
<p>If you want to browse your existing notes,
 you might instead want to edit the
 &lsquo;<tt>~/NOTES/index</tt>&rsquo;.
(What is a notes file and the index? Hurry up and finish
 reading this chapter.) 
</p>

<hr size="6">
<a name="A-notes-file"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Getting-started" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#The-notes-index" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Basics" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Basics" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_3.html#Advanced-Features" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="notes-mode.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_6.html#Keystroke-index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="A-notes-file-1"></a>
<h2 class="section">2.2 A notes file</h2>

<a name="index-Notes-files"></a>

<p>The notes file is the focus of most of the activity in notes-mode,
 it&rsquo;s where you take your notes.
Notes files are mostly free-form text
 broken up into <em>entries</em>.
Here&rsquo;s an example:
</p>
<a name="index-Notes-entries"></a>

<table><tr><td>&nbsp;</td><td><pre class="example">8-Jun-95 Thursday
-----------------

* Today
-------
prev: &lt;none&gt;
next: &lt;file:///~/NOTES/199506/950609#* Today&gt;

next week - release notes-mode


* Environment/notes
-------------------

I explained notes mode to Ashvin and Geoff.
...
</pre></td></tr></table>

<p>Each entry has a subject-block, (maybe) some links, and then (maybe) some text.
</p>
<p>The subject-block must begin with an asterisk-space (<kbd>* </kbd>)
 at the beginning of a line, followed by the subject itself.
Subjects must be underlined with a row of dashes
 (if they&rsquo;re not exact, that&rsquo;s OK;
 notes-mode will fix them periodically).
For convenience,
 notes-mode will automatically add the underlines when you
 hit <kbd>&lt;RTN&gt;</kbd> (<code>notes-electric-return</code>),
 and <kbd>&lt;TAB&gt;</kbd> on a partially completed subject will
 invoke completion based on indexed subjects (<code>notes-complete-subject</code>).
<a name="index-Notes-subjects"></a>
<a name="index-RTN"></a>
<a name="index-TAB"></a>
</p>
<p>Following the subject may be links.
(In the example, the &ldquo;Today&rdquo; entry has links,
 the &ldquo;Environment/notes&rdquo; entry doesn&rsquo;t.)
These links will be automatically updated by notes-mode
 when your notes are re-indexed;
 just leave a blank line when writing the note.
<a name="index-Notes-links"></a>
</p>
<p>Links are made with pseudo-URLs,
 sort of like those in the World Wide Web. 
Any of these URLs can be followed in notes-mode files
 by clicking <kbd>S-mouse-2</kbd> on the pseudo-URL
 (<code>notes-w3-follow-link-mouse</code>).
<a name="index-Pseudo_002dURLs"></a>
<a name="index-URLs"></a>
<a name="index-S_002dmouse_002d2"></a>
</p>
<p>Finally comes the text.
Go wild, but just don&rsquo;t include text that looks like a subject.
You can embed pseudo-URLs to link notes together manually.
</p>
<p>The more anal of you may have noticed
 that the lines before the first subject
 are not part of any entry.
These lines are
 <em>front matter</em>.
They&rsquo;re not usually used for much,
 but they can be a good place to label the file.
<a name="index-Notes-files_002c-font-matter"></a>
<a name="index-Font-matter"></a>
</p>
<p>There are a number of useful conventions
 that can be adopted to organize your notes.
The most common is the &ldquo;Today&rdquo; entry.
If you keep an entry with the same subject
 at the beginning of each file,
 you link all of your notes together.
Notes-mode will help you out with some of these convetions
 by automatically creating or copying some fields for you;
 see see section <a href="notes-mode_3.html#Useful-conventions">Useful conventions</a> for details.
</p>
<p>Finally, notes-mode can also work with outline-minor-mode
 (thanks to Tim Carroll for pointing this out).
Outline-mode supports hiding and revealing text and other helpful
 features beyond the scope of this document.
See <a href="${EMACS}/html_mono/emacs.html#Outline-Mode">Outline Mode: (emacs)Outline Mode</a> section &lsquo;Outline Mode&rsquo; in <cite>The Emacs Editor</cite>, for details.
</p>
<hr size="6">
<a name="The-notes-index"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#A-notes-file" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#The-notes-directories" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Basics" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Basics" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_3.html#Advanced-Features" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="notes-mode.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_6.html#Keystroke-index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="The-notes-index-1"></a>
<h2 class="section">2.3 The notes index</h2>

<a name="index-Notes-index"></a>

<p>The notes index lists all subjects you&rsquo;ve kept notes about,
 and each date of each note.
Impress your friends,
 show your advisor why you&rsquo;re worth the <em>big</em> peanuts,
 you&rsquo;ll soon have the biggest index of all.
</p>
<p>The index has one line per subject, listing the subject
 and each day a note was made about that subject.
For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">Bicycle: 950314, 950316
Bicycle/maintenance/books: 951028
Bridge/hands: 951113, 951114, 951116, 951117
Bridge/UCLA: 960222, 960409
</pre></td></tr></table>

<p>Clicking on any of the dates with <kbd>mouse-2</kbd>
 will take you to that note
 (<code>notes-index-mouse-follow-link</code>).
(You can also move the point over the date and hit <kbd>&lt;RTN&gt;</kbd>
 if you&rsquo;re musaphobic [<code>notes-index-follow-link</code>].)
<a name="index-mouse_002d2"></a>
<a name="index-RTN-1"></a>
</p>
<p>The notes index is automatically updated by the program &lsquo;<tt>mkall</tt>&rsquo;.
Typically &lsquo;<tt>mkall</tt>&rsquo; is run nightly by &lsquo;<tt>cron</tt>&rsquo;.
On most modern versions of Unix, you can add this command to cron by
 running &lsquo;<tt>crontab -e</tt>&rsquo; and adding the line:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">0 4 * * * /usr/local/lib/notes-mode/mkall
</pre></td></tr></table>
<a name="index-Crontab"></a>
<a name="index-mkall"></a>
<a name="index-re_002dindexing"></a>

<p>(Assuming that your notes programs are installed
 in /usr/local/lib/notes-mode, the default location.)
</p>

<hr size="6">
<a name="The-notes-directories"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#The-notes-index" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_3.html#Advanced-Features" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Basics" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Basics" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_3.html#Advanced-Features" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="notes-mode.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_6.html#Keystroke-index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="The-notes-directories-1"></a>
<h2 class="section">2.4 The notes directories</h2>

<a name="index-Notes-directories"></a>
<a name="index-Directory-hierarchy"></a>

<p>The final thing needed to tie basic notes-mode together his how
the pieces fit together.
Since my graduate work is in file systems,
you can bet that directories are involved.
</p>
<p>Notes-mode keeps its files in a two-level hierarchy:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">~/NOTES
~/NOTES/index
~/NOTES/rawindex
~/NOTES/199603
~/NOTES/199603/960329
~/NOTES/199603/960330
~/NOTES/199604
~/NOTES/199604/960401
</pre></td></tr></table>

<p>The top level, &lsquo;<tt>~/NOTES</tt>&rsquo;, is the notes directory.
It keeps all notes in one place.
(The name of this directory is configurable, See section <a href="notes-mode_3.html#Notes_002dmode-configuration">Notes-mode configuration</a>.)
</p>
<p>Inside the notes directory are two files and a number of directories.
The files are &lsquo;<tt>index</tt>&rsquo;,
 the index of all entries (see section <a href="#The-notes-index">The notes index</a>),
 and &lsquo;<tt>rawindex</tt>&rsquo;,
 used internally.
<a name="index-Root-directory"></a>
</p>
<p>The notes directory also contains a number of subdirectories,
 sometimes called <em>intermediate directories</em>.
These directories group the actual notes files into manageable chunks,
 keeping any directory from getting too large.
Intermediate directories are named
 by the four-digit year and the two-digit month
 of the entries they contain.
(The format of intermediate directories
 is configurable, See section <a href="notes-mode_3.html#Notes_002dmode-configuration">Notes-mode configuration</a>.)
<a name="index-Intermediate-directories"></a>
</p>
<p>Finally,
 each intermediate directory are the notes files themselves,
 named according to the two-digit year, month, and day-of-month.
<a name="index-Notes-files-1"></a>
</p>
<p>For the most part,
 notes-mode will automatically maintain this organization of files,
 once you create the top-level directory.
Notes-mode will also automatically insure
 that all files in the notes directory are unreadable by
 anyone other than their owner.
Notes are personal things.
(This behavior is not currently configurable,
 but it probably should be.)
<a name="index-Notes-file-permissions"></a>
</p>


<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Basics" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_3.html#Advanced-Features" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="notes-mode.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_6.html#Keystroke-index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="notes-mode_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated on <i>December 19, 2014</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.82</i></a>.
 </font>
 <br>

</p>
</body>
</html>