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.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2014-02-18 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* 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.
|
||||
|
||||
2014-02-17 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* eieio.texi (Class Values, CLOS compatibility):
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
@c %**end of header
|
||||
|
||||
@copying
|
||||
This manual is for Remember Mode, version 1.9
|
||||
This manual is for Remember Mode, version 2.0
|
||||
|
||||
Copyright @copyright{} 2001, 2004--2005, 2007--2014
|
||||
Free Software Foundation, Inc.
|
||||
@@ -54,7 +54,6 @@ modify this GNU manual.''
|
||||
@menu
|
||||
* Preface:: About the documentation.
|
||||
* Introduction:: What is Remember Mode?
|
||||
* Installation:: How to install Remember.
|
||||
* Implementation:: How Remember came into existence.
|
||||
* Quick Start:: Get started using Remember.
|
||||
* Function Reference:: Interactive functions in remember.el.
|
||||
@@ -69,6 +68,7 @@ modify this GNU manual.''
|
||||
Backends
|
||||
|
||||
* Text File:: Saving to a text file.
|
||||
* Separate Text Files:: Saving to separate text files.
|
||||
* Diary:: Saving to a Diary file.
|
||||
* Mailbox:: Saving to a mailbox.
|
||||
* 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
|
||||
manual-ness which computers from the very beginning have been championed
|
||||
as being able to reduce.
|
||||
|
||||
@node Installation
|
||||
@chapter Installation
|
||||
|
||||
Installing Remember Mode is as simple as adding the following lines to
|
||||
your Emacs configuration file (usually @file{~/.emacs.d/init.el} or
|
||||
@file{~/.emacs}).
|
||||
|
||||
@lisp
|
||||
(add-to-list 'load-path "/path/to/remember")
|
||||
(require 'remember)
|
||||
@end lisp
|
||||
|
||||
@node Implementation
|
||||
@chapter Implementation
|
||||
|
||||
@@ -187,14 +175,11 @@ feedback will help to make this as intuitive a tool as possible.
|
||||
@itemize
|
||||
|
||||
@item
|
||||
Load @file{remember.el}.
|
||||
|
||||
@item
|
||||
Type @kbd{M-x remember}. The @samp{*Remember*} buffer should be
|
||||
Type @kbd{M-x remember}. The @samp{*Remember*} buffer should be
|
||||
displayed.
|
||||
|
||||
@item
|
||||
Type in what you want to remember. The first line will be treated as
|
||||
Type in what you want to remember. The first line will be treated as
|
||||
the headline, and the rest of the buffer will contain the body of the
|
||||
note.
|
||||
|
||||
@@ -204,18 +189,18 @@ the @samp{*Remember*} buffer.
|
||||
@end itemize
|
||||
|
||||
By default, @code{remember-finalize} saves the note in @file{~/emacs.d/notes}.
|
||||
You can edit it now to see the remembered and timestamped note. You
|
||||
can edit this file however you want. New entries will always be added
|
||||
You can edit it now to see the remembered and timestamped note. You
|
||||
can edit this file however you want. New entries will always be added
|
||||
to the end.
|
||||
|
||||
To remember a region of text, use the universal prefix. @kbd{C-u M-x
|
||||
To remember a region of text, use the universal prefix. @kbd{C-u M-x
|
||||
remember} displays a @samp{*Remember*} buffer with the region as the
|
||||
initial contents.
|
||||
|
||||
As a simple beginning, you can start by using the Text File backend,
|
||||
keeping your @file{~/.emacs.d/notes} file in outline-mode format, with a final
|
||||
entry called @samp{* Raw data}. Remembered data will be added to the
|
||||
end of the file. Every so often, you can move the data that gets
|
||||
entry called @samp{* Raw data}. Remembered data will be added to the
|
||||
end of the file. Every so often, you can move the data that gets
|
||||
appended there into other files, or reorganize your document.
|
||||
|
||||
You can also store remembered data in other backends.
|
||||
@@ -233,7 +218,7 @@ very accessible keystrokes facilities using the mode:
|
||||
@end lisp
|
||||
|
||||
By default, remember uses the first annotation returned by
|
||||
@code{remember-annotation-functions}. To include all of the annotations,
|
||||
@code{remember-annotation-functions}. To include all of the annotations,
|
||||
set @code{remember-run-all-annotation-functions-flag} to non-nil.
|
||||
|
||||
@defopt remember-run-all-annotation-functions-flag
|
||||
@@ -242,7 +227,7 @@ Non-nil means use all annotations returned by
|
||||
@end defopt
|
||||
|
||||
You can write custom functions that use a different set of
|
||||
remember-annotation-functions. For example:
|
||||
remember-annotation-functions. For example:
|
||||
|
||||
@lisp
|
||||
(defun my/remember-with-filename ()
|
||||
@@ -258,7 +243,7 @@ remember-annotation-functions. For example:
|
||||
@file{remember.el} defines the following interactive functions:
|
||||
|
||||
@defun remember initial
|
||||
Remember an arbitrary piece of data. With a prefix, it will use the
|
||||
Remember an arbitrary piece of data. With a prefix, it will use the
|
||||
region as @var{initial}.
|
||||
@end defun
|
||||
|
||||
@@ -310,6 +295,7 @@ You can save remembered notes to a variety of backends.
|
||||
|
||||
@menu
|
||||
* Text File:: Saving to a text file.
|
||||
* Separate Text Files:: Saving to separate text files.
|
||||
* Diary:: Saving to a Diary file.
|
||||
* Mailbox:: Saving to a mailbox.
|
||||
* Org:: Saving to an Org Mode file.
|
||||
@@ -335,6 +321,30 @@ The file in which to store unprocessed data.
|
||||
The text used to begin each remember item.
|
||||
@end defopt
|
||||
|
||||
|
||||
@node Separate Text Files
|
||||
@section Saving to Separate Text Files
|
||||
@cindex text files, saving to separate
|
||||
|
||||
@subheading Insinuation
|
||||
|
||||
@lisp
|
||||
(setq remember-handler-functions '(remember-store-in-files))
|
||||
@end lisp
|
||||
|
||||
@subheading Options
|
||||
|
||||
@defopt remember-data-directory
|
||||
The directory in which to store remember data as files.
|
||||
@end defopt
|
||||
|
||||
@defopt remember-directory-file-name-format
|
||||
A format string to use for naming files in the remember directory.
|
||||
File names are formed by calling @code{format-time-string} at the time
|
||||
of saving, using this format string.
|
||||
@end defopt
|
||||
|
||||
|
||||
@node Diary
|
||||
@section Saving to a Diary file
|
||||
@cindex diary, integration
|
||||
|
||||
11
etc/NEWS
11
etc/NEWS
@@ -28,6 +28,7 @@ otherwise leave it unmarked.
|
||||
This happens by default if a suitable support library is found at
|
||||
build time, like libacl on GNU/Linux. To prevent this, use the
|
||||
configure option `--disable-acl'.
|
||||
FIXME? Should be --without-acl?
|
||||
|
||||
** Emacs can now be compiled with file notification support.
|
||||
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
|
||||
Without the second change, the *scratch* buffer will still be there
|
||||
for notes that do not need to be preserved.
|
||||
|
||||
*** The Remember package can now store notes in separates files.
|
||||
You can use the new function `remember-store-in-files' within the
|
||||
`remember-handler-functions' option. See `remember-data-directory'
|
||||
and `remember-directory-file-name-format' for new options related to
|
||||
this function.
|
||||
+++
|
||||
*** Remember can now store notes in separate files.
|
||||
To use this, add `remember-store-in-files' to the `remember-handler-functions'
|
||||
option. The files are saved in `remember-data-directory' using
|
||||
names specified by `remember-directory-file-name-format'.
|
||||
|
||||
** Rmail
|
||||
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
2014-02-18 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* 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.
|
||||
|
||||
* desktop.el (desktop-save-mode, desktop-auto-save-timeout): Doc fixes.
|
||||
|
||||
2014-02-17 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
@@ -442,21 +442,24 @@ If you want to remember a region, supply a universal prefix to
|
||||
(remember-destroy))))
|
||||
|
||||
(defcustom remember-data-directory "~/remember"
|
||||
"The directory in which to store remember data as files."
|
||||
"The directory in which to store remember data as files.
|
||||
Used by `remember-store-in-files'."
|
||||
:type 'directory
|
||||
:version "24.4"
|
||||
:group 'remember)
|
||||
|
||||
(defcustom remember-directory-file-name-format "%Y-%m-%d_%T-%z"
|
||||
"Format string for the file name in which to store unprocessed data."
|
||||
"Format string for the file name in which to store unprocessed data.
|
||||
This is passed to `format-time-string'.
|
||||
Used by `remember-store-in-files'."
|
||||
:type 'string
|
||||
:version "24.4"
|
||||
:group 'remember)
|
||||
|
||||
(defun remember-store-in-files ()
|
||||
"Store remember data in a file in `remember-data-directory'.
|
||||
The file is named after `remember-directory-file-name-format' fed through
|
||||
`format-time-string'."
|
||||
The file is named by calling `format-time-string' using
|
||||
`remember-directory-file-name-format' as the format string."
|
||||
(let ((name (format-time-string
|
||||
remember-directory-file-name-format (current-time)))
|
||||
(text (buffer-string)))
|
||||
@@ -572,20 +575,19 @@ purpose of storing notes."
|
||||
:version "24.4")
|
||||
|
||||
(defcustom remember-notes-initial-major-mode nil
|
||||
"Major mode to set to notes buffer when it's created.
|
||||
If set to nil will use the same mode as `initial-major-mode'."
|
||||
:type '(choice (const :tag "Same as `initial-major-mode'" nil)
|
||||
"Major mode to use in the notes buffer when it's created.
|
||||
If this is nil, use `initial-major-mode'."
|
||||
:type '(choice (const :tag "Use `initial-major-mode'" nil)
|
||||
(function :tag "Major mode" text-mode))
|
||||
:version "24.4")
|
||||
|
||||
(defcustom remember-notes-bury-on-kill t
|
||||
"Whether to bury notes buffer instead of killing."
|
||||
"Non-nil means `kill-buffer' will bury the notes buffer instead of killing."
|
||||
:type 'boolean
|
||||
:version "24.4")
|
||||
|
||||
(defun remember-notes-save-and-bury-buffer ()
|
||||
"Saves and buries current buffer.
|
||||
Buffer is saved only if `buffer-modified-p' returns non-nil."
|
||||
"Save (if it is modified) and bury the current buffer."
|
||||
(interactive)
|
||||
(when (buffer-modified-p)
|
||||
(save-buffer))
|
||||
@@ -648,10 +650,16 @@ preserve across Emacs restarts. The notes will be stored in the
|
||||
buf))
|
||||
|
||||
(defun remember-notes--kill-buffer-query ()
|
||||
"Function that `remember-notes-mode' adds to `kill-buffer-query-functions'.
|
||||
Save the current buffer if modified. If `remember-notes-bury-on-kill'
|
||||
is non-nil, bury it and return nil; otherwise return t."
|
||||
(when (buffer-modified-p)
|
||||
(save-buffer))
|
||||
(if remember-notes-bury-on-kill
|
||||
(bury-buffer)
|
||||
(progn
|
||||
;; bury-buffer always returns nil, but let's be explicit.
|
||||
(bury-buffer)
|
||||
nil)
|
||||
t))
|
||||
|
||||
;;; remember.el ends here
|
||||
|
||||
Reference in New Issue
Block a user