Some remember doc
* doc/misc/remember.texi: Copyedits. (Quick Start): No need for manual autoloads. Mention remember-notes. (Function Reference): Update arguments. Add new commands. * lisp/textmodes/remember.el: Set maintainer to emacs-devel according to remember.texi. Move provide statement to end. (remember-mode-map, remember-notes-mode-map, remember-notes-mode) (remember-notes): Doc fixes.
This commit is contained in:
parent
6cdb34f31f
commit
95160c901a
5 changed files with 100 additions and 55 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2014-02-19 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* remember.texi: Copyedits.
|
||||
(Quick Start): No need for manual autoloads. Mention remember-notes.
|
||||
(Function Reference): Update arguments. Add new commands.
|
||||
|
||||
2014-02-18 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* remember.texi (copying): Bump remember mode version.
|
||||
|
|
|
|||
|
|
@ -96,8 +96,8 @@ to remember what our conscious mind may not currently have access to.
|
|||
There are many different databases out there---and good ones---which
|
||||
this mode is not trying to replace. Rather, it's how that data gets
|
||||
there that's the question. Most of the time, we just want to say
|
||||
"Remember so-and-so's phone number, or that I have to buy dinner for the
|
||||
cats tonight." That's the FACT@. How it's stored is really the
|
||||
``Remember so-and-so's phone number, or that I have to buy dinner for the
|
||||
cats tonight.'' That's the FACT@. How it's stored is really the
|
||||
computer's problem. But at this point in time, it's most definitely
|
||||
also the user's problem, and sometimes so laboriously so that people
|
||||
just let data slip, rather than expend the effort to record it.
|
||||
|
|
@ -175,7 +175,7 @@ feedback will help to make this as intuitive a tool as possible.
|
|||
@itemize
|
||||
|
||||
@item
|
||||
Type @kbd{M-x remember}. The @samp{*Remember*} buffer should be
|
||||
Type @kbd{M-x remember}. The @file{*Remember*} buffer should be
|
||||
displayed.
|
||||
|
||||
@item
|
||||
|
|
@ -185,7 +185,7 @@ note.
|
|||
|
||||
@item
|
||||
Type @kbd{C-c C-c} (@code{remember-finalize}) to save the note and close
|
||||
the @samp{*Remember*} buffer.
|
||||
the @file{*Remember*} buffer.
|
||||
@end itemize
|
||||
|
||||
By default, @code{remember-finalize} saves the note in @file{~/emacs.d/notes}.
|
||||
|
|
@ -194,7 +194,7 @@ 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
|
||||
remember} displays a @samp{*Remember*} buffer with the region as the
|
||||
remember} displays a @file{*Remember*} buffer with the region as the
|
||||
initial contents.
|
||||
|
||||
As a simple beginning, you can start by using the Text File backend,
|
||||
|
|
@ -203,26 +203,23 @@ 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.
|
||||
(@pxref{Backends})
|
||||
You can also store remembered data in other backends. @xref{Backends}.
|
||||
|
||||
Here is one way to map the remember functions in your @file{.emacs} to
|
||||
Here is one way to map the remember functions in your init file to
|
||||
very accessible keystrokes facilities using the mode:
|
||||
|
||||
@lisp
|
||||
(autoload 'remember ``remember'' nil t)
|
||||
(autoload 'remember-region ``remember'' nil t)
|
||||
|
||||
(define-key global-map (kbd "<f9> r") 'remember)
|
||||
(define-key global-map (kbd "<f9> R") 'remember-region)
|
||||
@end lisp
|
||||
|
||||
By default, remember uses the first annotation returned by
|
||||
@code{remember-annotation-functions}. To include all of the annotations,
|
||||
set @code{remember-run-all-annotation-functions-flag} to non-nil.
|
||||
set @code{remember-run-all-annotation-functions-flag} to a
|
||||
non-@code{nil} value.
|
||||
|
||||
@defopt remember-run-all-annotation-functions-flag
|
||||
Non-nil means use all annotations returned by
|
||||
Non-@code{nil} means use all annotations returned by
|
||||
@code{remember-annotation-functions}.
|
||||
@end defopt
|
||||
|
||||
|
|
@ -237,17 +234,32 @@ remember-annotation-functions. For example:
|
|||
(call-interactively 'remember)))
|
||||
@end lisp
|
||||
|
||||
@cindex notes
|
||||
The @code{remember-notes} command creates a @dfn{notes} buffer that
|
||||
visits the file specified by the option @code{remember-data-file}.
|
||||
The option @code{remember-notes-buffer-name} specifies the name of the
|
||||
buffer. The buffer uses @code{remember-notes-initial-major-mode} and
|
||||
@code{remember-notes-mode} minor mode. Use @kbd{C-c C-c} to save
|
||||
and bury the buffer. The command @code{save-some-buffers} saves this
|
||||
buffer without asking. This function is a suitable setting for
|
||||
@code{initial-buffer-choice}.
|
||||
|
||||
|
||||
@node Function Reference
|
||||
@chapter Function Reference
|
||||
|
||||
@file{remember.el} defines the following interactive functions:
|
||||
|
||||
@defun remember initial
|
||||
@defun remember &optional initial
|
||||
Remember an arbitrary piece of data. With a prefix, it will use the
|
||||
region as @var{initial}.
|
||||
@end defun
|
||||
|
||||
@defun remember-region beg end
|
||||
@defun remember-other-frame &optional initial
|
||||
Like @code{remember}, but uses a new frame.
|
||||
@end defun
|
||||
|
||||
@defun remember-region &optional beg end
|
||||
If called from within the remember buffer, @var{beg} and @var{end} are
|
||||
ignored, and the entire buffer will be remembered. If called from any
|
||||
other buffer, that region, plus any context information specific to
|
||||
|
|
@ -263,13 +275,37 @@ for remembering things from Netscape or other X Windows applications.
|
|||
Remember the contents of the current buffer.
|
||||
@end defun
|
||||
|
||||
@defun remember-destroy
|
||||
Destroy the current remember buffer.
|
||||
@end defun
|
||||
|
||||
@defun remember-mode
|
||||
This enters the major mode for output from @command{remember}. This
|
||||
This enters the major mode for output from @code{remember}. This
|
||||
buffer is used to collect data that you want remember. Just hit
|
||||
@kbd{C-c C-c} when you're done entering, and it will go ahead and file
|
||||
the data for latter retrieval, and possible indexing.
|
||||
@end defun
|
||||
|
||||
@defun remember-notes &optional switch-to
|
||||
This returns the notes buffer, creating it if needed, and switches
|
||||
to it if called interactively (or if @var{switch-to} is non-@code{nil}).
|
||||
The notes buffer visits @code{remember-data-file}, and
|
||||
is named @code{remember-notes-buffer-name}. It uses
|
||||
@code{remember-notes-initial-major-mode} and @code{remember-notes-mode}
|
||||
minor mode.
|
||||
@end defun
|
||||
|
||||
@defun remember-notes-mode &optional arg
|
||||
This is a minor mode for the notes buffer. It sets
|
||||
@code{buffer-save-without-query} so that @code{save-some-buffers} will
|
||||
save the notes buffer without asking. Use @kbd{C-c C-c} to
|
||||
run the command @code{remember-notes-save-and-bury-buffer}.
|
||||
@end defun
|
||||
|
||||
@defun remember-notes-save-and-bury-buffer
|
||||
Save (if it is modified) and bury the current buffer.
|
||||
@end defun
|
||||
|
||||
@node Keystrokes
|
||||
@chapter Keystroke Reference
|
||||
|
||||
|
|
@ -277,14 +313,12 @@ the data for latter retrieval, and possible indexing.
|
|||
|
||||
@table @kbd
|
||||
|
||||
@item C-c C-c (`remember-finalize')
|
||||
Remember the contents of the current buffer.
|
||||
@item C-c C-c
|
||||
@itemx C-x C-s
|
||||
Remember the contents of the current buffer (`remember-finalize').
|
||||
|
||||
@item C-c C-k (`remember-destroy')
|
||||
Destroy the current *Remember* buffer.
|
||||
|
||||
@item C-x C-s (`remember-finalize')
|
||||
Remember the contents of the current buffer.
|
||||
@item C-c C-k
|
||||
Destroy the current @file{*Remember*} buffer (`remember-destroy').
|
||||
|
||||
@end table
|
||||
|
||||
|
|
@ -359,7 +393,7 @@ of saving, using this format string.
|
|||
|
||||
@defopt remember-diary-file
|
||||
File for extracted diary entries.
|
||||
If this is nil, then @code{diary-file} will be used instead."
|
||||
If this is @code{nil}, then @code{diary-file} will be used instead.
|
||||
@end defopt
|
||||
|
||||
@node Mailbox
|
||||
|
|
|
|||
10
etc/NEWS
10
etc/NEWS
|
|
@ -713,13 +713,9 @@ along with the non-SMIE indentation code.
|
|||
|
||||
** Remember
|
||||
|
||||
*** The new command `remember-notes' creates a buffer that is saved on
|
||||
`kill-emacs'. You can think of it as a *scratch* buffer whose content
|
||||
is preserved. In fact, it was designed as a replacement for *scratch*
|
||||
buffer and can be used that way by setting `initial-buffer-choice' to
|
||||
`remember-notes' and `remember-notes-buffer-name' to "*scratch*".
|
||||
Without the second change, the *scratch* buffer will still be there
|
||||
for notes that do not need to be preserved.
|
||||
+++
|
||||
*** The new command `remember-notes' creates a buffer that is saved on exit.
|
||||
You can use it as a more permanent *scratch* buffer.
|
||||
|
||||
+++
|
||||
*** Remember can now store notes in separate files.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
2014-02-19 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* textmodes/remember.el: Move provide statement to end.
|
||||
(remember-mode-map, remember-notes-mode-map, remember-notes-mode)
|
||||
(remember-notes): Doc fixes.
|
||||
|
||||
2014-02-18 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* delsel.el (delete-char): Restore incorrectly erased property
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
;; Copyright (C) 1999-2001, 2003-2014 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: John Wiegley <johnw@gnu.org>
|
||||
;; Maintainer: emacs-devel@gnu.org
|
||||
;; Created: 29 Mar 1999
|
||||
;; Version: 2.0
|
||||
;; Keywords: data memory todo pim
|
||||
|
|
@ -178,8 +179,6 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(provide 'remember)
|
||||
|
||||
(defconst remember-version "2.0"
|
||||
"This version of remember.")
|
||||
|
||||
|
|
@ -230,6 +229,8 @@ recorded somewhere by that function."
|
|||
:type 'boolean
|
||||
:group 'remember)
|
||||
|
||||
;; See below for more user variables.
|
||||
|
||||
;;; Internal Variables:
|
||||
|
||||
(defvar remember-buffer "*Remember*"
|
||||
|
|
@ -553,7 +554,7 @@ If this is nil, then `diary-file' will be used instead."
|
|||
(define-key map "\C-c\C-c" 'remember-finalize)
|
||||
(define-key map "\C-c\C-k" 'remember-destroy)
|
||||
map)
|
||||
"Keymap used in Remember mode.")
|
||||
"Keymap used in `remember-mode'.")
|
||||
|
||||
(define-derived-mode remember-mode indented-text-mode "Remember"
|
||||
"Major mode for output from \\[remember].
|
||||
|
|
@ -599,10 +600,14 @@ If this is nil, use `initial-major-mode'."
|
|||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "\C-c\C-c" 'remember-notes-save-and-bury-buffer)
|
||||
map)
|
||||
"Keymap used in remember-notes mode.")
|
||||
"Keymap used in `remember-notes-mode'.")
|
||||
|
||||
(define-minor-mode remember-notes-mode
|
||||
"Minor mode for the `remember-notes' buffer."
|
||||
"Minor mode for the `remember-notes' buffer.
|
||||
This sets `buffer-save-without-query' so that `save-some-buffers' will
|
||||
save the notes buffer without asking.
|
||||
|
||||
\\{remember-notes-mode-map}"
|
||||
nil nil nil
|
||||
(cond
|
||||
(remember-notes-mode
|
||||
|
|
@ -612,29 +617,25 @@ If this is nil, use `initial-major-mode'."
|
|||
|
||||
;;;###autoload
|
||||
(defun remember-notes (&optional switch-to)
|
||||
"Creates notes buffer and switches to it if called interactively.
|
||||
"Return the notes buffer, creating it if needed, and maybe switch to it.
|
||||
This buffer is for notes that you want to preserve across Emacs sessions.
|
||||
The notes are saved in `remember-data-file'.
|
||||
|
||||
If a notes buffer created by a previous invocation of this
|
||||
function already exist, it will be returned. Otherwise a new
|
||||
buffer will be created whose content will be read from file
|
||||
pointed by `remember-data-file'. If a buffer visiting this file
|
||||
already exist, that buffer will be used instead of creating a new
|
||||
one (see `find-file-noselect' function for more details).
|
||||
If a buffer is already visiting that file, just return it.
|
||||
|
||||
Name of the created buffer is taken from `remember-notes-buffer-name'
|
||||
variable and if a buffer with that name already exist (but was not
|
||||
created by this function), it will be first killed.
|
||||
\\<remember-notes-mode-map>
|
||||
`remember-notes-mode' is active in the notes buffer which by default
|
||||
contains only one \\[save-and-bury-buffer] binding which saves and
|
||||
buries the buffer.
|
||||
Otherwise, create the buffer, and rename it to `remember-notes-buffer-name',
|
||||
unless a buffer of that name already exists. Set the major mode according
|
||||
to `remember-notes-initial-major-mode', and enable `remember-notes-mode'
|
||||
minor mode.
|
||||
|
||||
Function returns notes buffer. When called interactively,
|
||||
switches to it as well.
|
||||
Use \\<remember-notes-mode-map>\\[remember-notes-save-and-bury-buffer] to save and bury the notes buffer.
|
||||
|
||||
Notes buffer is meant for keeping random notes which you'd like to
|
||||
preserve across Emacs restarts. The notes will be stored in the
|
||||
`remember-data-file'."
|
||||
Interactively, or if SWITCH-TO is non-nil, switch to the buffer.
|
||||
Return the buffer.
|
||||
|
||||
Set `initial-buffer-choice' to `remember-notes' to visit your notes buffer
|
||||
when Emacs starts. Set `remember-notes-buffer-name' to \"*scratch*\"
|
||||
to turn the *scratch* buffer into your notes buffer."
|
||||
(interactive "p")
|
||||
(let ((buf (or (find-buffer-visiting remember-data-file)
|
||||
(with-current-buffer (find-file-noselect remember-data-file)
|
||||
|
|
@ -662,4 +663,6 @@ is non-nil, bury it and return nil; otherwise return t."
|
|||
nil)
|
||||
t))
|
||||
|
||||
(provide 'remember)
|
||||
|
||||
;;; remember.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue