+;; Start page node retrieval
+
+(defun elpher-get-start-node ()
+ "Getter which displays the start page."
+ (elpher-with-clean-buffer
+ (insert " --------------------------------------------\n"
+ " Elpher Gopher Client \n"
+ " version " elpher-version "\n"
+ " --------------------------------------------\n"
+ "\n"
+ "Default bindings:\n"
+ "\n"
+ " - TAB/Shift-TAB: next/prev item on current page\n"
+ " - RET/mouse-1: open item under cursor\n"
+ " - m: select an item on current page by name (autocompletes)\n"
+ " - u: return to previous page\n"
+ " - o/O: visit different selector or the root menu of the current server\n"
+ " - g: go to a particular gopher address\n"
+ " - i/I: info on item under cursor or current page\n"
+ " - c/C: copy URL representation of item under cursor or current page\n"
+ " - a/A: bookmark the item under cursor or current page\n"
+ " - x/X: remove bookmark for item under cursor or current page\n"
+ " - B: visit the bookmarks page\n"
+ " - r: redraw current page (using cached contents if available)\n"
+ " - R: reload current page (regenerates cache)\n"
+ " - T: toggle TLS mode\n"
+ " - d/D: download item under cursor or current page\n"
+ " - .: display the raw server response for the current page\n"
+ " - S: set an explicit character coding system (default is to autodetect)\n"
+ "\n"
+ "Start your exploration of gopher space:\n")
+ (elpher-insert-index-record "Floodgap Systems Gopher Server"
+ (elpher-make-address ?1 "" "gopher.floodgap.com" 70))
+ (insert "\n"
+ "Alternatively, select the following item and enter some search terms:\n")
+ (elpher-insert-index-record "Veronica-2 Gopher Search Engine"
+ (elpher-make-address ?7 "/v2/vs" "gopher.floodgap.com" 70))
+ (insert "\n"
+ "** Refer to the ")
+ (let ((help-string "RET,mouse-1: Open Elpher info manual (if available)"))
+ (insert-text-button "Elpher info manual"
+ 'face 'link
+ 'action (lambda (button)
+ (interactive)
+ (info "(elpher)"))
+ 'follow-link t
+ 'help-echo help-string))
+ (insert " for the full documentation. **\n")
+ (insert (propertize
+ (concat " (This should be available if you have installed Elpher using\n"
+ " MELPA. Otherwise you will have to install the manual yourself.)")
+ 'face 'shadow))
+ (elpher-restore-pos)))
+
+;; Bookmarks page node retrieval
+
+(defun elpher-get-bookmarks-node ()
+ "Getter to load and display the current bookmark list."
+ (elpher-with-clean-buffer
+ (insert "---- Bookmark list ----\n\n")
+ (let ((bookmarks (elpher-load-bookmarks)))
+ (if bookmarks
+ (dolist (bookmark bookmarks)
+ (let ((display-string (elpher-bookmark-display-string bookmark))
+ (address (elpher-bookmark-address bookmark)))
+ (elpher-insert-index-record display-string address)))
+ (insert "No bookmarks found.\n")))
+ (insert "\n-----------------------\n\n"
+ "- u: return to previous page\n"
+ "- x: delete selected bookmark\n"
+ "- a: rename selected bookmark\n\n"
+ "Bookmarks are stored in the file "
+ (locate-user-emacs-file "elpher-bookmarks"))
+ (elpher-restore-pos)))
+