Continuation of previous change.
[bpt/emacs.git] / doc / misc / remember.texi
CommitLineData
15f3eb73
MO
1\input texinfo @c -*-texinfo-*-
2@c %**start of header
3@setfilename ../../info/remember
4@settitle Remember Manual
15f3eb73 5@syncodeindex fn cp
c6ab4664 6@documentencoding UTF-8
5dc584b5 7@c %**end of header
15f3eb73
MO
8
9@copying
a73fae1f 10This manual is for Remember Mode, version 2.0
15f3eb73 11
6bc383b1 12Copyright @copyright{} 2001, 2004--2005, 2007--2014
dcb8ac09 13Free Software Foundation, Inc.
15f3eb73
MO
14
15@quotation
16Permission is granted to copy, distribute and/or modify this document
6a2c4aec
GM
17under the terms of the GNU Free Documentation License, Version 1.3 or
18any later version published by the Free Software Foundation; with no
cd5c05d2
GM
19Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
20and with the Back-Cover Texts as in (a) below. A copy of the license
21is included in the section entitled ``GNU Free Documentation License''.
22
23(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
6bf430d1 24modify this GNU manual.''
15f3eb73
MO
25@end quotation
26@end copying
27
0c973505 28@dircategory Emacs misc features
5dc584b5 29@direntry
62e034c2 30* Remember: (remember). Simple information manager for Emacs.
5dc584b5
KB
31@end direntry
32
15f3eb73
MO
33@titlepage
34@title Guide to Remember Mode
35@subtitle a simple information manager
36@subtitle for Emacs and XEmacs
37
38@c The following two commands
39@c start the copyright page.
40@page
41@vskip 0pt plus 1filll
42@insertcopying
43@end titlepage
44
15f3eb73
MO
45@contents
46
47@ifnottex
563a450c 48@node Top
15f3eb73
MO
49@top Remember
50
51@insertcopying
52@end ifnottex
53
54@menu
55* Preface:: About the documentation.
56* Introduction:: What is Remember Mode?
15f3eb73
MO
57* Implementation:: How Remember came into existence.
58* Quick Start:: Get started using Remember.
15f3eb73 59* Function Reference:: Interactive functions in remember.el.
7d3f6f1a
MO
60* Keystrokes:: Keystrokes bound in Remember Mode.
61* Backends:: Backends for saving notes.
15f3eb73
MO
62* GNU Free Documentation License:: The license for this documentation.
63* Concept Index:: Search for terms.
64
65@detailmenu
66 --- The Detailed Node Listing ---
67
68Backends
69
70* Text File:: Saving to a text file.
a73fae1f 71* Separate Text Files:: Saving to separate text files.
bec9b2f5 72* Diary:: Saving to a Diary file.
15f3eb73 73* Mailbox:: Saving to a mailbox.
bec9b2f5 74* Org:: Saving to an Org Mode file.
15f3eb73
MO
75
76@end detailmenu
77@end menu
78
563a450c 79@node Preface
15f3eb73
MO
80@chapter Preface
81
1cf4cf56 82This document describes remember.el, which was written by John Wiegley,
15f3eb73
MO
83was once maintained by Sacha Chua, and is now maintained by the Emacs
84developers.
85
86This document is a work in progress, and your contribution will be
87greatly appreciated.
88
563a450c 89@node Introduction
15f3eb73
MO
90@chapter Introduction
91
92Todo lists, schedules, phone databases... everything we use databases
93for is really just a way to extend the power of our memory, to be able
94to remember what our conscious mind may not currently have access to.
95
51d24a12
MO
96There are many different databases out there---and good ones---which
97this mode is not trying to replace. Rather, it's how that data gets
98there that's the question. Most of the time, we just want to say
95160c90
GM
99``Remember so-and-so's phone number, or that I have to buy dinner for the
100cats tonight.'' That's the FACT@. How it's stored is really the
51d24a12
MO
101computer's problem. But at this point in time, it's most definitely
102also the user's problem, and sometimes so laboriously so that people
103just let data slip, rather than expend the effort to record it.
15f3eb73
MO
104
105``Remember'' is a mode for remembering data. It uses whatever
106back-end is appropriate to record and correlate the data, but its main
107intention is to allow you to express as @emph{little} structure as
108possible up front. If you later want to express more powerful
109relationships between your data, or state assumptions that were at
110first too implicit to be recognized, you can ``study'' the data later
111and rearrange it. But the initial ``just remember this'' impulse
112should be as close to simply throwing the data at Emacs as possible.
113
114Have you ever noticed that having a laptop to write on doesn't
115@emph{actually} increase the amount of quality material that you turn
116out, in the long run? Perhaps it's because the time we save
117electronically in one way, we're losing electronically in another; the
118tool should never dominate one's focus. As the mystic Faridu'd-Din
119`Attar wrote: ``Be occupied as little as possible with things of the
120outer world but much with things of the inner world; then right action
121will overcome inaction.''
122
123If Emacs could become a more intelligent data store, where brainstorming
124would focus on the @emph{ideas} involved---rather than the structuring
125and format of those ideas, or having to stop your current flow of work
126in order to record them---it would map much more closely to how the mind
127(well, at least mine) works, and hence would eliminate that very
128manual-ness which computers from the very beginning have been championed
129as being able to reduce.
130
563a450c 131@node Implementation
15f3eb73
MO
132@chapter Implementation
133
134Hyperbole, as a data presentation tool, always struck me as being very
135powerful, but it seemed to require a lot of ``front-end'' work before
136that data was really available. The problem with BBDB, or keeping up
137a Bibl-mode file, is that you have to use different functions to
138record the data, and it always takes time to stop what you're doing,
139format the data in the manner expected by that particular data
140interface, and then resume your work.
141
142With ``remember'', you just hit @kbd{M-x remember} (you'd probably
143want to bind this to an easily accessible keystroke, like @kbd{C-x
144M-r}), slam in your text however you like, and then hit @kbd{C-c C-c}.
145It will file the data away for later retrieval, and possibly indexing.
146
bec9b2f5
MO
147Indexing is to data what ``studying'' is in the real world. What you do
148when you study (or lucubrate, for some of us) is to realize certain
15f3eb73
MO
149relationships implicit in the data, so that you can make use of those
150relationships. Expressing that a certain quote you remembered was a
bec9b2f5
MO
151literary quote, and that you want the ability to pull up all quotes of a
152literary nature, is what studying does. This is a more labor intensive
153task than the original remembering of the data, and it's typical in real
154life to set aside a special period of time for doing this work.
15f3eb73
MO
155
156``Remember'' works in the same way. When you enter data, either by
157typing it into a buffer, or using the contents of the selected region,
158it will store that data---unindexed, uninterpreted---in a data pool.
159It will also try to remember as much context information as possible
160(any text properties that were set, where you copied it from, when,
65e7ca35 161how, etc.). Later, you can walk through your accumulated set of data
15f3eb73
MO
162(both organized, and unorganized) and easily begin moving things
163around, and making annotations that will express the full meaning of
164that data, as far as you know it.
165
166Obviously this latter stage is more user-interface intensive, and it
167would be nice if ``remember'' could do it as elegantly as possible,
168rather than requiring a billion keystrokes to reorganize your
169hierarchy. Well, as the future arrives, hopefully experience and user
170feedback will help to make this as intuitive a tool as possible.
171
563a450c 172@node Quick Start
15f3eb73
MO
173@chapter Quick Start
174
175@itemize
176
177@item
95160c90 178Type @kbd{M-x remember}. The @file{*Remember*} buffer should be
15f3eb73
MO
179displayed.
180
181@item
a73fae1f 182Type in what you want to remember. The first line will be treated as
15f3eb73
MO
183the headline, and the rest of the buffer will contain the body of the
184note.
185
186@item
6159985a 187Type @kbd{C-c C-c} (@code{remember-finalize}) to save the note and close
95160c90 188the @file{*Remember*} buffer.
15f3eb73
MO
189@end itemize
190
ece4bae5 191By default, @code{remember-finalize} saves the note in @file{~/emacs.d/notes}.
a73fae1f
GM
192You can edit it now to see the remembered and timestamped note. You
193can edit this file however you want. New entries will always be added
15f3eb73
MO
194to the end.
195
a73fae1f 196To remember a region of text, use the universal prefix. @kbd{C-u M-x
95160c90 197remember} displays a @file{*Remember*} buffer with the region as the
15f3eb73
MO
198initial contents.
199
200As a simple beginning, you can start by using the Text File backend,
ece4bae5 201keeping your @file{~/.emacs.d/notes} file in outline-mode format, with a final
a73fae1f
GM
202entry called @samp{* Raw data}. Remembered data will be added to the
203end of the file. Every so often, you can move the data that gets
15f3eb73
MO
204appended there into other files, or reorganize your document.
205
95160c90 206You can also store remembered data in other backends. @xref{Backends}.
15f3eb73 207
1cf4cf56
XF
208Here is one way to map the remember functions in your init file
209(@pxref{Init File, , The Emacs Initialization File, emacs, GNU Emacs
210Manual}) to very accessible keystrokes facilities using the mode:
15f3eb73
MO
211
212@lisp
15f3eb73
MO
213(define-key global-map (kbd "<f9> r") 'remember)
214(define-key global-map (kbd "<f9> R") 'remember-region)
215@end lisp
216
1cf4cf56 217@cindex annotation
15f3eb73 218By default, remember uses the first annotation returned by
a73fae1f 219@code{remember-annotation-functions}. To include all of the annotations,
95160c90
GM
220set @code{remember-run-all-annotation-functions-flag} to a
221non-@code{nil} value.
15f3eb73
MO
222
223@defopt remember-run-all-annotation-functions-flag
95160c90 224Non-@code{nil} means use all annotations returned by
15f3eb73
MO
225@code{remember-annotation-functions}.
226@end defopt
227
228You can write custom functions that use a different set of
a73fae1f 229remember-annotation-functions. For example:
15f3eb73
MO
230
231@lisp
232(defun my/remember-with-filename ()
233 "Always use the filename."
234 (interactive)
235 (let ((remember-annotation-functions '(buffer-file-name)))
236 (call-interactively 'remember)))
237@end lisp
238
95160c90
GM
239@cindex notes
240The @code{remember-notes} command creates a @dfn{notes} buffer that
241visits the file specified by the option @code{remember-data-file}.
242The option @code{remember-notes-buffer-name} specifies the name of the
243buffer. The buffer uses @code{remember-notes-initial-major-mode} and
244@code{remember-notes-mode} minor mode. Use @kbd{C-c C-c} to save
245and bury the buffer. The command @code{save-some-buffers} saves this
246buffer without asking. This function is a suitable setting for
247@code{initial-buffer-choice}.
248
249
563a450c 250@node Function Reference
7d3f6f1a
MO
251@chapter Function Reference
252
253@file{remember.el} defines the following interactive functions:
254
95160c90 255@defun remember &optional initial
a73fae1f 256Remember an arbitrary piece of data. With a prefix, it will use the
7d3f6f1a
MO
257region as @var{initial}.
258@end defun
259
95160c90
GM
260@defun remember-other-frame &optional initial
261Like @code{remember}, but uses a new frame.
262@end defun
263
264@defun remember-region &optional beg end
7d3f6f1a
MO
265If called from within the remember buffer, @var{beg} and @var{end} are
266ignored, and the entire buffer will be remembered. If called from any
267other buffer, that region, plus any context information specific to
268that region, will be remembered.
269@end defun
270
271@defun remember-clipboard
272Remember the contents of the current clipboard. This is most useful
273for remembering things from Netscape or other X Windows applications.
274@end defun
275
6159985a 276@defun remember-finalize
7d3f6f1a
MO
277Remember the contents of the current buffer.
278@end defun
279
95160c90
GM
280@defun remember-destroy
281Destroy the current remember buffer.
282@end defun
283
7d3f6f1a 284@defun remember-mode
1cf4cf56
XF
285This enters the major mode (@pxref{Major Modes, , Major Modes, emacs,
286GNU Emacs Manual}) for output from @code{remember}. This buffer is
287used to collect data that you want remember. Just hit @kbd{C-c C-c}
288when you're done entering, and it will go ahead and file the data for
289latter retrieval, and possible indexing.
7d3f6f1a
MO
290@end defun
291
95160c90
GM
292@defun remember-notes &optional switch-to
293This returns the notes buffer, creating it if needed, and switches
294to it if called interactively (or if @var{switch-to} is non-@code{nil}).
295The notes buffer visits @code{remember-data-file}, and
296is named @code{remember-notes-buffer-name}. It uses
297@code{remember-notes-initial-major-mode} and @code{remember-notes-mode}
298minor mode.
299@end defun
300
301@defun remember-notes-mode &optional arg
302This is a minor mode for the notes buffer. It sets
303@code{buffer-save-without-query} so that @code{save-some-buffers} will
304save the notes buffer without asking. Use @kbd{C-c C-c} to
305run the command @code{remember-notes-save-and-bury-buffer}.
306@end defun
307
308@defun remember-notes-save-and-bury-buffer
309Save (if it is modified) and bury the current buffer.
310@end defun
311
563a450c 312@node Keystrokes
7d3f6f1a
MO
313@chapter Keystroke Reference
314
315@file{remember.el} defines the following keybindings by default:
316
317@table @kbd
318
95160c90
GM
319@item C-c C-c
320@itemx C-x C-s
321Remember the contents of the current buffer (`remember-finalize').
7d3f6f1a 322
95160c90
GM
323@item C-c C-k
324Destroy the current @file{*Remember*} buffer (`remember-destroy').
7d3f6f1a
MO
325
326@end table
327
563a450c 328@node Backends
15f3eb73
MO
329@chapter Backends
330
331You can save remembered notes to a variety of backends.
332
333@menu
334* Text File:: Saving to a text file.
a73fae1f 335* Separate Text Files:: Saving to separate text files.
bec9b2f5 336* Diary:: Saving to a Diary file.
15f3eb73 337* Mailbox:: Saving to a mailbox.
bec9b2f5 338* Org:: Saving to an Org Mode file.
15f3eb73
MO
339@end menu
340
563a450c 341@node Text File
15f3eb73 342@section Saving to a Text File
bec9b2f5 343@cindex text file, saving to
15f3eb73 344
bec9b2f5 345@subheading Insinuation
15f3eb73
MO
346
347@lisp
348(setq remember-handler-functions '(remember-append-to-file))
349@end lisp
350
bec9b2f5
MO
351@subheading Options
352
15f3eb73 353@defopt remember-data-file
bec9b2f5 354The file in which to store unprocessed data.
15f3eb73
MO
355@end defopt
356
357@defopt remember-leader-text
bec9b2f5 358The text used to begin each remember item.
15f3eb73
MO
359@end defopt
360
a73fae1f
GM
361
362@node Separate Text Files
363@section Saving to Separate Text Files
364@cindex text files, saving to separate
365
366@subheading Insinuation
367
368@lisp
369(setq remember-handler-functions '(remember-store-in-files))
370@end lisp
371
372@subheading Options
373
374@defopt remember-data-directory
375The directory in which to store remember data as files.
376@end defopt
377
378@defopt remember-directory-file-name-format
379A format string to use for naming files in the remember directory.
380File names are formed by calling @code{format-time-string} at the time
381of saving, using this format string.
382@end defopt
383
384
563a450c 385@node Diary
bec9b2f5
MO
386@section Saving to a Diary file
387@cindex diary, integration
15f3eb73 388
bec9b2f5 389@subheading Insinuation
15f3eb73
MO
390
391@lisp
bec9b2f5 392(add-to-list 'remember-handler-functions 'remember-diary-extract-entries)
15f3eb73
MO
393@end lisp
394
bec9b2f5 395@subheading Options
15f3eb73 396
bec9b2f5
MO
397@defopt remember-diary-file
398File for extracted diary entries.
95160c90 399If this is @code{nil}, then @code{diary-file} will be used instead.
bec9b2f5 400@end defopt
15f3eb73 401
563a450c 402@node Mailbox
bec9b2f5
MO
403@section Saving to a Mailbox
404@cindex mailbox, saving to
15f3eb73 405
bec9b2f5 406@subheading Insinuation
15f3eb73
MO
407
408@lisp
bec9b2f5 409(add-to-list 'remember-handler-functions 'remember-store-in-mailbox)
15f3eb73
MO
410@end lisp
411
bec9b2f5 412@subheading Options
15f3eb73 413
bec9b2f5
MO
414@defopt remember-mailbox
415The file in which to store remember data as mail.
15f3eb73
MO
416@end defopt
417
bec9b2f5
MO
418@defopt remember-default-priority
419The default priority for remembered mail messages.
15f3eb73
MO
420@end defopt
421
563a450c 422@node Org
bec9b2f5
MO
423@section Saving to an Org Mode file
424@cindex org mode, integration
425
0fd2c9a3
GM
426@ignore
427From org.texi:
428Up to version 6.36 Org used a special setup
429for @file{remember.el}. @file{org-remember.el} is still part of Org mode for
430backward compatibility with existing setups. You can find the documentation
431for org-remember at @url{http://orgmode.org/org-remember.pdf}.
432@end ignore
bec9b2f5 433For instructions on how to integrate Remember with Org Mode,
0fd2c9a3 434consult @ref{Capture, , , org}.
15f3eb73 435
563a450c 436@node GNU Free Documentation License
15f3eb73
MO
437@appendix GNU Free Documentation License
438@include doclicense.texi
439
563a450c 440@node Concept Index
15f3eb73
MO
441@unnumbered Index
442
443@printindex cp
444
445@bye