maxibuffer.el
;;; maxibuffer.el --- Request user input with a temporary buffer.
;;
;; Copyright (C) 2018 Trevor Bentley
;;
;; Author: Trevor Bentley <trevor@trevorbentley.com>
;; Created: 29 April 2018
;; Keywords: input
;; Version: 0.1.0
;;
;; This file is not part of GNU Emacs.
;;
;; maxibuffer.el is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; maxibuffer.el is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>
;;
;;
;;; Commentary:
;;
;; maxibuffer provides a way to request user input in a temporary buffer,
;; similar to the temporary buffers used by org-capture, org-src-edit, and magit
;; commit buffers. Sometimes you want to ask the user for plenty of input, and
;; let them write it in a real buffer with whichever modes they prefer, and get
;; the results back asynchronously. That's what maxibuffer is for.
;;
;; A maxibuffer can be spawned empty, or pre-filled with some text.
;;
;; Depending on how `maxibuffer-open` is called, when a maxibuffer is
;; saved-and-closed (with `C-c C-c` by default) the contents of the buffer are
;; either inserted at the point where the cursor was when the maxibuffer was
;; spawned, or passed to a provided callback function.
;;
;; A maxibuffer can be killed without saving with `C-c C-k` by default.
;;
;; Key bindings can be changed or extended by customizing `maxibuffer-mode-map`.
;;
;; Examples:
;;
;; `(maxibuffer-open)` -- Opens an empty maxibuffer. When the buffer is
;; saved, the contents of the buffer are inserted at the point where the
;; cursor was when the maxibuffer was opened.
;;
;; `(maxibuffer-open "His name is Robert Paulson." 'cb-fn)` -- Opens a
;; maxibuffer pre-populated with a string. When it is saved, the `cb-fn`
;; function is called with the entire contents of the maxibuffer.
;;
;; As a text, you can execute this line then type `C-c C-c` in the spawned
;; window. You should see this message, with any modifications you made,
;; printed in the echo area.
;;
;; (maxibuffer-open "This is a test" 'message)
;;
;;; Code:
;;;###autoload
;;; maxibuffer.el ends here