650b1e384a7e25fc788a7541a8b4b09eefdab833
[elpher.git] / ISSUES.org
1 #+TITLE: Development notes/ideas
2 #+TODO: OPEN | CLOSED INVALID
3
4 * Enhancements
5
6 ** OPEN Allow multiple elpher buffers [33%]
7
8    Shouldn't be too hard, just need elpher-current-node to be
9 buffer-local and allow various buffer-switching procedures to
10 do something sensible.
11
12 Here are the things that need to be implemented before
13 this can happen:
14 - [X] shift history out of node tree and into separate stack
15 - [ ] make history stack variables buffer-local
16 - [ ] have elpher-with-clean-buffer select appropriate buffer 
17
18 ** OPEN Replace support for user-specified starting pages
19 This used to be available, but was removed during a refactor.
20
21 ** OPEN Allow for grouping of bookmarks
22 To support this I'd like to add a bookmark page specific
23 set of keybindings.  Currently all bindings available on
24 the bookmark page are available everywhere else.  But
25 expanding and collapsing bookmark groups sounds like it
26 might need more specific bindings.
27
28 ** OPEN Implement Gemini support [88%]
29    
30 Here is the checklist of features required before release:
31 - [X] basic genimi transactions
32 - [ ] gemini transactions requiring client certificates
33 - [X] gemini input handling
34 - [X] gemini map files (text/gemini)
35 - [X] Support for plain text responses (text/*)
36 - [X] Support for image responses (text/image)
37 - [X] Support for mime-specified character encodeing
38 - [X] Saving responses to disk
39 - [X] Viewing raw responses
40   
41 The last few will be made infinitely easier if we factor the
42 gopher "getter" code differently.
43
44 ** OPEN Add history browsing
45    
46 * Bugs
47   
48 ** History inconsistency when restarting elpher <2020-05-26 Tue>
49
50 To reproduce:
51 1. open elpher and follow a few links until you're a handful of links below
52    the start page.
53 2. kill the elpher buffer with C-x k
54 3. Open elpher again, which will show the start page.
55 4. Press 'u' to go up.  Elpher wiill respond stating that there is no previous page.
56 5. Press 'u' again. Elpher will then jump to the page that was open when
57    the buffer was originally killed.
58
59 Expected behaviour: elpher should be once again at the bottom of the history
60 stack and should not remember the previous history.
61
62 Observed behaviour: elpher _does_ remember the previous history.
63   
64 * Completed improvements
65   
66 ** CLOSED Turn on lexical scoping
67
68    A branch exists for this, but there are some compilation kinks
69 to iron out.
70
71   
72 ** CLOSED Implement support for telnet entries
73
74 Similar to http entries, telnet entries will be handled by code
75 external to elpher. However it seems I made http entry handling a
76 special case, and I don't want another!  So the only option is to
77 bring both http and telnet entries back into the fold by representing
78 them both as standard nodes and having the grunt work done by getter
79 functions.
80
81 ** CLOSED Allow users to access selected and current node details.
82    
83 ** CLOSED Implement bookmark system
84
85   Currently the bookmark page replaces the current page, and it
86   does so silently (i.e. it doesn't become part of the link hierarchy).
87   I think this is a mistake, as it results in confusing behaviour when
88   traversing the link hierarchy after visiting one of the bookmarked links.
89
90   Instead, I think I should
91   1. Make the bookmark page part of the hierarchy, and
92   2. Reinstate the visited node hash table to avoid excess link hierarchy pollution.
93
94   In order to accomplish 1. it will be necessary to make the bookmark page renderer
95   a proper getter function, and one that never caches the contents of the buffer.
96
97   Actually, I might have to think about that a bit more.  I don't know
98   how to answer the question of what the best thing to do with node
99   parent links when using a cached node in place of a new node.  (Maybe
100   I always update node.parent unless parent is already an ancestor of
101   node?)
102
103   
104 ** CLOSED Support character encoding diversity
105
106 ** CLOSED Make URLs the basic address type.
107 Currently I waste a lot of effort converting between
108 URL and non-URL representations.  This is unnecessary, and
109 actually makes lots of things uglier.
110
111 For example, the bookmarks file contains addresses in Elpher's
112 internal representation, whereas I expect users would prefer
113 it contain URLs.
114
115 So the idea would be for (elpher-node-address node) to be
116 a either a string or a symbol, with symbols used for "special"
117 pages (bookmarks, start page, etc).  The getter functions
118 `elpher-address-selector' etc will still do what they currently
119 do, but will process the URL to do it.
120
121 This also means that non-gopher URLs will be explicitly represented
122 as such: no more abusing the "h" type for these.
123
124 ** INVALID Remove "redraw" command
125 This is only necessary for returning from displaying the raw
126 server response.  If I can provide a better way of doing that
127 then we can get rid of redraw entirely.
128
129 Actually, this command can be useful to correct rendering issues that
130 occasionally pop up in termal windows.  Lets leave it for now.
131
132 ** CLOSED Implement Finger support
133    
134 ** CLOSED Improve download performance
135    This is actually easy to fix - the major problem at the moment is
136    the braindead way the incrementally-retrieved data is recorded:
137    (setq result-string (concat result-string next-bit)).
138    This is O(N^2).  Yuck!
139    
140    Okay, replacing this really does improve things.  Large gemini
141    downloads now seem occur at rates I'd expect.
142    
143 ** CLOSED Download/rendering progress feedback
144    Particularly for large files or complicated pages, elpher can
145    take a few seconds or more to generate a response.  Thhis is
146    frustrating for users, who are left staring at a blinking
147    cursor.
148
149    A small amount of feedback could help with this.
150
151 * Closed issues
152   
153 ** CLOSED Org mode faces are not present in recent emacs versions
154 Even 26.1 doesn't seem to have these.  This means that, for many
155 users, elpher doesn't show any difference between any of the
156 item types.  Not a major problem at all, but the faces we inherit
157 from should definitely be ones which have been present for much
158 longer.  Perhaps the font lock mode faces are the way to go after
159 all.
160
161 Update: changed all default faces to inherit from font-lock and basic faces.
162
163 ** CLOSED URL-centric addressing breaks bookmark file compatibility
164    
165 Need a way to allow people to rescue their old bookmark files
166 following this update.
167
168 ** CLOSED History loops <2019-11-08 Fri>
169
170 Occasionally elpher gets stuck in a "history loop" where a
171 node is its own grandparent.  Obviously this sucks, as history
172 is elpher's main mechanism for making gopherspace exploration
173 painless.
174
175 I suspect the problem is in either ~elpher-visit-node~ or
176 ~elpher-visit-parent~.
177
178 Follow-up: this has been fixed by the new stack-based history system
179 in 2.5.
180
181
182 ** CLOSED Redirects do not rewrite current address
183
184 This is a bug, as gemini://blah.com/hi may get redirected
185 to gemini://blah.com/hi/, at which point link lines
186 of the form "=> there" should be interpreted as pointing
187 at gemini://blah.com/hi/there, while currently they are
188 interpreted as pointing at gemini://blah.com/there.