Function: remember-notes

remember-notes is an autoloaded, interactive and byte-compiled function defined in remember.el.gz.

Signature

(remember-notes &optional SWITCH-TO)

Documentation

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 buffer is already visiting that file, just return it.

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(var)/remember-notes-mode(fun) minor mode.

Use C-c C-c (remember-notes-save-and-bury-buffer) to save and bury the notes buffer.

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.

Probably introduced at or before Emacs version 24.4.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/remember.el.gz
;;;###autoload
(defun remember-notes (&optional switch-to)
  "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 buffer is already visiting that file, just return it.

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.

Use \\<remember-notes-mode-map>\\[remember-notes-save-and-bury-buffer] to save and bury the notes buffer.

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)
                   (when remember-notes-buffer-name
                     (when (and (get-buffer remember-notes-buffer-name)
                                (equal remember-notes-buffer-name "*scratch*"))
                       (kill-buffer remember-notes-buffer-name))
                     ;; Rename the buffer to the requested name (if
                     ;; it's not already in use).
                     (unless (get-buffer remember-notes-buffer-name)
                       (rename-buffer remember-notes-buffer-name)))
                   (funcall (or remember-notes-initial-major-mode
                                initial-major-mode))
                   (remember-notes-mode 1)
                   (current-buffer)))))
    (when switch-to
      (pop-to-buffer-same-window buf))
    buf))