welcome: please sign in
location: History

History completion

The way to browse to an url from your history in Conkeror is in the find-url prompt. For historical reasons having to do with a Mozilla bug, history urls are not automatically included in the completions list. To have the find-url prompt included history urls in its completions, set this in your rc:

url_completion_use_history = true;

If you prefer not to have history mixed in with webjumps and bookmarks, you can create a separate command with its own bindings for it instead. The following code creates a command to just browse history, with separate bindings top open it in the existing buffer or a new buffer.

define_browser_object_class(
    "history-url", null, 
    function (I, prompt) {
        check_buffer (I.buffer, content_buffer);
        var result = yield I.buffer.window.minibuffer.read_url(
            $prompt = prompt,  $use_webjumps = false, $use_history = true, $use_bookmarks = false);
        yield co_return (result);
    });

interactive("find-url-from-history",
            "Find a page from history in the current buffer",
            "find-url",
            $browser_object = browser_object_history_url);

interactive("find-url-from-history-new-buffer",
            "Find a page from history in the current buffer",
            "find-url-new-buffer",
            $browser_object = browser_object_history_url);

define_key(content_buffer_normal_keymap, "h", "find-url-from-history-new-buffer");
define_key(content_buffer_normal_keymap, "H", "find-url-from-history");

Sorting

See url_completion_sort_order for information on url_completion_sort_order. The constants listed can be used in read_url with $sort_order per the example above.

History clearing preferences

The preference browser.history_expire_days determines how long in days history entries are kept before being automatically expired.

session_pref('browser.history_expire_days', 1);

Conkeror.org: History (last edited 2011-06-04 19:18:31 by bumblebees)