From: plugd Date: Wed, 21 Jul 2021 21:36:51 +0000 (+0200) Subject: Improved keybinding compatibility between evil/non-evil. X-Git-Tag: v3.0.0~19 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=commitdiff_plain;h=91cf7b969ff2342a604e152b6c5547118f0b292c Improved keybinding compatibility between evil/non-evil. --- diff --git a/elpher.el b/elpher.el index 41d4a83..6530949 100644 --- a/elpher.el +++ b/elpher.el @@ -690,7 +690,7 @@ unless `elpher-gemini-TLS-cert-checks' is non-nil. If non-nil, FORCE-IPV4 causes the network connection to be made over ipv4 only. (The default behaviour when this is not set depends on -the host operating system and the local network capabilities." +the host operating system and the local network capabilities.)" (if (and use-tls (not (gnutls-available-p))) (error "Use of TLS requires Emacs to be compiled with GNU TLS support") (unless (< (elpher-address-port address) 65536) @@ -1633,10 +1633,10 @@ The result is rendered using RENDERER." " - c/C: copy URL representation of item under cursor or current page\n" " - a/A: bookmark the item under cursor or current page\n" " - B: list all bookmarks\n" - " - h/H: show history of current buffer or for all buffers\n" + " - s/S: show history of current buffer or for all buffers\n" " - r: redraw current page (using cached contents if available)\n" " - R: reload current page (regenerates cache)\n" - " - S: set character coding system for gopher (default is to autodetect)\n" + " - !: set character coding system for gopher (default is to autodetect)\n" " - T: toggle TLS gopher mode\n" " - F: forget/discard current TLS client certificate\n" " - .: display the raw server response for the current page\n" @@ -1713,13 +1713,16 @@ This is rendered using `elpher-get-history-all-page' via `elpher-type-map'." (defun elpher-show-history (pages) "Show all PAGES in the Elpher buffer." (elpher-with-clean-buffer + (insert "---- Visited link history ----\n\n") (if pages (dolist (page pages) (when page (let ((display-string (elpher-page-display-string page)) (address (elpher-page-address page))) (elpher-insert-index-record display-string address)))) - (insert "No history items found.\n")))) + (insert "No history items found.\n")) + (insert "\n----------------------------"))) + ;;; Bookmarks @@ -2133,8 +2136,8 @@ When run interactively HOST-OR-URL is read from the minibuffer." (define-key map (kbd "O") 'elpher-root-dir) (define-key map (kbd "g") 'elpher-go) (define-key map (kbd "o") 'elpher-go-current) - (define-key map (kbd "h") 'elpher-history) - (define-key map (kbd "H") 'elpher-history-all) + (define-key map (kbd "s") 'elpher-history) + (define-key map (kbd "S") 'elpher-history-all) (define-key map (kbd "r") 'elpher-redraw) (define-key map (kbd "R") 'elpher-reload) (define-key map (kbd "T") 'elpher-toggle-tls) @@ -2150,7 +2153,7 @@ When run interactively HOST-OR-URL is read from the minibuffer." (define-key map (kbd "a") 'elpher-set-bookmark-no-overwrite) (define-key map (kbd "A") 'bookmark-set-no-overwrite) (define-key map (kbd "B") 'bookmark-bmenu-list) - (define-key map (kbd "S") 'elpher-set-gopher-coding-system) + (define-key map (kbd "!") 'elpher-set-gopher-coding-system) (define-key map (kbd "F") 'elpher-forget-current-certificate) (when (fboundp 'evil-define-key*) (evil-define-key* @@ -2180,7 +2183,7 @@ When run interactively HOST-OR-URL is read from the minibuffer." (kbd "a") 'elpher-set-bookmark-no-overwrite (kbd "A") 'bookmark-set-no-overwrite (kbd "B") 'bookmark-bmenu-list - (kbd "S") 'elpher-set-gopher-coding-system + (kbd "!") 'elpher-set-gopher-coding-system (kbd "F") 'elpher-forget-current-certificate)) map) "Keymap for gopher client.") diff --git a/elpher.texi b/elpher.texi index 142be56..430d4ba 100644 --- a/elpher.texi +++ b/elpher.texi @@ -11,7 +11,7 @@ @copying This manual documents Elpher, a gopher and gemini client for Emacs. -Copyright @copyright{} 2019, 2020 Tim Vaughan@* +Copyright @copyright{} 2019, 2020, 2021 Tim Vaughan@* Copyright @copyright{} 2021 Daniel Semyonov@* Copyright @copyright{} 2021 Alex Schroeder @@ -237,8 +237,15 @@ Move to the previous link or menu item in the file. Jump directly to a link within a file by specifying its display string or link text. (Unlike the previous two commands, this immediately opens the selected link. + +@keycmd{@key{M}, elpher-jump-to-number} +Jump directly to a link within a file by specifying the number of the +link, where the first link on the page is link number 1. +(These indices can be shown next to the links by setting the customization +option elpher-number-links to non-nil.) @end table + The following commands can be used to retrieve information about the current page, or the address of the link at point: @@ -315,8 +322,9 @@ Once a text, menu or query response page has been displayed, its contents are cached for the duration of the Emacs session. @keycmd{@key{g}, elpher-go} -Open a particular page by specifying either its full URL or just entering -a gopher host name. (The protocol defaults to gopher, so gemini links must include the @code{gemini://} prefix. +Open a particular page by specifying either its full URL or just +entering a gopher host name. (The protocol defaults to gopher, so gemini +links must include the @code{gemini://} prefix. If a unsupported protocol is used in the URL the result will be the same as following a URL link of the same type from a link in a page. @@ -332,7 +340,7 @@ structure of selectors. @keycmd{@key{O}, elpher-root-dir} Open the root page (empty selector) on the current host. -@keycmd{@key{u}\, @kbd{mouse-3}, elpher-back} +@keycmd{@key{u}\, @key{-}\, @key{^}\, @kbd{mouse-3}, elpher-back} Return to the previous page, where ``previous'' means the page where the page which was displayed immediately before the current page. @end table @@ -378,11 +386,11 @@ Elpher actually maintains two histories, and there are two different commands to access them: @table @asis -@keycmd{@key{h}, elpher-history} +@keycmd{@key{s}, elpher-history} This shows the history of the current buffer. This shows all the links you would visit if you were to use @key{u} again and again. -@keycmd{@key{H}, elpher-history-all} +@keycmd{@key{S}, elpher-history-all} This shows the entire Elpher browsing history. It includes all the pages you visited using other Elpher buffers, and it includes buffers you later killed. @@ -413,8 +421,7 @@ delete and search bookmarks, for example. @end table If all your bookmarks disappeared in an upgrade from 2.10 to 2.11, you -need to import the old Elpher bookmarks into your Emacs bookmarks -using +can import your old Elpher bookmarks into your Emacs bookmarks using @example @kbd{M-x elpher-bookmark-import @key{RET}} @@ -448,7 +455,7 @@ The alternative is to explicitly set the coding system used for decoding using the following command: @table @asis -@keycmd{@key{S},elpher-set-coding-system} +@keycmd{@key{!},elpher-set-coding-system} Causes a elpher to prompt for a coding system to use for decoding future gopher text. The @key{TAB} key can be used at this prompt to display a list of alternatives (which is extensive) and to auto-complete. An empty