Skip to content

Latest commit

 

History

History
50 lines (41 loc) · 1.39 KB

README.md

File metadata and controls

50 lines (41 loc) · 1.39 KB

Yaps - Yet Another Persistent Scratch

Introduction

Yaps makes your *scratch* buffer persistent and not killable (bury instead).

Install

If you don't have ELPA package in your Emacs, clone this repository and load file.

git clone https://github.com/rayw000/yaps.git
(load-file "/path/to/yaps/yaps.el")

Or install with ELPA

M-x package-install <RET> yaps <RET>

Usage

(require 'yaps)
(yaps-setup)

You may want to hook yaps-setup to emacs-startup-hook.

(add-hook 'emacs-startup-hook 'yaps-setup)

Functions

  • yaps-save-scratch-data: Save scratch contents into yaps-data-directory. C-x C-s is remapped to this function.
  • yaps-clear-scratch-data: Clear scratch contents.
  • yaps-bury-scratch-buffer: Bury (instead of kill) scratch buffer.
  • yaps-restore-data-from-file: Restore data from yaps data file.

Customizations

Variables
  • yaps-scratch-buffer-name: Buffer name which you want to use yaps with, default to *scratch*.
  • yaps-data-directory: Directory to store yaps data file yaps.data.
Key bindings

You can bind your favorite keys in yaps-mode-map. For example,

(define-key yaps-mode-map (kbd "C-c C-r") 'yaps-restore-data-from-file)

Similar packages

persistent-scratch