Added missing @node for several sections in the texinfo.
[elpher.git] / elpher.texi
1 \input texinfo @c -*-texinfo-*-
2
3 @setfilename elpher.info
4 @settitle Elpher Manual v3.4.1
5
6 @dircategory Emacs
7 @direntry
8 * Elpher: (elpher). A gopher and gemini client for Emacs.
9 @end direntry
10
11 @copying
12 This manual documents Elpher, a gopher and gemini client for Emacs.
13
14 Copyright @copyright{} 2019-2023  Tim Vaughan@*
15 Copyright @copyright{} 2021 Daniel Semyonov@*
16 Copyright @copyright{} 2021 Alex Schroeder
17
18 @quotation
19 The source and documentation of Elpher is free software.  You can
20 redistribute it and/or modify it under the terms of the GNU General
21 Public License as published by the Free Software Foundation; either
22 version 3, or (at your option) any later version.
23
24 Elpher is distributed in the hope that it will be useful, but WITHOUT
25 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
26 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License in
27 the file COPYING in the same directory as this file for more details.
28 @end quotation
29 @end copying
30
31 @titlepage
32 @title Elpher Gopher and Gemini Client Manual
33 @author Tim Vaughan
34
35 @page
36 @vskip 0pt plus 1filll
37 @insertcopying
38 @end titlepage
39
40 @contents
41
42 @ifnottex
43 @node Top, Introduction, (dir), (dir)
44 @top Elpher
45
46 @insertcopying
47
48 @menu
49 * Introduction::                Elpher Overview: what's this all about?
50 * Installation::                Installing Elpher
51 * Quick Start::                 Get up and running quickly
52 * Navigation::                  Fundamentals of Elpher navigation
53 * Bookmarks::                   How to record and visit bookmarks
54 * Gopher character encodings::  How Elpher selects encodings for gopher pages
55 * Encrypted gopher connections::  How and when TLS is enabled for gopher
56 * Gemini support::              Support for the Gemini protocol
57 * Finger support::              Support for the Finger protocol
58 * Local files::                 Opening local files in elpher
59 * About pages::                 Special pages and how to reference them
60 * ANSI support::                Notes in Elpher's ANSI support
61 * Customization::               How to customize various aspects of Elpher
62 * Command Index::
63 * News::                        Changes introduced by major releases
64 * Contributors::                Contributors to Elpher
65
66 @detailmenu
67  --- The Detailed Node Listing ---
68
69 Installation
70
71 * Installing from ELPA or MELPA::  Installing from a package repository
72 * Installing by hand::          Installing directly from the source
73
74 Navigation
75
76 * Within-page navigation::      Moving about within a page
77 * Between-page navigation::     Commands for moving between pages
78 * History and Caching::         Explanation of how Elpher represents history
79
80 Gemini support
81
82 * Client Certificates for Gemini::  Accessing secure gemini pages
83 * Hiding preformatted text in text/gemini documents::  An accessibility option
84
85 News
86
87 * v3.4.0::
88 * v3.3.0::
89 * v3.2.0::
90 * v3.1.0::
91 * v3.0.0::
92
93 @end detailmenu
94 @end menu
95
96 @end ifnottex
97
98 @macro keycmd{key,cmd}
99 @item \key\  (@code{\cmd\})
100 @findex \cmd\
101 @end macro
102
103 @node Introduction, Installation, Top, Top
104 @chapter Introduction
105
106 Elpher aims to be a capable and practical gopher and gemini client for
107 Emacs.  Its focus is on easy keyboard-driven navigation based on
108 sensible default bindings (with out-of-the-box support for Evil).  It is
109 intended to be robust and behave in non-surprising ways at all times.
110 Additionally, Elpher provides the following bells and whistles:
111
112 @itemize
113 @item
114 followable web and gopher links in plain text,
115
116 @item
117 an easily navigable history, sporting caching of visited pages (both
118 content and cursor position),
119
120 @item
121 auto-completing menu item navigation,
122
123 @item
124 direct visualization of image files where supported (no writing to
125 disk),
126
127 @item
128 basic support for the new ``heavier than gopher, lighter than the web'' Gemini protocol,
129
130 @item
131 support for the Finger protocol.
132
133 @end itemize
134
135 Elpher is still under active development.  Although we try very hard to
136 ensure that releases are bug-free, this cannot be guaranteed.  However,
137 this also means that any usability features that you feel are missing
138 can likely by incorporated quickly, so please get in touch if you
139 have some ideas.
140
141 @node Installation, Quick Start, Introduction, Top
142 @chapter Installation
143
144 @menu
145 * Installing from ELPA or MELPA::  Installing from a package repository
146 * Installing by hand::          Installing directly from the source
147 @end menu
148
149 @node Installing from ELPA or MELPA, , Installation, Installation
150 @section Installing from ELPA or MELPA
151
152 Elpher is available on the non-GNU ELPA package archive.  If you are
153 using Emacs 28 or later, this archive should be available on your system
154 by default.  For Emacs 27, you'll need to follow the instructions at
155 @url{https://elpa.nongnu.org} to make the archive accessible.
156
157 Alternatively, Elpher is available from the MELPA package archive.  If you have
158 never installed packages from this repository before, you'll need
159 to follow the instructions at @url{https://melpa.org/#/getting-started}.
160
161 Once one of these package archives is installed, enter the following to
162 install Elpher:
163
164 @example
165 @kbd{M-x package-install @key{RET} elpher @key{RET}}
166 @end example
167
168 @noindent To uninstall, use
169
170 @example
171 @kbd{M-x package-delete @key{RET} elpher @key{RET}}.
172 @end example
173
174 @node Installing by hand,  , Installing from ELPA or MELPA, Installation
175 @section Installing by hand
176
177 It is also possible to install Elpher directly by downloading the file
178 @file{elpher.el} from @url{gopher://thelambdalab.xyz/1/projects/elpher}
179 (you'll need to download the ``source archive'' and extract it), adding
180 it to a directory in your @code{load-path}, and then adding
181
182 @example
183 (require 'elpher)
184 @end example
185
186 @noindent to your Emacs initialization file.
187
188 @node Quick Start, Navigation, Installation, Top
189 @chapter Quick Start
190
191 Before diving into the minutiae of the different commands available,
192 we will quickly describe how to get up and running with Elpher.
193
194 Once installed, you can launch Elpher using
195
196 @example
197 @kbd{M-x elpher @key{RET}}
198 @end example
199
200 @noindent This will switch to the *Elpher* buffer and display a start
201 page, with information on each of the default keyboard bindings.
202
203 From here you can move point between links (which may be menu items or
204 inline URLs in text files) by using @key{TAB} and @kbd{S-@key{TAB}},
205 as in Info.  You can also jump directly to a menu item using @key{m}, or
206 use the standard Emacs or Evil motion and search commands to find your
207 way around.  To open a link, press @key{RET}.  (Where a mouse is
208 available, Clicking on a link with the mouse cursor has the same
209 effect.)
210
211 To return to the page you just followed the link from, press @key{u}.
212
213 Elpher caches (for the duration of an Emacs session) both page contents
214 and the position of point on each of the pages (gopher menus, gemini
215 pages, query results, or text pages) you visit, restoring these when you
216 next visit the same page.  Thus, pressing @key{u} displays the previous
217 page in exactly the same state as when you left, meaning that you can
218 quickly and visually explore the different documents in a menu without
219 having to wait for anything to reload.
220
221 Of course, sometimes you'll @emph{want} to reload the current page
222 rather than stick with the cached version.  To do this use @key{R}.
223 (This is particularly useful for search query results, where this
224 allows you to perform a different search.)
225
226 That's more-or-less it. Elpher supports a number of other features,
227 such a support for different coding schemes and TLS encryption, and a
228 variety of customization options, all of which are explained in the
229 rest of this document. However the emphasis is on keeping the basic
230 navigation experience as intuitive and responsive as possible.
231
232 Note that you can launch multiple Elpher sessions in parallel by using
233 a prefix:
234
235 @example
236 @kbd{C-u M-x elpher @key{RET}}
237 @end example
238
239 @node Navigation, Bookmarks, Quick Start, Top
240 @chapter Navigation
241 Throughout this manual, we use the word ``page'' to refer to any
242 visualization of a response from a gopher or gemini server, be it a
243 menu/directory, query result, text file or image.
244
245 Elpher's navigation interface is inspired by the Emacs Info mode.
246 Movement within a page is essentially the same as moving
247 around any other text file in Emacs, but with special keys
248 for quickly jumping between menu items and URLs in text files.
249 Movement between pages is facilitated by a simple linear history
250 coupled with caching of pages and cursor position.
251
252 @menu
253 * Within-page navigation::      Moving about within a page
254 * Between-page navigation::     Commands for moving between pages
255 * History and Caching::         Explanation of how Elpher represents history
256 @end menu
257
258
259 @node Within-page navigation, Between-page navigation, Navigation, Navigation
260 @section Within-page navigation
261
262 To move about within a page, you should be able use the same keys you usually
263 use to browse files in Emacs.  This is even true when Evil mode is
264 enabled. Paragraph hopping, searching etc should work as usual.
265
266 In addition, the following commands are provided for quickly moving between
267 links and menu items.
268
269 @table @asis
270 @keycmd{@key{TAB}, elpher-next-link}
271 Move to the next link or menu item in the file.
272
273 @item @kbd{Shift-@key{TAB}} or @key{BACKTAB} (@code{elpher-prev-link})
274 @findex elpher-prev-link
275 Move to the previous link or menu item in the file.
276
277 @keycmd{@key{m}, elpher-jump}
278 Jump directly to a link within a file by specifying its display string
279 or link text.  (Unlike the previous two commands, this immediately opens
280 the selected link.
281 @end table
282
283
284 The following commands can be used to retrieve information about the
285 current page, or the address of the link at point:
286
287 @table @asis
288 @keycmd{@key{i}, elpher-info-link}
289 Display host, port and selector information for the link at point.
290
291 @keycmd{@key{I}, elpher-info-current}
292 Display host, port and selector information for the current page.
293
294 @keycmd{@key{c}, elpher-copy-link-url}
295 Add URL representing address of link at point to the kill-ring and the
296 system clipboard (if available).
297
298 @keycmd{@key{C}, elpher-copy-current-url}
299 Add URL representing address of the current page to the kill-ring and
300 the system clipboard (if available).
301
302 @keycmd{@key{d}, elpher-download}
303 Download link at point and save the result as a file.  The minibuffer
304 will prompt for the name of the file to write, with the default name being
305 the display string (if available) associated with the link.
306
307 @keycmd{@key{D}, elpher-download-current}
308 This is similar to @code{elpher-download}, but instead applies to the
309 current page rather than a link.
310
311 @keycmd{@key{.}, elpher-view-raw}
312 This displays the raw server response for the current page.  While not
313 useful for general browsing, it is useful for debugging incorrect rendering
314 or out-of-spec server responses.
315 @end table
316
317 @node Between-page navigation, History and Caching, Within-page navigation, Navigation
318 @section Between-page navigation
319
320 Moving to a different page can be accomplished in several ways,
321 described by the following command:
322
323 @table @asis
324 @keycmd{@key{RET}\, @key{mouse-1}, elpher-follow-link}
325 Follow the menu item or link at point (or selected with the mouse).
326
327 Exactly what is meant by ``follow'' depends on the kind of item selected:
328
329 @itemize
330 @item
331 For text or menu type items or links, the current page text is replaced
332 by the text of this item.  Unless the customization variable
333 @code{elpher-use-header} (@pxref{Customization}) is 
334 @code{nil}, the display string of the link is displayed in the buffer header.
335 Links to images behave similarly on Emacs systems supporting the display of
336 bitmap graphics, however their content is not cached in memory by default.
337
338 @item
339 When followed, links to search/query items (type 7) prompt for input in
340 the minibuffer then display the results in the same way as for text and menu
341 items.
342
343 @item
344 Following links to binary files (and image files on unsupported systems)
345 causes Elpher to prompt for a filename in which to save the content.
346
347 @item
348 Following links of type `h' with a selector having the `URL:' prefix, or
349 unsupported URLs in text files, will result in Elpher using an external
350 programme to open the URL.  This will be either the default system browser
351 or, if the @code{elpher-open-urls-with-eww} customization variable is non-nil,
352 Emacs' own EWW browser. (See @pxref{Customization}.) 
353
354 @end itemize
355
356 Once a text, menu or query response page has been displayed, its contents are
357 cached for the duration of the Emacs session. 
358
359 @keycmd{@key{g}, elpher-go}
360 Open a particular page by specifying either its full URL or just
361 entering a gopher host name. (The protocol defaults to gopher, so gemini
362 links must include the @code{gemini://} prefix.
363
364 If a unsupported protocol is used in the URL the result will be the same
365 as following a URL link of the same type from a link in a page.
366
367 @keycmd{@key{o}, elpher-go-current}
368 Prompts for a URL similar to @code{elpher-go}, but initialized to the URL
369 of the current page.  This allows you to easily try other selectors for the
370 same server.
371
372 Remember however, that the Gopher RFC 1436 provides @emph{no} guarantees about the
373 structure of selectors.
374
375 @keycmd{@key{O}, elpher-root-dir}
376 Open the root page (empty selector) on the current host.
377
378 @keycmd{@key{u}\, @key{-}\, @key{^}\, @key{mouse-3}, elpher-back}
379 Return to the previous page, where ``previous'' means the page where the
380 page which was displayed immediately before the current page.
381 @end table
382
383
384 @node History and Caching,  , Between-page navigation, Navigation
385 @section History and Caching 
386
387 The history and caching strategy in Elpher is extremely simple, but
388 may be confusing without a good mental model of how it works.  That
389 is what this section attempts to provide.
390
391 Essentially, @strong{every} time you navigate to a new page, either
392 by clicking or pressing @key{RET} on a link, using @key{g} to jump
393 to a new page by its address, or using @key{O} to open the root selector,
394 the following two things occur:
395
396 @enumerate
397 @item
398 the cursor position and content for the original page are recorded in an
399 in-memory cache, and
400
401 @item
402 the original page is set as the ``parent'' of the new page.
403 @end enumerate
404
405 The only way to return to pages in this history is by using @key{u},
406 which returns to the previous of the current page.  @footnote{The
407 addition of the new page to the history happens even if the new page is
408 one that has been seen before. This is mostly the desired behaviour.
409 However, opening an explicit ``back'' link provided by a gopher menu or
410 gemini page will also add a new entry to the history.  Unless you
411 haven't yet visited that menu, it's therefore better to use @key{u} to
412 go back in this case.}
413
414 One aspect that may seem peculiar is that Elpher lacks a corresponding ``next'' or
415 ``forward'' command.  However, since Elpher caches the position of point,
416 this will be automatically positioned on the link that was most recently followed
417 from a given page.  This means that, at least for links followed from menus
418 and text files, the inverse of @key{u} is actually just @key{RET}.
419
420 Elpher actually maintains two histories, and there are two different
421 commands to access them:
422
423 @table @asis
424 @keycmd{@key{s}, elpher-show-history}
425 This shows the history of the current buffer. This shows all the links
426 you would visit if you were to use @key{u} again and again.
427
428 @keycmd{@key{S}, elpher-show-visited-pages}
429 This shows the entire Elpher browsing history. It includes all the
430 pages you visited in your current Emacs session.
431
432 @end table
433
434 @node Bookmarks, Gopher character encodings, Navigation, Top
435 @chapter Bookmarks
436
437 Elpher makes use of standard Emacs bookmarks.
438 @xref{Bookmarks, , , emacs, The Emacs Editor}.
439 The following commands are used to add new bookmarks:
440
441 @table @asis
442 @keycmd{@key{a}, elpher-bookmark-link}
443 Add a bookmark for the link at point.  The minibuffer will prompt for
444 a name for the bookmark, which defaults to the display string.
445
446 @keycmd{@key{A}, elpher-bookmark-current}
447 Add a bookmark for the current page.  The minibuffer will prompt for
448 a name for the bookmark, defaulting to the display string associated
449 with the link that was followed to reach the current page.
450
451
452 @keycmd{@key{B}, elpher-open-bookmarks}
453 Visit a page displaying all elpher bookmarks. 
454 The behaviour of the this function depends on the customization variable
455 @code{elpher-use-emacs-bookmark-menu}.  If nil (the default), the
456 command will visit a special elpher page listing all elpher-specific
457 bookmarks.  If non-nil, the command will simply open the standard Emacs
458 bookmark list displaying all current bookmarks (including non-elpher
459 bookmarks).
460
461 @keycmd{@kbd{C-x r l}, bookmark-bmenu-list}
462 This command opens the standard Emacs bookmark menu, with which bookmarks
463 can be renamed, deleted or annotated.
464
465 @end table
466
467 On opening the bookmarks page, elpher will offer to import any legacy
468 (2.x) bookmarks files into the new system. Once the import is complete,
469 the original bookmarks file will have ``-legacy'' appended to it, so
470 so that elpher knows not to import it again.
471
472 If you have any other legacy bookmark files (besides the one in the
473 original location, or specified in the @code{elpher-bookmarks-file}
474 customization variable, which should be automatically detected), you can
475 can import these using
476
477 @example
478 @kbd{M-x elpher-bookmark-import @key{RET}}
479 @end example
480
481 Once this is done, you may delete these legacy bookmarks files.
482
483 @node Gopher character encodings, Encrypted gopher connections, Bookmarks, Top
484 @chapter Gopher character encodings
485
486 Responses Elpher retrieves from servers are initially read as pure
487 binary data.  When the data is intended to be interpreted as textual (as
488 determined by the type parameter of the gopher menu item or the gopher
489 URL), this data needs to be @emph{decoded} into a sequence of
490 characters.  To do this properly requires knowledge of the encoding
491 system used by whoever authored the document.
492
493 Unfortunately gopher lacks a systematic way of acquiring this necessary
494 information. Thus, the details of the coding system must be either
495 inferred from the binary data, or must be specified by the user.
496
497 By default, Elpher applies Emacs' built-in character encoding detection
498 system to the full (undecoded) response data and uses this to attempt to
499 convert it into a character string.
500 (See @pxref{Recognize coding, Recognizing coding systems, ,emacs}.) While
501 this approach can be okay, it is important to realize that its inference
502 algorithm is extremely primitive and depends heavily on assumptions based
503 on the language settings of your emacs system.
504
505 The alternative is to explicitly set the coding system used for decoding
506 using the following command:
507
508 @table @asis
509 @keycmd{@key{!},elpher-set-coding-system}
510 Causes a elpher to prompt for a coding system to use for decoding
511 future gopher text.  The @key{TAB} key can be used at this prompt to display a
512 list of alternatives (which is extensive) and to auto-complete.  An empty
513 response will cause Elpher to return to its default auto-detection
514 behaviour.
515 @end table
516
517 Note that changing the coding system only affects newly loaded text.
518 Thus, if text has already been decoded using an incorrect system, you
519 will need to select the correct coding and then reload the text using
520 @key{R}.
521
522
523 @node Encrypted gopher connections, Gemini support, Gopher character encodings, Top
524 @chapter Encrypted gopher connections
525
526 While RFC 1436 does not broach the topic of encryption at all, several
527 modern gopher servers can serve content over encrypted connections,
528 and a common choice for this is TLS.
529
530 Elpher can retrieve selectors using Emacs' built-in TLS support which
531 uses the GnuTLS library. (It is possible to build emacs without
532 GnuTLS, in which case encryption is not supported.)
533
534 To retrieve documents using TLS, Elpher's TLS mode must be enabled.
535 This can be directly toggled using @key{T}, but note that just as with
536 the character encoding, changing this mode only affects subsequent
537 connections.
538
539 Alternatively, TLS mode is @emph{automatically} enabled whenever
540 gopher URLs starting with @code{gophers://} are followed.
541
542 The mode is sticky, so it remains active until switched off.
543 It can also be automatically switched off when a TLS connection fails.
544 In this case Elpher will prompt for your confirmation to ensure that
545 you can't accidentally make a non-TLS connection.
546
547 @node Gemini support, Finger support, Encrypted gopher connections, Top
548 @chapter Gemini support
549
550 @uref{gopher://gemini.circumlunar.space, Gemini}
551 is a new protocol being developed by several members of
552 gopherspace.  It aims to solve some of the long-standing technical
553 issues associated with gopher as a protocol, while keeping the major benefits.
554 For instance, it _requires_ encrypted connections, it does away with
555 the selector type, and allows servers to explicitly specify the
556 character coding scheme used for text documents.
557
558 The latest versions of Elpher aim to provide seamless transitions between
559 gemini and gopher documents.  Basically you should be able to open,
560 bookmark, download and otherwise interact with gemini pages in exactly
561 the same way as you do with other non-gemini pages.  The only major
562 difference from your perspective as a user is that you should no longer
563 have to worry about manually toggling TLS on or off (for gemini it's
564 always on), and you should never have to manually set a character coding
565 scheme.
566
567 The gemini protocol specification recommends a Trust on First Use (TOFU)
568 behaviour when validating gemini server TLS certificates.  This is
569 because many gemini servers rely on self-signed certificates rather
570 than certificates signed by a CA. Sadly however, this TOFU behaviour is
571 far from straight-forward to configure using Emacs' existing Network
572 Security Manager.  For this reason, elpher defaults to performing no
573 certificate verification by default.  This behaviour can be easily
574 customized by setting the @code{elpher-gemini-TLS-cert-checks}
575 customization variable to non-nil.
576
577 The gemini specification concerns both the protocol and a simple text
578 document format (mimetype text/gemini) which is like a mixture between
579 gophermap files and markdown-formatted files but simpler than both.
580 Elpher renders gemini responses which are provided in this format in
581 line with the rules in the spec.  This includes wrapping long lines at
582 word boundaries.  The specific column at which this text is wrapped is
583 defined by the customization variable
584 @code{elpher-gemini-max-fill-width}, which is set to 80 columns by
585 default. (This is slightly wider than Emacs' default fill width of 70
586 columns due to the fact that there are a significant amount of older
587 gemini content which, against the advice of the current spec, hard wraps
588 at <80 columns.  The larger default allows this to still look okay,
589 while still keeping content without hard wraps looking pleasant.)
590
591 The text/gemini format also possesses a section header syntax similar to
592 markdown.  Elpher allows different header levels to be drawn with
593 different, customizable, faces.  By default, on graphically-capable
594 emacs systems, these faces are given different heights to distinguish
595 among levels.  On terminal systems, the level is indicated by the
596 number of preceding # symbols.
597
598 I should emphasize however that, while it is definitely functional,
599 Elpher's gemini support is still experimental, and various aspects will
600 change as the protocol develops further.
601
602 @menu
603 * Client Certificates for Gemini::  Accessing secure gemini pages
604 * Hiding preformatted text in text/gemini documents::  An accessibility option
605 @end menu
606
607 @node Client Certificates for Gemini, , Gemini support, Gemini support
608 @section Client Certificates for Gemini
609
610 Gemini makes explicit use of the client certificate mechanism that TLS
611 provides for allowing clients to authenticate themselves with servers.
612 The Gemini specification suggests two distinct classes of client
613 certificates: short-lived certificates used to identify you for a single
614 session, and more permanent certificates used to identify you over a
615 longer time period.
616
617 When Elpher receives a request for a client certificate from a server,
618 it will present you with the option to create and use a single-use
619 ``throwaway'' certificate, or to use a ``persistent''
620 certificate (optionally creating it or installing pre-existing key and
621 certificate files).
622
623 Certificate creation in Elpher requires an installation of OpenSSL, and
624 ---in particular---that Elpher be able to run the @command{openssl} command-line
625 utility.  By default, Elpher assumes that the @command{openssl} is on the
626 system path, but the precise location can be set by customizing the
627 @code{elpher-openssl-command} variable.
628
629 Each generated certificate results in the creation of a .key file and
630 a .crt file.  In the case of a throwaway certificate, these files are
631 stored in the temporary directory indicated by the Emacs variable
632 @code{temporary-file-directory} and are deleted when ``forgotten''
633 (as described below).
634
635 In the case of persistent certificates, these files are stored in the
636 folder defined by the Elpher variable
637 @code{elpher-certificate-directory}, and are never deleted by Elpher.
638 (Of course you can delete them yourself whenever you like.)
639 The base name of the files (i.e. sans extension) is what Elpher uses
640 to identify the certificate.
641
642 Using throwaway certificates is as simple as pressing the @key{t} 
643 key at the prompt which appears following a certificate request from
644 a server.  There is nothing more to do.
645
646 Using a persistent certificate requires instead selecting @key{p} from the same
647 menu.  This will result in Elpher asking you for the name identifying
648 the certificate.  This entry autocompletes to the list of known certificate
649 names, so you can use @key{TAB} to display the list.
650
651 In the case that you choose a name that does not belong to the list of
652 known certificates, Elpher will offer to create one for you or to
653 ``install'' one from existing key and certificate files.
654 Pressing the @key{n} key will cause Elpher to begin the process of
655 creating a new persistent certificate, using some additional
656 details for which you will be prompted.
657 Alternatively, pressing the @key{i} key will cause Elpher to ask for the
658 locations of existing key and certificate files to add to
659 @code{elpher-certificate-directory} under the chosen name.
660
661 Once a certificate is selected, it will be used for all subsequent TLS
662 transactions to the host for which the certificate was created.
663 It is immediately ``forgotten'' when a TLS connection to another host
664 is attempted, or the following command is issued:
665
666 @table @asis
667 @keycmd{@key{F},elpher-forget-certificate}
668 Causes Elpher to immediately forget any currently-loaded client certificate.
669 @end table
670
671 In either case, ``forgetting'' means that the details of the key and
672 certificate file pair are erased from memory.  Furthermore, in the case
673 of throw-away certificates, the corresponding files are deleted.
674
675 @node Hiding preformatted text in text/gemini documents,  , Client Certificates for Gemini, Gemini support
676 @section Hiding preformatted text in text/gemini documents
677
678 Preformatted text is often used to display ``ASCII art'' or other
679 similar text-based artwork.  While for many this is a fun way to
680 introduce personality into their gemini documents, such text can
681 pose difficulties for screen readers.
682
683 Setting the @code{elpher-gemini-hide-preformatted} customization option
684 to non-nil causes Elpher to hide all preformatted text blocks by
685 default.  In place of the preformatted text, Elpher instead displays the
686 ``alt text'' (if any is available), along with a button which can be
687 used to make specific blocks visible as required.
688
689 Other related customization options are
690 @code{elpher-gemini-preformatted-toggle-label}, which is the label used
691 for the toggle button, and
692 @code{elpher-gemini-preformatted-toggle-bullet}, which is the margin
693 string used to distinguish the line replacing the preformatted text.
694
695 @node Finger support, Local files, Gemini support, Top
696 @chapter Finger support
697
698 Incidentally, Elpher has native support for querying finger servers.
699 Of course, one could argue that this functionality is more easily
700 provided by one's local telnet client.  However finger URLs do appear
701 on occasion in gopherspace, and it's nice to be able to open them
702 in place.
703
704 Elpher interprets @code{finger://} URLs as follows:
705
706 @itemize
707
708 @item
709 The host is determined by the host name portion of the URL.
710
711 @item
712 In the case that the @emph{file name} portion of the URL is non-empty (besides
713 the leading slash), this is interpreted as the user to finger.
714
715 @item
716 Otherwise, the @emph{user} portion of the URL is interpreted as the user to finger.
717
718 @item
719 If no user is provided, the root directory of the finger server is requested.
720
721 @end itemize
722
723 Thus @code{finger://user@@hostname} and @code{finger://hostname/user} are both equivalent.
724
725 (The precedence of the /user notation over the user@ notation reflects a
726 preference of the community.)
727
728 @node Local files, About pages, Finger support, Top
729 @chapter Local files
730
731 Elpher supports opening local files via @samp{file:} URLs.
732
733 For instance, pressing @key{g} and entering @code{file:~/document.gmi}
734 will load the file named @samp{document.gmi} in your home directory,
735 provided this file exists.
736
737 Files opened in this way are rendered according to their name, and in
738 particular their extension.  The current mappings are as follows:
739
740 @table @asis
741
742 @item @samp{txt}
743
744 Plain text documents.  All local text files are assumed to be
745 UTF-8-encoded.
746
747 @item @samp{gophermap},@samp{gopher}
748
749 Gophermap files, i.e. files containing a valid directory list as specified
750 by RFC 1436.
751
752 @item @samp{gemini},@samp{gmi}
753
754 Gemini documents (i.e. documents of MIME type ``text/gemini'').  All
755 local gemini files are assumed to be UTF-8-encoded.
756
757 @item @samp{html},@samp{htm}
758
759 HTML documents.  All local HTML files are assumed to be UTF-8-encoded.
760
761 @item @samp{png},@samp{jpg},@samp{jpeg},@samp{gif},@samp{bmp},@samp{tif},@samp{tiff}
762
763 Image files.
764
765 @item Anything else
766 A binary document, which elpher will simply offer to save somewhere
767 else. (Obviously this is not useful in its own right, but there's not
768 much that elpher can sensibly do with unknown binary files.)
769
770 @end table
771
772
773 @node About pages, ANSI support, Local files, Top
774 @chapter About pages
775
776 Like other browsers, elpher makes certain internally-generated pages
777 such as the initial welcome page, the bookmarks page, the history
778 stack and the list of visited pages pages accessible as URLs with
779 the ``about:'' type.
780
781 This means that these pages can be bookmarked and, more usefully,
782 added to a local file to be rendered as a user-defined start page.
783
784 To see the address of a special page, simply visit the page and
785 press @key{I}.
786
787 @node ANSI support, Customization, About pages, Top
788 @chapter ANSI support
789
790 Depending on which parts of the gopher/gemini universe you frequent,
791 you may occasionally stumble on sites which use ANSI escape codes to
792 either produce specific characters or to colour text.
793
794 By default, elpher uses Emacs' built-in ANSI rendering library,
795 @samp{ansi-color}, to process ANSI codes.  This robustly interprets
796 the escape codes but only supports 8 colours.  Any colours unsupported
797 by the library are simply stripped, leaving uncoloured text in the
798 majority of cases.
799
800 To drastically improve the number of colours produced, install the
801 @samp{xterm-color} package from MELPA.  This package will be automatically
802 used by elpher if it is available, and supports 256 colours.
803 This should be sufficient to properly render many ANSI colour
804 gopher holes and gemini capsules quite nicely.
805
806 In case you prefer to completely strip out the ANSI escape codes entirely
807 by customizing the @code{elpher-filter-ansi-from-text} variable.
808
809
810 @node Customization, Command Index, ANSI support, Top
811 @chapter Customization
812
813 Various parts of Elpher can be customized via the 
814 variables belonging to the elpher customization group, accessible
815 using
816
817 @example
818 @kbd{M-x customize-group elpher @key{RET}}
819 @end example
820
821 @noindent This group contains a number of faces that can be modified to change
822 the appearance of Elpher, including one face per menu item type.
823
824 The group also contains variables for customizing the behaviour of
825 Elpher.  This includes how to open arbitrary (non-gopher) URLs, whether
826 to display buffer headers, how to deal with ANSI escape sequences in
827 text, the timeout to impose on network connections, and whether to
828 prompt for confirmation when switching away from TLS.
829
830 One particularly important customization is the @code{elpher-start-page-url}
831 variable, which holds the URL of the page displayed initially when
832 elpher starts, and when @key{U} is pressed.  By default this is set to
833 @samp{about:welcome}, but any URL can be substituted.  For example, you
834 might want to create a text/gemini file named
835 @samp{~/.emacs/start-page.gmi} containing useful links and set the value
836 of @code{elpher-start-page-url} to @samp{file:~/.emacs/start-page.gmi} to have
837 these links displayed at startup.  Alternatively, you might prefer
838 to set the value to @samp{about:bookmarks} so that the bookmarks page
839 is used as the start page instead.
840
841 See the customization group itself for details.
842
843 @node Command Index, News, Customization, Top
844 @unnumbered Command Index
845
846 @printindex fn
847
848 @node News, Contributors, Command Index, Top
849 @chapter News
850
851 This chapter documents the major changes introduced by Elpher releases.
852
853 @menu
854 * v3.4.0::
855 * v3.3.0::
856 * v3.2.0::
857 * v3.1.0::
858 * v3.0.0::
859 @end menu
860
861 @node v3.4.0, , News, News
862 @section v3.4.0
863
864 @subsection Toggling preformatted text visibility
865
866 This version introduces the ability to hide preformatted text in
867 text/gemini documents by default.  To enable this, set the customization
868 variable @code{elpher-gemini-hide-preformatted} to non-nil.  This causes
869 all preformated text blocks to be replaced with their ``alt-text'' (if
870 any is available) and a button for toggling the visibility of the text
871 block.
872
873 This feature is intended to make it easier for people using screen
874 readers to read text/gemini documents.
875
876 @node v3.3.0, , v3.4.0, News
877 @section v3.3.0
878
879 This version includes lots of bug fixes, as well as a couple of new
880 features.
881
882 @subsection Local gophermaps
883
884 Local gophermaps can now be displayed using @samp{file:}. To render
885 correctly, they must have the suffix @samp{.gopher} or @samp{.gophermap}.
886
887 @subsection IRI support
888
889 Internationalized Resource Identifiers (IRI) are an extension of URLs
890 (or, more accurately, URIs) to support a larger set of characters beyond
891 those in the US-ASCII character set.  They map directly onto URIs for
892 backwards compatibility, but look like gibberish if not properly
893 decoded.  When displaying URLs, Elpher now automatically decodes any IRI
894 characters and displays the decoded IRI.  (For security reasons, the
895 @code{elpher-info-current} command (@kbd{I}) always displays both the
896 decoded IRI and the URI when they differ.)
897
898 @node v3.2.0, , v3.3.0, News
899 @section v3.2.0
900
901 This version introduces several minor changes which, together, make it
902 possible to set up alternative start pages configured to your liking.
903
904 @subsection About pages
905
906 Special elpher pages such as the welcome page (previously ``start''
907 page), the bookmarks page, the browsing history stack and list of
908 visited pages are now addressable via @samp{about:} URLs.  For instance,
909 the standard welcome page has the address @samp{about:welcome}.
910
911 @subsection Local files
912
913 Local files can now be opened in elpher using @samp{file:} URLs. For
914 example, @kbd{g @samp{file:~/my-start.gmi}} will open
915 @samp{~/my-start.gmi} as a text/gemini document. @pxref{Local files}
916 for details.
917
918 @subsection Customizable start pages
919
920 The new customization variable @code{elpher-start-page-url} contains the URL
921 of the document to be loaded as elpher's ``start page''.  By default
922 this is set to @samp{about:welcome}, but any elpher-accessible URL is
923 valid. @pxref{Customization} for suggestions.
924
925 @node v3.1.0, , v3.2.0, News
926 @section v3.1.0
927
928 @subsection Bookmarks system
929
930 While Elpher bookmarks are still handled by the Emacs bookmark
931 system, this release introduces the option to retain the
932 original elpher bookmark page for the purpose of visiting those
933 bookmarks.  In v3.1.0, @key{B} visits this page (and adds it to
934 the history stack, as in previous versions), which can be interacted
935 with using the standard elpher key bindings.
936
937 Of course you can still view the bookmarks in the Emacs bookmark
938 menu, which you can access from anywhere using the default
939 binding @kbd{C-x r l} (or by following the link from the Elpher bookmarks
940 page).  Indeed you will need to use this to rename, delete or otherwise
941 edit your bookmarks.
942
943 If you prefer to avoid using the Elpher bookmark page entirely, you
944 use the customization variable @code{elpher-use-emacs-bookmark-menu}
945 to have the @key{B} key open the Emacs bookmark menu directly, as in
946 the previous release.
947
948 @node v3.0.0,  , v3.1.0, News
949 @section v3.0.0
950
951 @subsection Bookmarks system
952
953 Bookmarks are now handled by Emacs' own bookmark management system,
954 instead of Elpher's own system.
955 (For details, @xref{Bookmarks, , , emacs, The Emacs Editor}.)
956 This means two things.  Firstly,
957 the bookmarks file (elpher-bookmarks by default) and format used by
958 previous versions are now deprecated.  If these are detected, Elpher
959 will offer to import your old bookmarks when you first accessing the
960 bookmark list with the new version.  A suffix will be added to your
961 old bookmarks file so that Elpher knows that the import is complete.
962
963 Secondly, the old Elpher bookmark menu has been removed in the new
964 version.  Instead, @key{B} brings up the menu provided by the Emacs
965 function @code{bookmark-bmenu-list}. This has different key and mouse
966 bindings to Elpher's old menu, but is much more functional.  Bookmarks
967 can be renamed, deleted in groups, and much more.  (Use @kbd{C-h m} with
968 the menu open to see the complete list.)
969
970 @subsection History
971
972 Browsing history can now be accessed via new bindings to @key{s} and @key{S}.
973 The former shows the current history ``stack'' (pages accessible with
974 the @key{u} key), while the latter shows a list of all pages which have
975 been visited in the current session.
976
977 @subsection Socks connections
978
979 Elpher can now use socks connections to browse via TOR.
980
981 @subsection browse-url, Org and mu4e integration
982
983 These integrations provide support for elpher-handling of gemini, gopher
984 and finger URLs using @code{browse-url}, in Org documents, and the mu4e
985 mail system.
986
987 @subsection imenu integration
988
989 Gemini document headers are now navigable via imenu.
990 For details, @xref{Imenu, , , emacs, The Emacs Editor}.
991
992 @node Contributors,  , News, Top
993 @chapter Contributors
994
995 Elpher was originally written and is currently maintained by Tim Vaughan
996 @email{plugd@@thelambdalab.xyz}.  Significant improvements and
997 maintenance have also been contributed by and with the help of Alex
998 Schroeder @email{alex@@gnu.org}.  In addition, the following people have
999 all generously provided assistance and/or patches:
1000
1001 @itemize
1002 @item Jens Östlund @email{jostlund@@gmail.com}
1003 @item F. Jason Park @email{jp@@neverwas.me}
1004 @item Christopher Brannon @email{chris@@the-brannons.com}
1005 @item Omar Polo @email{op@@omarpolo.com}
1006 @item Noodles! @email{nnoodle@@chiru.no}
1007 @item Abhiseck Paira @email{abhiseckpaira@@disroot.org}
1008 @item Zhiwei Chen @email{chenzhiwei03@@kuaishou.com}
1009 @item condy0919 @email{condy0919@@gmail.com}
1010 @item Alexis @email{flexibeast@@gmail.com}
1011 @item Étienne Deparis @email{etienne@@depar.is}
1012 @item Simon Nicolussi @email{sinic@@sinic.name}
1013 @item Michel Alexandre Salim @email{michel@@michel-slm.name}
1014 @item Koushk Roy @email{kroy@@twilio.com}
1015 @item Vee @email{vee@@vnsf.xyz}
1016 @item Simon South @email{simon@@simonsouth.net}
1017 @item Daniel Semyonov @email{daniel@@dsemy.com}
1018 @item Bradley Thornton @email{bradley@@northtech.us}
1019 @end itemize
1020
1021 @bye