remember.texi 15 KB

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