Optional image caching, viewing checks for GUI.
[elpher.git] / elpher.el
1 ;;; elpher.el --- Full-featured gopher client.
2
3 ;; Copyright (C) 2019 Tim Vaughan
4
5 ;; Author: Tim Vaughan <tgvaughan@gmail.com>
6 ;; Created: 11 April 2019
7 ;; Version: 1.0.0
8 ;; Keywords: comm gopher
9 ;; Homepage: https://github.com/tgvaughan/elpher
10 ;; Package-Requires: ((emacs "25"))
11
12 ;; This file is not part of GNU Emacs.
13
14 ;; This program is free software: you can redistribute it and/or modify
15 ;; it under the terms of the GNU General Public License as published by
16 ;; the Free Software Foundation, either version 3 of the License, or
17 ;; (at your option) any later version.
18
19 ;; This program is distributed in the hope that it will be useful,
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22 ;; GNU General Public License for more details.
23
24 ;; You should have received a copy of the GNU General Public License
25 ;; along with this file.  If not, see <http://www.gnu.org/licenses/>.
26
27 ;;; Commentary:
28
29 ;; Elpher is a tool for exploring "gopherspace" using GNU Emacs.
30
31 ;;; Code:
32
33 (provide 'elpher)
34
35 ;;; Global constants
36 ;;
37
38 (defconst elpher-version "1.0.0"
39   "Current version of elpher.")
40
41 (defconst elpher-margin-width 6
42   "Width of left-hand margin used when rendering indicies.")
43
44 (defconst elpher-start-index
45   (mapconcat
46    'identity
47    (list "i\tfake\tfake\t1"
48          "i--------------------------------------------\tfake\tfake\t1"
49          "i           Elpher Gopher Client             \tfake\tfake\t1"
50          (format "i              version %s\tfake\tfake\t1" elpher-version)
51          "i--------------------------------------------\tfake\tfake\t1"
52          "i\tfake\tfake\t1"
53          "iBasic usage:\tfake\tfake\t1"
54          "i\tfake\tfake\t1"
55          "i - tab/shift-tab: next/prev directory entry on current page\tfake\tfake\t1"
56          "i - RET/mouse-1: open directory entry under cursor\tfake\tfake\t1"
57          "i - u: return to parent directory entry\tfake\tfake\t1"
58          "i - g: go to a particular page\tfake\tfake\t1"
59          "i - r: redraw current page (using cached contents if available)\tfake\tfake\t1"
60          "i - R: reload current page (regenerates cache)\tfake\tfake\t1"
61          "i - d: download directory entry under cursor\tfake\tfake\t1"
62          "i - w: display the raw server response for the current page\tfake\tfake\t1"
63          "i\tfake\tfake\t1"
64          "iPlaces to start exploring Gopherspace:\tfake\tfake\t1"
65          "i\tfake\tfake\t1"
66          "1Floodgap Systems Gopher Server\t\tgopher.floodgap.com\t70"
67          "i\tfake\tfake\t1"
68          "iAlternatively, select the following item and enter some\tfake\tfake\t1"
69          "isearch terms:\tfake\tfake\t1"
70          "i\tfake\tfake\t1"
71          "7Veronica-2 Gopher Search Engine\t/v2/vs\tgopher.floodgap.com\t70"
72          ".")
73    "\r\n")
74   "Source for elpher start page.")
75
76
77 ;;; Customization group
78 ;;
79
80 (defgroup elpher nil
81   "A gopher client."
82   :group 'applications)
83
84 (defface elpher-index
85   '((((background dark)) :foreground "deep sky blue")
86     (((background light)) :foreground "blue"))
87   "Face used for index records.")
88
89 (defface elpher-text
90   '((((background dark)) :foreground "white")
91     (((background light)) :weight bold))
92   "Face used for text records.")
93
94 (defface elpher-info '()
95   "Face used for info records.")
96
97 (defface elpher-image
98   '((((background dark)) :foreground "green")
99     (t :foreground "dark green"))
100   "Face used for image records.")
101
102 (defface elpher-search
103   '((((background light)) :foreground "orange")
104     (((background dark)) :foreground "dark orange"))
105   "Face used for search records.")
106
107 (defface elpher-url
108   '((((background dark)) :foreground "yellow")
109     (((background light)) :foreground "dark red"))
110   "Face used for url records.")
111
112 (defface elpher-binary
113   '((t :foreground "magenta"))
114   "Face used for binary records.")
115
116 (defface elpher-unknown
117   '((t :foreground "red"))
118   "Face used for unknown record types.")
119
120 (defface elpher-margin-key
121   '((((background dark)) :foreground "white"))
122   "Face used for margin key.")
123
124 (defface elpher-margin-brackets
125   '((t :foreground "blue"))
126   "Face used for brackets around margin key.")
127
128 (defcustom elpher-open-urls-with-eww nil
129   "If non-nil, open URL selectors using eww.
130 Otherwise, use the system browser via the BROWSE-URL function."
131   :type '(boolean))
132
133 (defcustom elpher-cache-images nil
134   "If non-nil, cache images in memory in the same way as other content."
135   :type '(boolean))
136
137 ;;; Model
138 ;;
139
140 ;; Address
141
142 (defun elpher-make-address (selector host port)
143   "Create an address of a gopher object with SELECTOR, HOST and PORT."
144   (list selector host port))
145
146 (defun elpher-address-selector (address)
147   "Retrieve selector from ADDRESS."
148   (car address))
149
150 (defun elpher-address-host (address)
151   "Retrieve host from ADDRESS."
152   (cadr address))
153
154 (defun elpher-address-port (address)
155   "Retrieve port from ADDRESS."
156   (caddr address))
157
158 ;; Node
159
160 (defun elpher-make-node (parent address getter &optional content pos)
161   "Create a node in the gopher page hierarchy.
162
163 PARENT specifies the parent of the node, ADDRESS specifies the address of
164 the gopher page, GETTER provides the getter function used to obtain this
165 page.
166
167 The optional arguments CONTENT and POS can be used to fill the cached
168 content and cursor position fields of the node."
169   (list parent address getter content pos))
170
171 (defun elpher-node-parent (node)
172   "Retrieve the parent node of NODE."
173   (elt node 0))
174
175 (defun elpher-node-address (node)
176   "Retrieve the address of NODE."
177   (elt node 1))
178
179 (defun elpher-node-getter (node)
180   "Retrieve the preferred getter function of NODE."
181   (elt node 2))
182
183 (defun elpher-node-content (node)
184   "Retrieve the cached content of NODE, or nil if none exists."
185   (elt node 3))
186
187 (defun elpher-node-pos (node)
188   "Retrieve the cached cursor position for NODE, or nil if none exists."
189   (elt node 4))
190
191 (defun elpher-set-node-content (node content)
192   "Set the content cache of NODE to CONTENT."
193   (setcar (nthcdr 3 node) content))
194
195 (defun elpher-set-node-pos (node pos)
196   "Set the cursor position cache of NODE to POS."
197   (setcar (nthcdr 4 node) pos))
198
199 ;; Node graph traversal
200
201 (defvar elpher-current-node)
202
203 (defun elpher-visit-node (node &optional getter)
204   "Visit NODE using its own getter or GETTER, if non-nil."
205   (elpher-save-pos)
206   (elpher-process-cleanup)
207   (setq elpher-current-node node)
208   (if getter
209       (funcall getter)
210     (funcall (elpher-node-getter node))))
211
212 (defun elpher-visit-parent-node ()
213   "Visit the parent of the current node."
214   (let ((parent-node (elpher-node-parent elpher-current-node)))
215     (when parent-node
216       (elpher-visit-node parent-node))))
217       
218 (defun elpher-reload-current-node ()
219   "Reload the current node, discarding any existing cached content."
220   (elpher-set-node-content elpher-current-node nil)
221   (elpher-visit-node elpher-current-node))
222
223 (defun elpher-save-pos ()
224   "Save the current position of point to the current node."
225   (when elpher-current-node
226     (elpher-set-node-pos elpher-current-node (point))))
227
228 (defun elpher-restore-pos ()
229   "Restore the position of point to that cached in the current node."
230   (let ((pos (elpher-node-pos elpher-current-node)))
231     (if pos
232         (goto-char pos)
233       (goto-char (point-min)))))
234
235 ;;; Buffer preparation
236 ;;
237
238 (defmacro elpher-with-clean-buffer (&rest args)
239   "Evaluate ARGS with a clean *elpher* buffer as current."
240   (list 'progn
241         '(switch-to-buffer "*elpher*")
242         '(elpher-mode)
243         (append (list 'let '((inhibit-read-only t))
244                       '(erase-buffer))
245                 args)))
246
247 ;;; Index rendering
248 ;;
249
250 (defun elpher-insert-index (string)
251   "Insert the index corresponding to STRING into the current buffer."
252   (dolist (line (split-string string "\r\n"))
253     (unless (= (length line) 0)
254       (elpher-insert-index-record line))))
255
256 (defun elpher-insert-margin (&optional type-name)
257   "Insert index margin, optionally containing the TYPE-NAME, into the current buffer."
258   (if type-name
259       (progn
260         (insert (format (concat "%" (number-to-string (- elpher-margin-width 1)) "s")
261                         (concat
262                          (propertize "[" 'face 'elpher-margin-brackets)
263                          (propertize type-name 'face 'elpher-margin-key)
264                          (propertize "]" 'face 'elpher-margin-brackets))))
265         (insert " "))
266     (insert (make-string elpher-margin-width ?\s))))
267
268 (defvar elpher-type-map
269   '((?0 elpher-get-text-node "T" elpher-text)
270     (?1 elpher-get-index-node "/" elpher-index)
271     (?g elpher-get-image-node "im" elpher-image)
272     (?p elpher-get-image-node "im" elpher-image)
273     (?I elpher-get-image-node "im" elpher-image)
274     (?4 elpher-get-node-download "B" elpher-binary)
275     (?5 elpher-get-node-download "B" elpher-binary)
276     (?9 elpher-get-node-download "B" elpher-binary)
277     (?7 elpher-get-search-node "?" elpher-search))
278   "Association list from types to getters, margin codes and index faces.")
279
280 (defun elpher-insert-index-record (line)
281   "Insert the index record corresponding to LINE into the current buffer."
282   (let* ((type (elt line 0))
283          (fields (split-string (substring line 1) "\t"))
284          (display-string (elt fields 0))
285          (selector (elt fields 1))
286          (host (elt fields 2))
287          (port (elt fields 3))
288          (address (elpher-make-address selector host port))
289          (type-map-entry (alist-get type elpher-type-map)))
290     (if type-map-entry
291         (let ((getter (car type-map-entry))
292               (margin-code (cadr type-map-entry))
293               (face (caddr type-map-entry)))
294           (elpher-insert-margin margin-code)
295           (insert-text-button display-string
296                               'face face
297                               'elpher-node (elpher-make-node elpher-current-node
298                                                                address
299                                                                getter)
300                               'action #'elpher-click-link
301                               'follow-link t
302                               'help-echo (format "mouse-1, RET: open %s on %s port %s"
303                                                  selector host port)))
304       (pcase type
305         (?i (elpher-insert-margin) ; Information
306             (insert (propertize display-string
307                                 'face 'elpher-info)))
308         (?h (elpher-insert-margin "W") ; Web link
309             (let ((url (elt (split-string selector "URL:") 1)))
310               (insert-text-button display-string
311                                   'face 'elpher-url
312                                   'elpher-url url
313                                   'action #'elpher-click-url
314                                   'follow-link t
315                                   'help-echo (format "mouse-1, RET: open url %s" url))))
316         (?.) ; Occurs at end of index, can safely ignore.
317         (tp (elpher-insert-margin (concat (char-to-string tp) "?"))
318             (insert (propertize display-string
319                                 'face 'elpher-unknown-face)))))
320     (insert "\n")))
321
322
323 ;;; Selector retrieval (all kinds)
324 ;;
325
326 (defun elpher-process-cleanup ()
327   "Immediately shut down any extant elpher process."
328   (let ((p (get-process "elpher-process")))
329     (if p (delete-process p))))
330
331 (defvar elpher-selector-string)
332
333 (defun elpher-get-selector (address after)
334   "Retrieve selector specified by ADDRESS, then execute AFTER.
335 The result is stored as a string in the variable â€˜elpher-selector-string’."
336   (setq elpher-selector-string "")
337   (make-network-process
338    :name "elpher-process"
339    :host (elpher-address-host address)
340    :service (elpher-address-port address)
341    :filter (lambda (proc string)
342              (setq elpher-selector-string (concat elpher-selector-string string)))
343    :sentinel after)
344   (process-send-string "elpher-process"
345                        (concat (elpher-address-selector address) "\n")))
346
347 ;; Index retrieval
348
349 (defun elpher-get-index-node ()
350   "Getter which retrieves the current node contents as an index."
351   (let ((content (elpher-node-content elpher-current-node))
352         (address (elpher-node-address elpher-current-node)))
353     (if content
354         (progn
355           (elpher-with-clean-buffer
356            (insert content))
357           (elpher-restore-pos))
358       (if address
359           (progn
360             (elpher-with-clean-buffer
361              (insert "LOADING DIRECTORY..."))
362             (elpher-get-selector address
363                                   (lambda (proc event)
364                                     (unless (string-prefix-p "deleted" event)
365                                       (elpher-with-clean-buffer
366                                        (elpher-insert-index elpher-selector-string))
367                                       (elpher-restore-pos)
368                                       (elpher-set-node-content elpher-current-node
369                                                                 (buffer-string))))))
370         (progn
371           (elpher-with-clean-buffer
372            (elpher-insert-index elpher-start-index))
373           (elpher-restore-pos)
374           (elpher-set-node-content elpher-current-node
375                                     (buffer-string)))))))
376
377 ;; Text retrieval
378
379 (defconst elpher-url-regex
380   "\\(https?\\|gopher\\)://\\([a-zA-Z0-9.\-]+\\)\\(?3::[0-9]+\\)?\\(?4:/[^ \r\n\t(),]*\\)?"
381   "Regexp used to locate and buttinofy URLs in text files loaded by elpher.")
382
383 (defun elpher-buttonify-urls (string)
384   "Turn substrings which look like urls in STRING into clickable buttons."
385   (with-temp-buffer
386     (insert string)
387     (goto-char (point-min))
388     (while (re-search-forward elpher-url-regex nil t)
389       (let ((url (match-string 0))
390             (protocol (downcase (match-string 1))))
391         (if (string= protocol "gopher")
392             (let* ((host (match-string 2))
393                    (port 70)
394                    (type-and-selector (match-string 4))
395                    (type (if (> (length type-and-selector) 1)
396                              (elt type-and-selector 1)
397                            ?1))
398                    (selector (if (> (length type-and-selector) 1)
399                                  (substring type-and-selector 2)
400                                ""))
401                    (address (elpher-make-address selector host port))
402                    (getter (car (alist-get type elpher-type-map))))
403               (make-text-button (match-beginning 0)
404                                 (match-end 0)
405                                 'elpher-node (elpher-make-node elpher-current-node
406                                                                  address
407                                                                  getter)
408                                 'action #'elpher-click-link
409                                 'follow-link t
410                                 'help-echo (format "mouse-1, RET: open %s on %s port %s"
411                                                    selector host port)))
412           (make-text-button (match-beginning 0)
413                             (match-end 0)
414                             'elpher-url url
415                             'action #'elpher-click-url
416                             'follow-link t
417                             'help-echo (format "mouse-1, RET: open url %s" url)))))
418     (buffer-string)))
419
420 (defun elpher-process-text (string)
421   "Remove CRs and trailing period from the gopher text document STRING."
422   (let* ((chopped-str (replace-regexp-in-string "\r\n\.\r\n$" "\r\n" string))
423          (cleaned-str (replace-regexp-in-string "\r" "" chopped-str)))
424     (elpher-buttonify-urls cleaned-str)))
425
426 (defun elpher-get-text-node ()
427   "Getter which retrieves the current node contents as a text document."
428   (let ((content (elpher-node-content elpher-current-node))
429         (address (elpher-node-address elpher-current-node)))
430     (if content
431         (progn
432           (elpher-with-clean-buffer
433            (insert content))
434           (elpher-restore-pos))
435       (progn
436         (elpher-with-clean-buffer
437          (insert "LOADING TEXT..."))
438         (elpher-get-selector address
439                               (lambda (proc event)
440                                 (unless (string-prefix-p "deleted" event)
441                                   (elpher-with-clean-buffer
442                                    (insert (elpher-process-text elpher-selector-string)))
443                                   (elpher-restore-pos)
444                                   (elpher-set-node-content elpher-current-node
445                                                             (buffer-string)))))))))
446
447 ;; Image retrieval
448
449 (defun elpher-get-image-node ()
450   "Getter which retrieves the current node contents as an image to view."
451   (let ((content (elpher-node-content elpher-current-node))
452         (address (elpher-node-address elpher-current-node)))
453     (if content
454         (progn
455           (elpher-with-clean-buffer
456            (insert-image content))
457           (setq cursor-type nil)
458           (elpher-restore-pos))
459       (if (display-images-p)
460           (progn
461             (elpher-with-clean-buffer
462              (insert "LOADING IMAGE..."))
463             (elpher-get-selector address
464                                  (lambda (proc event)
465                                    (unless (string-prefix-p "deleted" event)
466                                      (let ((image (create-image
467                                                    (encode-coding-string elpher-selector-string
468                                                                          'no-conversion)
469                                                    nil t)))
470                                        (elpher-with-clean-buffer
471                                         (insert-image image))
472                                        (setq cursor-type nil)
473                                        (elpher-restore-pos)
474                                        (if elpher-cache-images
475                                            (elpher-set-node-content elpher-current-node
476                                                                     image)))))))
477         (elpher-get-node-download)))))
478
479 ;; Search retrieval
480
481 (defun elpher-get-search-node ()
482   "Getter which submits a search query to the address of the current node."
483   (let ((content (elpher-node-content elpher-current-node))
484         (address (elpher-node-address elpher-current-node))
485         (aborted t))
486     (if content
487         (progn
488           (elpher-with-clean-buffer
489            (insert content))
490           (elpher-restore-pos)
491           (message "Displaying cached search results.  Reload to perform a new search."))
492       (unwind-protect
493           (let* ((query-string (read-string "Query: "))
494                  (query-selector (concat (elpher-address-selector address) "\t" query-string))
495                  (search-address (elpher-make-address query-selector
496                                                        (elpher-address-host address)
497                                                        (elpher-address-port address))))
498             (setq aborted nil)
499             (elpher-with-clean-buffer
500              (insert "LOADING RESULTS..."))
501             (elpher-get-selector search-address
502                                   (lambda (proc event)
503                                     (unless (string-prefix-p "deleted" event)
504                                       (elpher-with-clean-buffer
505                                        (elpher-insert-index elpher-selector-string))
506                                       (goto-char (point-min))
507                                       (elpher-set-node-content elpher-current-node
508                                                                 (buffer-string))))))
509         (if aborted
510             (elpher-visit-parent-node))))))
511
512 ;; Raw server response retrieval
513
514 (defun elpher-get-node-raw ()
515   "Getter which retrieves the raw server response for the current node."
516   (let* ((content (elpher-node-content elpher-current-node))
517          (address (elpher-node-address elpher-current-node)))
518     (elpher-with-clean-buffer
519      (insert "LOADING RAW SERVER RESPONSE..."))
520     (if address
521         (elpher-get-selector address
522                               (lambda (proc event)
523                                 (unless (string-prefix-p "deleted" event)
524                                   (elpher-with-clean-buffer
525                                    (insert elpher-selector-string))
526                                   (goto-char (point-min)))))
527       (progn
528         (elpher-with-clean-buffer
529          (insert elpher-start-index))
530         (goto-char (point-min)))))
531   (message "Displaying raw server response.  Reload or redraw to return to standard view."))
532  
533 ;; File export retrieval
534
535 (defvar elpher-download-filename)
536
537 (defun elpher-get-node-download ()
538   "Getter which retrieves the current node and writes the result to a file."
539   (let* ((address (elpher-node-address elpher-current-node))
540          (selector (elpher-address-selector address)))
541     (elpher-visit-parent-node) ; Do first in case of non-local exits.
542     (let* ((filename-proposal (file-name-nondirectory selector))
543            (filename (read-file-name "Save file as: "
544                                      nil nil nil
545                                      (if (> (length filename-proposal) 0)
546                                          filename-proposal
547                                        "gopher.file"))))
548       (message "Downloading...")
549       (setq elpher-download-filename filename)
550       (elpher-get-selector address
551                             (lambda (proc event)
552                               (let ((coding-system-for-write 'binary))
553                                 (with-temp-file elpher-download-filename
554                                   (insert elpher-selector-string)
555                                   (message (format "Download complate, saved to file %s."
556                                                    elpher-download-filename)))))))))
557
558
559 ;;; Navigation procedures
560 ;;
561
562 (defun elpher-next-link ()
563   "Move point to the next link on the current page."
564   (interactive)
565   (forward-button 1))
566
567 (defun elpher-prev-link ()
568   "Move point to the previous link on the current page."
569   (interactive)
570   (backward-button 1))
571
572 (defun elpher-click-link (button)
573   "Function called when the gopher link BUTTON is activated (via mouse or keypress)."
574   (let ((node (button-get button 'elpher-node)))
575     (elpher-visit-node node)))
576
577 (defun elpher-click-url (button)
578   "Function called when the url link BUTTON is activated (via mouse or keypress)."
579   (let ((url (button-get button 'elpher-url)))
580     (if elpher-open-urls-with-eww
581         (browse-web url)
582       (browse-url url))))
583
584 (defun elpher-follow-current-link ()
585   "Open the link or url at point."
586   (interactive)
587   (push-button))
588
589 (defun elpher-go ()
590   "Go to a particular gopher site."
591   (interactive)
592   (let* (
593          (hostname (read-string "Gopher host: "))
594          (selector (read-string "Selector (default none): " nil nil ""))
595          (port (read-string "Port (default 70): " nil nil 70))
596          (address (list selector hostname port)))
597     (elpher-visit-node
598      (elpher-make-node elpher-current-node
599                         address
600                         #'elpher-get-index-node))))
601
602 (defun  elpher-redraw ()
603   "Redraw current page."
604   (interactive)
605   (elpher-visit-node elpher-current-node))
606
607 (defun  elpher-reload ()
608   "Reload current page."
609   (interactive)
610   (elpher-reload-current-node))
611
612 (defun elpher-view-raw ()
613   "View current page as plain text."
614   (interactive)
615   (elpher-visit-node elpher-current-node
616                       #'elpher-get-node-raw))
617
618 (defun elpher-back ()
619   "Go to previous site."
620   (interactive)
621   (if (elpher-node-parent elpher-current-node)
622       (elpher-visit-parent-node)
623     (message "No previous site.")))
624
625 (defun elpher-download ()
626   "Download the link at point."
627   (interactive)
628   (let ((button (button-at (point))))
629     (if button
630         (let ((node (button-get button 'elpher-node)))
631           (if node
632               (elpher-visit-node (button-get button 'elpher-node
633                                   #'elpher-get-node-download))
634             (message "Can only download gopher links, not general URLs.")))
635       (message "No link selected."))))
636
637 ;;; Mode and keymap
638 ;;
639
640 (defvar elpher-mode-map
641   (let ((map (make-sparse-keymap)))
642     (define-key map (kbd "TAB") 'elpher-next-link)
643     (define-key map (kbd "<backtab>") 'elpher-prev-link)
644     (define-key map (kbd "u") 'elpher-back)
645     (define-key map (kbd "g") 'elpher-go)
646     (define-key map (kbd "r") 'elpher-redraw)
647     (define-key map (kbd "R") 'elpher-reload)
648     (define-key map (kbd "w") 'elpher-view-raw)
649     (define-key map (kbd "d") 'elpher-download)
650     (when (fboundp 'evil-define-key)
651       (evil-define-key 'normal map
652         (kbd "TAB") 'elpher-next-link
653         (kbd "C-]") 'elpher-follow-current-link
654         (kbd "C-t") 'elpher-back
655         (kbd "u") 'elpher-back
656         (kbd "g") 'elpher-go
657         (kbd "r") 'elpher-redraw
658         (kbd "R") 'elpher-reload
659         (kbd "w") 'elpher-view-raw
660         (kbd "d") 'elpher-download))
661     map)
662   "Keymap for gopher client.")
663
664 (define-derived-mode elpher-mode special-mode "elpher"
665   "Major mode for elpher, an elisp gopher client.")
666
667
668 ;;; Main start procedure
669 ;;
670
671 ;;;###autoload
672 (defun elpher ()
673   "Start elpher with default landing page."
674   (interactive)
675   (setq elpher-current-node nil)
676   (let ((start-node (elpher-make-node nil nil #'elpher-get-index-node)))
677     (elpher-visit-node start-node))
678   "Started Elpher.") ; Otherwise (elpher) evaluates to start page string.
679
680 ;;; elpher.el ends here