diff options
| author | Glenn Morris | 2014-02-18 00:09:51 -0800 |
|---|---|---|
| committer | Glenn Morris | 2014-02-18 00:09:51 -0800 |
| commit | a73fae1ffa16e60f5ddc3a5536d322edc10a8a83 (patch) | |
| tree | c385145c21090a9d5e28d07a24476e902ad22b35 | |
| parent | 1825653e3dd0c9f1d6361f0afc62301b68015acc (diff) | |
| download | emacs-a73fae1ffa16e60f5ddc3a5536d322edc10a8a83.tar.gz emacs-a73fae1ffa16e60f5ddc3a5536d322edc10a8a83.zip | |
Some remember doc
* doc/misc/remember.texi (copying): Bump remember mode version.
(Installation): Remove unnecessary chapter.
(Quick Start): No need to explicitly load remember.el.
(Separate Text Files): New section.
* lisp/textmodes/remember.el (remember-data-directory)
(remember-directory-file-name-format, remember-store-in-files)
(remember-notes-initial-major-mode, remember-notes-bury-on-kill)
(remember-notes-save-and-bury-buffer)
(remember-notes--kill-buffer-query): Doc fixes.
* etc/NEWS: Related edit.
| -rw-r--r-- | doc/misc/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/misc/remember.texi | 64 | ||||
| -rw-r--r-- | etc/NEWS | 11 | ||||
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/textmodes/remember.el | 30 |
5 files changed, 75 insertions, 43 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index e89af8ce370..ca17200c650 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-02-18 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * remember.texi (copying): Bump remember mode version. | ||
| 4 | (Installation): Remove unnecessary chapter. | ||
| 5 | (Quick Start): No need to explicitly load remember.el. | ||
| 6 | (Separate Text Files): New section. | ||
| 7 | |||
| 1 | 2014-02-17 Glenn Morris <rgm@gnu.org> | 8 | 2014-02-17 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * eieio.texi (Class Values, CLOS compatibility): | 10 | * eieio.texi (Class Values, CLOS compatibility): |
diff --git a/doc/misc/remember.texi b/doc/misc/remember.texi index d9c11cea424..e1c99f1382e 100644 --- a/doc/misc/remember.texi +++ b/doc/misc/remember.texi | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | @c %**end of header | 7 | @c %**end of header |
| 8 | 8 | ||
| 9 | @copying | 9 | @copying |
| 10 | This manual is for Remember Mode, version 1.9 | 10 | This manual is for Remember Mode, version 2.0 |
| 11 | 11 | ||
| 12 | Copyright @copyright{} 2001, 2004--2005, 2007--2014 | 12 | Copyright @copyright{} 2001, 2004--2005, 2007--2014 |
| 13 | Free Software Foundation, Inc. | 13 | Free Software Foundation, Inc. |
| @@ -54,7 +54,6 @@ modify this GNU manual.'' | |||
| 54 | @menu | 54 | @menu |
| 55 | * Preface:: About the documentation. | 55 | * Preface:: About the documentation. |
| 56 | * Introduction:: What is Remember Mode? | 56 | * Introduction:: What is Remember Mode? |
| 57 | * Installation:: How to install Remember. | ||
| 58 | * Implementation:: How Remember came into existence. | 57 | * Implementation:: How Remember came into existence. |
| 59 | * Quick Start:: Get started using Remember. | 58 | * Quick Start:: Get started using Remember. |
| 60 | * Function Reference:: Interactive functions in remember.el. | 59 | * Function Reference:: Interactive functions in remember.el. |
| @@ -69,6 +68,7 @@ modify this GNU manual.'' | |||
| 69 | Backends | 68 | Backends |
| 70 | 69 | ||
| 71 | * Text File:: Saving to a text file. | 70 | * Text File:: Saving to a text file. |
| 71 | * Separate Text Files:: Saving to separate text files. | ||
| 72 | * Diary:: Saving to a Diary file. | 72 | * Diary:: Saving to a Diary file. |
| 73 | * Mailbox:: Saving to a mailbox. | 73 | * Mailbox:: Saving to a mailbox. |
| 74 | * Org:: Saving to an Org Mode file. | 74 | * Org:: Saving to an Org Mode file. |
| @@ -128,18 +128,6 @@ in order to record them---it would map much more closely to how the mind | |||
| 128 | manual-ness which computers from the very beginning have been championed | 128 | manual-ness which computers from the very beginning have been championed |
| 129 | as being able to reduce. | 129 | as being able to reduce. |
| 130 | 130 | ||
| 131 | @node Installation | ||
| 132 | @chapter Installation | ||
| 133 | |||
| 134 | Installing Remember Mode is as simple as adding the following lines to | ||
| 135 | your Emacs configuration file (usually @file{~/.emacs.d/init.el} or | ||
| 136 | @file{~/.emacs}). | ||
| 137 | |||
| 138 | @lisp | ||
| 139 | (add-to-list 'load-path "/path/to/remember") | ||
| 140 | (require 'remember) | ||
| 141 | @end lisp | ||
| 142 | |||
| 143 | @node Implementation | 131 | @node Implementation |
| 144 | @chapter Implementation | 132 | @chapter Implementation |
| 145 | 133 | ||
| @@ -187,14 +175,11 @@ feedback will help to make this as intuitive a tool as possible. | |||
| 187 | @itemize | 175 | @itemize |
| 188 | 176 | ||
| 189 | @item | 177 | @item |
| 190 | Load @file{remember.el}. | 178 | Type @kbd{M-x remember}. The @samp{*Remember*} buffer should be |
| 191 | |||
| 192 | @item | ||
| 193 | Type @kbd{M-x remember}. The @samp{*Remember*} buffer should be | ||
| 194 | displayed. | 179 | displayed. |
| 195 | 180 | ||
| 196 | @item | 181 | @item |
| 197 | Type in what you want to remember. The first line will be treated as | 182 | Type in what you want to remember. The first line will be treated as |
| 198 | the headline, and the rest of the buffer will contain the body of the | 183 | the headline, and the rest of the buffer will contain the body of the |
| 199 | note. | 184 | note. |
| 200 | 185 | ||
| @@ -204,18 +189,18 @@ the @samp{*Remember*} buffer. | |||
| 204 | @end itemize | 189 | @end itemize |
| 205 | 190 | ||
| 206 | By default, @code{remember-finalize} saves the note in @file{~/emacs.d/notes}. | 191 | By default, @code{remember-finalize} saves the note in @file{~/emacs.d/notes}. |
| 207 | You can edit it now to see the remembered and timestamped note. You | 192 | You can edit it now to see the remembered and timestamped note. You |
| 208 | can edit this file however you want. New entries will always be added | 193 | can edit this file however you want. New entries will always be added |
| 209 | to the end. | 194 | to the end. |
| 210 | 195 | ||
| 211 | To remember a region of text, use the universal prefix. @kbd{C-u M-x | 196 | To remember a region of text, use the universal prefix. @kbd{C-u M-x |
| 212 | remember} displays a @samp{*Remember*} buffer with the region as the | 197 | remember} displays a @samp{*Remember*} buffer with the region as the |
| 213 | initial contents. | 198 | initial contents. |
| 214 | 199 | ||
| 215 | As a simple beginning, you can start by using the Text File backend, | 200 | As a simple beginning, you can start by using the Text File backend, |
| 216 | keeping your @file{~/.emacs.d/notes} file in outline-mode format, with a final | 201 | keeping your @file{~/.emacs.d/notes} file in outline-mode format, with a final |
| 217 | entry called @samp{* Raw data}. Remembered data will be added to the | 202 | entry called @samp{* Raw data}. Remembered data will be added to the |
| 218 | end of the file. Every so often, you can move the data that gets | 203 | end of the file. Every so often, you can move the data that gets |
| 219 | appended there into other files, or reorganize your document. | 204 | appended there into other files, or reorganize your document. |
| 220 | 205 | ||
| 221 | You can also store remembered data in other backends. | 206 | You can also store remembered data in other backends. |
| @@ -233,7 +218,7 @@ very accessible keystrokes facilities using the mode: | |||
| 233 | @end lisp | 218 | @end lisp |
| 234 | 219 | ||
| 235 | By default, remember uses the first annotation returned by | 220 | By default, remember uses the first annotation returned by |
| 236 | @code{remember-annotation-functions}. To include all of the annotations, | 221 | @code{remember-annotation-functions}. To include all of the annotations, |
| 237 | set @code{remember-run-all-annotation-functions-flag} to non-nil. | 222 | set @code{remember-run-all-annotation-functions-flag} to non-nil. |
| 238 | 223 | ||
| 239 | @defopt remember-run-all-annotation-functions-flag | 224 | @defopt remember-run-all-annotation-functions-flag |
| @@ -242,7 +227,7 @@ Non-nil means use all annotations returned by | |||
| 242 | @end defopt | 227 | @end defopt |
| 243 | 228 | ||
| 244 | You can write custom functions that use a different set of | 229 | You can write custom functions that use a different set of |
| 245 | remember-annotation-functions. For example: | 230 | remember-annotation-functions. For example: |
| 246 | 231 | ||
| 247 | @lisp | 232 | @lisp |
| 248 | (defun my/remember-with-filename () | 233 | (defun my/remember-with-filename () |
| @@ -258,7 +243,7 @@ remember-annotation-functions. For example: | |||
| 258 | @file{remember.el} defines the following interactive functions: | 243 | @file{remember.el} defines the following interactive functions: |
| 259 | 244 | ||
| 260 | @defun remember initial | 245 | @defun remember initial |
| 261 | Remember an arbitrary piece of data. With a prefix, it will use the | 246 | Remember an arbitrary piece of data. With a prefix, it will use the |
| 262 | region as @var{initial}. | 247 | region as @var{initial}. |
| 263 | @end defun | 248 | @end defun |
| 264 | 249 | ||
| @@ -310,6 +295,7 @@ You can save remembered notes to a variety of backends. | |||
| 310 | 295 | ||
| 311 | @menu | 296 | @menu |
| 312 | * Text File:: Saving to a text file. | 297 | * Text File:: Saving to a text file. |
| 298 | * Separate Text Files:: Saving to separate text files. | ||
| 313 | * Diary:: Saving to a Diary file. | 299 | * Diary:: Saving to a Diary file. |
| 314 | * Mailbox:: Saving to a mailbox. | 300 | * Mailbox:: Saving to a mailbox. |
| 315 | * Org:: Saving to an Org Mode file. | 301 | * Org:: Saving to an Org Mode file. |
| @@ -335,6 +321,30 @@ The file in which to store unprocessed data. | |||
| 335 | The text used to begin each remember item. | 321 | The text used to begin each remember item. |
| 336 | @end defopt | 322 | @end defopt |
| 337 | 323 | ||
| 324 | |||
| 325 | @node Separate Text Files | ||
| 326 | @section Saving to Separate Text Files | ||
| 327 | @cindex text files, saving to separate | ||
| 328 | |||
| 329 | @subheading Insinuation | ||
| 330 | |||
| 331 | @lisp | ||
| 332 | (setq remember-handler-functions '(remember-store-in-files)) | ||
| 333 | @end lisp | ||
| 334 | |||
| 335 | @subheading Options | ||
| 336 | |||
| 337 | @defopt remember-data-directory | ||
| 338 | The directory in which to store remember data as files. | ||
| 339 | @end defopt | ||
| 340 | |||
| 341 | @defopt remember-directory-file-name-format | ||
| 342 | A format string to use for naming files in the remember directory. | ||
| 343 | File names are formed by calling @code{format-time-string} at the time | ||
| 344 | of saving, using this format string. | ||
| 345 | @end defopt | ||
| 346 | |||
| 347 | |||
| 338 | @node Diary | 348 | @node Diary |
| 339 | @section Saving to a Diary file | 349 | @section Saving to a Diary file |
| 340 | @cindex diary, integration | 350 | @cindex diary, integration |
| @@ -28,6 +28,7 @@ otherwise leave it unmarked. | |||
| 28 | This happens by default if a suitable support library is found at | 28 | This happens by default if a suitable support library is found at |
| 29 | build time, like libacl on GNU/Linux. To prevent this, use the | 29 | build time, like libacl on GNU/Linux. To prevent this, use the |
| 30 | configure option `--disable-acl'. | 30 | configure option `--disable-acl'. |
| 31 | FIXME? Should be --without-acl? | ||
| 31 | 32 | ||
| 32 | ** Emacs can now be compiled with file notification support. | 33 | ** Emacs can now be compiled with file notification support. |
| 33 | This happens by default if a suitable system library is found at | 34 | This happens by default if a suitable system library is found at |
| @@ -720,11 +721,11 @@ buffer and can be used that way by setting `initial-buffer-choice' to | |||
| 720 | Without the second change, the *scratch* buffer will still be there | 721 | Without the second change, the *scratch* buffer will still be there |
| 721 | for notes that do not need to be preserved. | 722 | for notes that do not need to be preserved. |
| 722 | 723 | ||
| 723 | *** The Remember package can now store notes in separates files. | 724 | +++ |
| 724 | You can use the new function `remember-store-in-files' within the | 725 | *** Remember can now store notes in separate files. |
| 725 | `remember-handler-functions' option. See `remember-data-directory' | 726 | To use this, add `remember-store-in-files' to the `remember-handler-functions' |
| 726 | and `remember-directory-file-name-format' for new options related to | 727 | option. The files are saved in `remember-data-directory' using |
| 727 | this function. | 728 | names specified by `remember-directory-file-name-format'. |
| 728 | 729 | ||
| 729 | ** Rmail | 730 | ** Rmail |
| 730 | 731 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2eb5057cf68..155063592b6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2014-02-18 Glenn Morris <rgm@gnu.org> | 1 | 2014-02-18 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * textmodes/remember.el (remember-data-directory) | ||
| 4 | (remember-directory-file-name-format, remember-store-in-files) | ||
| 5 | (remember-notes-initial-major-mode, remember-notes-bury-on-kill) | ||
| 6 | (remember-notes-save-and-bury-buffer) | ||
| 7 | (remember-notes--kill-buffer-query): Doc fixes. | ||
| 8 | |||
| 3 | * desktop.el (desktop-save-mode, desktop-auto-save-timeout): Doc fixes. | 9 | * desktop.el (desktop-save-mode, desktop-auto-save-timeout): Doc fixes. |
| 4 | 10 | ||
| 5 | 2014-02-17 Alan Mackenzie <acm@muc.de> | 11 | 2014-02-17 Alan Mackenzie <acm@muc.de> |
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el index 33e44c05c33..a9eb7ad4ec8 100644 --- a/lisp/textmodes/remember.el +++ b/lisp/textmodes/remember.el | |||
| @@ -442,21 +442,24 @@ If you want to remember a region, supply a universal prefix to | |||
| 442 | (remember-destroy)))) | 442 | (remember-destroy)))) |
| 443 | 443 | ||
| 444 | (defcustom remember-data-directory "~/remember" | 444 | (defcustom remember-data-directory "~/remember" |
| 445 | "The directory in which to store remember data as files." | 445 | "The directory in which to store remember data as files. |
| 446 | Used by `remember-store-in-files'." | ||
| 446 | :type 'directory | 447 | :type 'directory |
| 447 | :version "24.4" | 448 | :version "24.4" |
| 448 | :group 'remember) | 449 | :group 'remember) |
| 449 | 450 | ||
| 450 | (defcustom remember-directory-file-name-format "%Y-%m-%d_%T-%z" | 451 | (defcustom remember-directory-file-name-format "%Y-%m-%d_%T-%z" |
| 451 | "Format string for the file name in which to store unprocessed data." | 452 | "Format string for the file name in which to store unprocessed data. |
| 453 | This is passed to `format-time-string'. | ||
| 454 | Used by `remember-store-in-files'." | ||
| 452 | :type 'string | 455 | :type 'string |
| 453 | :version "24.4" | 456 | :version "24.4" |
| 454 | :group 'remember) | 457 | :group 'remember) |
| 455 | 458 | ||
| 456 | (defun remember-store-in-files () | 459 | (defun remember-store-in-files () |
| 457 | "Store remember data in a file in `remember-data-directory'. | 460 | "Store remember data in a file in `remember-data-directory'. |
| 458 | The file is named after `remember-directory-file-name-format' fed through | 461 | The file is named by calling `format-time-string' using |
| 459 | `format-time-string'." | 462 | `remember-directory-file-name-format' as the format string." |
| 460 | (let ((name (format-time-string | 463 | (let ((name (format-time-string |
| 461 | remember-directory-file-name-format (current-time))) | 464 | remember-directory-file-name-format (current-time))) |
| 462 | (text (buffer-string))) | 465 | (text (buffer-string))) |
| @@ -572,20 +575,19 @@ purpose of storing notes." | |||
| 572 | :version "24.4") | 575 | :version "24.4") |
| 573 | 576 | ||
| 574 | (defcustom remember-notes-initial-major-mode nil | 577 | (defcustom remember-notes-initial-major-mode nil |
| 575 | "Major mode to set to notes buffer when it's created. | 578 | "Major mode to use in the notes buffer when it's created. |
| 576 | If set to nil will use the same mode as `initial-major-mode'." | 579 | If this is nil, use `initial-major-mode'." |
| 577 | :type '(choice (const :tag "Same as `initial-major-mode'" nil) | 580 | :type '(choice (const :tag "Use `initial-major-mode'" nil) |
| 578 | (function :tag "Major mode" text-mode)) | 581 | (function :tag "Major mode" text-mode)) |
| 579 | :version "24.4") | 582 | :version "24.4") |
| 580 | 583 | ||
| 581 | (defcustom remember-notes-bury-on-kill t | 584 | (defcustom remember-notes-bury-on-kill t |
| 582 | "Whether to bury notes buffer instead of killing." | 585 | "Non-nil means `kill-buffer' will bury the notes buffer instead of killing." |
| 583 | :type 'boolean | 586 | :type 'boolean |
| 584 | :version "24.4") | 587 | :version "24.4") |
| 585 | 588 | ||
| 586 | (defun remember-notes-save-and-bury-buffer () | 589 | (defun remember-notes-save-and-bury-buffer () |
| 587 | "Saves and buries current buffer. | 590 | "Save (if it is modified) and bury the current buffer." |
| 588 | Buffer is saved only if `buffer-modified-p' returns non-nil." | ||
| 589 | (interactive) | 591 | (interactive) |
| 590 | (when (buffer-modified-p) | 592 | (when (buffer-modified-p) |
| 591 | (save-buffer)) | 593 | (save-buffer)) |
| @@ -648,10 +650,16 @@ preserve across Emacs restarts. The notes will be stored in the | |||
| 648 | buf)) | 650 | buf)) |
| 649 | 651 | ||
| 650 | (defun remember-notes--kill-buffer-query () | 652 | (defun remember-notes--kill-buffer-query () |
| 653 | "Function that `remember-notes-mode' adds to `kill-buffer-query-functions'. | ||
| 654 | Save the current buffer if modified. If `remember-notes-bury-on-kill' | ||
| 655 | is non-nil, bury it and return nil; otherwise return t." | ||
| 651 | (when (buffer-modified-p) | 656 | (when (buffer-modified-p) |
| 652 | (save-buffer)) | 657 | (save-buffer)) |
| 653 | (if remember-notes-bury-on-kill | 658 | (if remember-notes-bury-on-kill |
| 654 | (bury-buffer) | 659 | (progn |
| 660 | ;; bury-buffer always returns nil, but let's be explicit. | ||
| 661 | (bury-buffer) | ||
| 662 | nil) | ||
| 655 | t)) | 663 | t)) |
| 656 | 664 | ||
| 657 | ;;; remember.el ends here | 665 | ;;; remember.el ends here |