Next User Manual

Next User Manual

Next is the next generation browsing experience designed for power users. 100% of the functions and classes are exposed to the end-user allowing for infinite customization.

Contents TOC


Within a tab, all navigation is possible using only the keyboard. To navigate up and down on a web page, the following keybindings are provided.

  1. C-n: Move down
  2. C-p: Move up
  3. scroll-left: Move left (no keybindings for now)
  4. scroll-right: Move right (no keybindings for now)
  5. M->: Jump to bottom of page
  6. M-<: Jump to top of page

Zooming page

Use the zoom keybindings to make everything on a webpage larger or smaller. These keybindings mimic the Emacs counterpart:

  1. C-x C-=: Increase size
  2. C-x C--: Decrease size
  3. C-x C-0: Restore defaults

In order to visit a link, one never has to remove their fingers from the keyboard. It works like this:

  1. Enter in a special key combination C-g
  2. Several strings will appear on screen "AZ" "CY", these special strings represent links that you can visit
  3. Enter in one of these strings into the minibuffer
  4. Press Return
  5. Visit the page

The full key-bindings for link-hint based navigate are found below:

  1. C-g: Go to link in current tab
  2. M-g: Create new tab with link, focus on new tab
  3. C-u M-g: Create new tab with link, keep focus on current tab

Visiting URLs

When ambiguous URLs are inputted, Next will attempt the best guess about what the user wishes. If the user does not supply a protocol in a URL, https will be assumed. To visit a site supporting only http, the user must explicitly type the full URL with http included.

  1. C-l: Change URL of current document
  2. M-l: New document-mode tab

Searching via search engine

To search via search engine, within the the new URL prompt, simply enter "s your search query". In the previous example, a search engine would query "your search query".

Therefore, the complete steps to searching are C-l or M-l, then, when the prompt appears, enter "s <search terms>".

Jumping to Headings

Jumping to different headings based on fuzzy completion is available via the following keybindings:

  1. C-.: Jump to heading

Input (Minibuffer)

All input is handled within a special area called the minibuffer. The minibuffer will appear at the bottom of the screen when the user is responsible for inputting some value. The minibuffer may also suggest completions.

Any time a function activates the minibuffer there are two applicable returns:

  1. C-RET: Return Immediate - Return EXACTLY what has been typed into the minibuffer, ignoring completions.
  2. RET: Return Complete - If completion function provided, return the selected completion candidate. If completion not provided return the EXACT text inputted into the minibuffer. If completion function provided, no completion applicable (selected), and the :empty-complete is a truthy value, the function will accept the EXACT text inputted into the minibuffer.

Below is a concrete example that may help clarify the usage of RET

(:input-complete *minibuffer* set-url-new-buffer
history-typed-complete :empty-complete t)

In the above case set-url-new-buffer will attempt to be completed by history-typed-complete. If there are no suitable candidates, e.g. the user is attempting to visit a URL they have never visited before, :empty-complete t will allow the return-input to return the literal input to set-url-new-buffer.

Tabs (Buffers)

Tabs are represented by a concept known as "buffers". Buffers are known in other GUIs as Views. Unlike in other GUI systems, the controller for a view can dynamically change. Given a buffer composed of a web-view and a document-mode model, one can dynamically set the controller to any other mode. This enables run-time specialization and modification of widget behavior.

The standard keybindings for tab management (within document-mode) are:

  1. C-x b: Switch tab
  2. C-x k: Kill tab
  3. M-l: New document-mode tab
  4. C-l: Change URL of current document
  5. C-t: Make new empty buffer

Switching Tabs by Order

In addition to switching tabs by selecting the current tab, you can cycle through them. This enables you to jump back and forth between two tabs that are next to each other.

  1. C-[: Switch tab previous
  2. C-]: Switch tab next


There are a number of keybindings provided to enable searching within a buffer.

  1. C-s s: Search for a Given Term: This command will place a red box next to every match on a given web-page.
  2. C-s n: Next match: This command will move the next match to the top of the browser screen.
  3. C-s p: Previous match: This command will move the previous match to the top of the browser screen.
  4. C-s k: Clear Search: Remove the read search boxes from the screen.


History is represented as a tree that you can traverse. More complex than the "forwards-backwards" abstraction found in other browsers, the tree makes sure you never lose track of where you've been.

In the example below, the User performs the following actions:

  1. Starts page Athens
  2. Visits page Ancient Greek
  3. Returns to page Athens
  4. Visits page Classical Athens
  5. Returns to page Athens
  6. Executes forwards keybind in history

It is at this point that a normal browser would NOT be able to navigate you forwards to your visit of Ancient Greek. Instead of erasing your history, Next offers smart navigation and prompts the user. Do you wish to go forwards to Ancient Greek or to Classical Athens?

The standard keybindings for forward-backward navigation are:

  1. C-f: Navigate Forward
  2. C-b: Navigate Backward
  3. M-f: Navigate Forward Tree
  4. M-b: Navigate Backward

By using navigate forward tree you will be prompted for which branch you'd like to visit as in the example above. The simple navigate forward command will simply visit the first child of the current node in the tree.


Bookmarks are located in a database located in ~/.local/share/next/bookmark.db. This directory and database will be created automatically for you. The bookmark database is a SQLITE database that contains one table with two columns: id, url. In order to navigate and manage your bookmarks, a few functions are provided:

  1. C-m k: Delete Bookmark
  2. C-m o: Open Bookmark
  3. C-m s: Bookmark Current Page
  4. C-m u: Bookmark URL (input URL via minibuffer)
  5. C-m g: Bookmark Anchor (input URL via link hints)


To exit Next enter the key-combination C-x C-c and the program will quit. All of your open tabs and form data will not be persisted. The only information saved will be your filled in passwords, cookies, and other information within your cache.

Advanced Topics

Execute Extended Command

You can execute any command by name by typing M-x or ESCAPE x. This will bring up a list of candidates that you can fuzzily complete.


The help system allows you to look up variable and function docstrings directly within Next. Docstrings will appear in a new help buffer.

  1. C-h v: Look up a variable docstring
  2. C-h c: Look up a command docstring

Slime with a compiled version of Next

Slime provides a way of interacting with Next, and with Lisp code in general (in a REPL like manner).

From the Slime Manual:

SLIME extends Emacs with support for interactive programming in Common Lisp. The features are centered around slime-mode, an Emacs minor-mode that complements the standard lisp-mode. While lisp-mode supports editing Lisp source files, slime-mode adds support for interacting with a running Common Lisp process for compilation, debugging, documentation lookup, and so on.

To use Slime with a compiled version of Next use the keybinding S-h s to launch a Swank server. Slime will connect to the Swank server and give you completion, debugging, documentation, etc. The default port for Swank on Next is 4006 to avoid collisions with the default Swank port of 4005 within an Emacs *inferior-lisp* process.

After launching the Swank server in Next- within Emacs execute:

  1. M-x
  2. slime-connect
  3. Enter for the host
  4. Enter 4006 for the port (Next variable *swank-port*)

To customize the port that Swank starts on, edit the global variable *swank-port* in your init file.


All customization begins by creating a ~/.config/next/init.lisp file. Within your init file you can write your own keybindings and customizations. If the directory ~/.config/next/ does not already exist, you will have to make it.

The first line of an init file should contain the following package declaration in order to modify Next specific variables and functions:

(in-package :next)

Following the package declaration, you can write or override any functions and variables.


Keys are defined with the following syntax:

(define-key *global-map* (key "C-x o") #'function-example)

in the previous example, the sequence of keys: control+x, lift hands off control key, o would invoke the "function-example". Additionally important to note is that the key sequence control+x is now registered as a special type keybinding, a prefix. A prefix key can, but should not be mapped. If a subsequent mapping was to bind control+x, it would be unclear to Next what keybinding invocation the user is trying to type.

The following keys exist as special keys:

  1. C: Control
  2. S: Super (Windows key, Command Key)
  3. M: Meta (Alt key, Option Key)

Loading Files

To load a file again, or reload an init file use the function load-file. Within the minibuffer prompt enter the full path to the file you wish to load.

  1. C-o: Load File

A convenience function for reloading the init file called reload-init can also be keybound.

Creating your own interactive commands

Creating your own invokable commands is the same as creating any other defun except the form is define-command. A docstring is highly reccommend and will produce a style warning when it is missing.

An example of a trivial command definition can be seen below.

(define-command bookmark-url ()
  "Allow the user to bookmark a URL via minibuffer input."
  (with-result (url (read-from-minibuffer *minibuffer*))
    (%bookmark-url url)))

Getting input from the user

Getting input from the user via the minibuffer is an asynchronous command. That is why the read-from-minibuffer function is wrapped within a continuation passing style macro with-result. The form therefore takes the following look:

(with-result (variable-name-to-bind-minibuffer-input
              (read-from-minibuffer  *minibuffer*))
  (print variable-name-to-bind-minibuffer-input))