Skip to content
vic

Wilfred/refine

interactive value editing in emacs lisp

Wilfred/refine.json
{
"createdAt": "2016-04-10T13:47:45Z",
"defaultBranch": "master",
"description": "interactive value editing in emacs lisp",
"fullName": "Wilfred/refine",
"homepage": "",
"language": "Emacs Lisp",
"name": "refine",
"pushedAt": "2024-09-14T06:34:15Z",
"stargazersCount": 86,
"topics": [],
"updatedAt": "2024-12-15T23:17:29Z",
"url": "https://github.com/Wilfred/refine"
}

Build Status Coverage Status MELPA MELPA Stable

inspect and modify elisp variables

Refine provides a convenient UI for editing variables. Refine is not for editing files, but for changing elisp variables, particularly lists.

Table of Contents

![edit_hook]!(edit_hook.gif)

Refine is great for editing large lists, such as hooks. In the above example, I insert and edit values in prog-mode-hook.

![kill_ring]!(kill_ring.gif)

Refine is also a valuable debugging tool. In this example, I reorder items in the kill-ring so I paste the value I want.

Refine deliberately modifies values in place. This is useful if you’re working with a list that’s shared between multiple variables, such as font-lock-defaults.

In some cases, this isn’t possible (e.g. inserting into an empty list). In these cases, refine will overwrite your variable.

Editing:

commandbinding
refine-edite or RET
refine-cyclec
refine-inserti
refine-insert-aftera
refine-deletek
refine-move-forwards or <M-up>
refine-move-backwardw or <M-down>

Moving around:

commandbinding
refine-nextn
refine-previousp

Buffer commands:

commandbinding
refine-updateg
kill-this-bufferq

Install from MELPA (recommended), or add refine.el to load-path.

You can run tests inside Emacs by just opening the test files and doing M-x eval-buffer M-x ert RET t RET.

Alternatively, you can run the test from a shell:

$ cask install
$ cask exec ert-runner

Note that refine has had infinite loop bugs during development, so you may need to press Ctrl-C if tests don’t terminate.

counsel-set-variable (part of ivy) is also an excellent way of editing variables in Emacs.

edit-list provides list editing in a very similar style to refine. It doesn’t edit in-place, nor work as well for hooks, but does provide an elegant, Emacsy UI.