File: quickurl.el.html
This package provides a simple method of inserting a URL based on the text at point in the current buffer. This is part of an on-going effort to increase the information I provide people while reducing the amount of typing I need to do. No-doubt there are undiscovered Emacs packages out there that do all of this and do it better, feel free to point me to them, in the mean time I'm having fun playing with Emacs Lisp.
The URLs are stored in an external file as a list of either cons cells, or lists. A cons cell entry looks like this:
(<Lookup> . <URL>)
where <Lookup> is a string that acts as the keyword lookup and <URL> is the URL associated with it. An example might be:
("GNU" . "https://www.gnu.org/")
A list entry looks like:
(<Lookup> <URL> <Comment>)
where <Lookup> and <URL> are the same as with the cons cell and <Comment>
is any text you like that describes the URL. This description will be
used when presenting a list of URLS using quickurl-list. An example
might be:
("FSF" "https://www.fsf.org/" "The Free Software Foundation")
Given the above, your quickurl file might look like:
(("GNU" . "https://www.gnu.org/")
("FSF" "https://www.fsf.org/" "The Free Software Foundation")
("emacs" . "https://www.emacs.org/")
("davep" "http://www.davep.org/" "Dave's homepage"))
In case you're wondering about the mixture of cons cells and lists, quickurl started life using just the cons cells, there were no comments. URL comments are a later addition and so there is a mixture to keep backward compatibility with existing URL lists.
The name and location of the file is up to you, the default name used by
quickurl is stored in quickurl-url-file.
quickurl is always available from:
<URL:http://www.davep.org/emacs/quickurl.el>
Defined variables (16)
quickurl-assoc-function | Function to use for alist lookup into ‘quickurl-urls’. |
quickurl-completion-ignore-case | Should ‘quickurl-ask’ ignore case when doing the input lookup? |
quickurl-format-function | Function to format the URL before insertion into the current buffer. |
quickurl-grab-lookup-function | Function to grab the thing to lookup. |
quickurl-list-buffer-name | Name for the URL listing buffer. |
quickurl-list-last-buffer | ‘current-buffer’ when ‘quickurl-list’ was called. |
quickurl-list-mode-abbrev-table | Abbrev table for ‘quickurl-list-mode’. |
quickurl-list-mode-hook | Hooks for ‘quickurl-list-mode’. |
quickurl-list-mode-map | Local keymap for a ‘quickurl-list-mode’ buffer. |
quickurl-list-mode-syntax-table | Syntax table for ‘quickurl-list-mode’. |
quickurl-postfix | Text to write to ‘quickurl-url-file’ after writing the URL list. |
quickurl-prefix | Text to write to ‘quickurl-url-file’ before writing the URL list. |
quickurl-reread-hook-postfix | Example ‘quickurl-postfix’ text that adds a local variable to the |
quickurl-sort-function | Function to sort the URL list. |
quickurl-url-file | File that contains the URL list. |
quickurl-urls | URL alist for use with ‘quickurl’ and ‘quickurl-ask’. |
Defined functions (34)
quickurl | (&optional LOOKUP) |
quickurl--assoc-function | (KEY ALIST) |
quickurl-add-url | (WORD URL COMMENT) |
quickurl-ask | (LOOKUP) |
quickurl-browse-url | (&optional LOOKUP) |
quickurl-browse-url-ask | (LOOKUP) |
quickurl-edit-urls | () |
quickurl-find-url | (LOOKUP) |
quickurl-format-url | (URL) |
quickurl-grab-url | () |
quickurl-insert | (URL &optional SILENT) |
quickurl-list | () |
quickurl-list-add-url | (WORD URL COMMENT) |
quickurl-list-insert | (TYPE) |
quickurl-list-insert-lookup | () |
quickurl-list-insert-naked-url | () |
quickurl-list-insert-url | () |
quickurl-list-insert-with-desc | () |
quickurl-list-insert-with-lookup | () |
quickurl-list-make-inserter | (TYPE) |
quickurl-list-mode | () |
quickurl-list-mouse-select | (EVENT) |
quickurl-list-populate-buffer | () |
quickurl-list-quit | () |
quickurl-load-urls | () |
quickurl-make-url | (KEYWORD URL &optional COMMENT) |
quickurl-read | (&optional BUFFER) |
quickurl-save-urls | () |
quickurl-sort-urls | (LIST) |
quickurl-url-comment | (URL) |
quickurl-url-commented-p | (URL) |
quickurl-url-description | (URL) |
quickurl-url-keyword | (URL) |
quickurl-url-url | (URL) |