Prevent corruption of ansi interpreter state.
[elpher.git] / ISSUES.org
1 #+TITLE: Development notes/ideas
2 #+TODO: OPEN(o!) | CLOSED(c!) INVALID(i@)
3 #+STARTUP: logdrawer
4    
5 * Open Bugs
6
7 ** OPEN Sanitize certificate names
8    :LOGBOOK:
9    - State "OPEN"       from              [2020-06-22 Mon 10:32]
10    :END:
11    
12 Currently things will break in undefined ways if a name is specified
13 that contains path separators and probably other characters that I
14 haven't thought of.  This is dangerously unacceptable and needs to be
15 fixed right away.
16
17 * Closed Bugs
18   
19 ** CLOSED Org mode faces are not present in recent emacs versions
20 Even 26.1 doesn't seem to have these.  This means that, for many
21 users, elpher doesn't show any difference between any of the
22 item types.  Not a major problem at all, but the faces we inherit
23 from should definitely be ones which have been present for much
24 longer.  Perhaps the font lock mode faces are the way to go after
25 all.
26
27 Update: changed all default faces to inherit from font-lock and basic faces.
28
29 ** CLOSED URL-centric addressing breaks bookmark file compatibility
30    
31 Need a way to allow people to rescue their old bookmark files
32 following this update.
33
34 ** CLOSED History loops <2019-11-08 Fri>
35
36 Occasionally elpher gets stuck in a "history loop" where a
37 node is its own grandparent.  Obviously this sucks, as history
38 is elpher's main mechanism for making gopherspace exploration
39 painless.
40
41 I suspect the problem is in either ~elpher-visit-node~ or
42 ~elpher-visit-parent~.
43
44 Follow-up: this has been fixed by the new stack-based history system
45 in 2.5.
46
47
48 ** CLOSED Redirects do not rewrite current address
49
50 This is a bug, as gemini://blah.com/hi may get redirected
51 to gemini://blah.com/hi/, at which point link lines
52 of the form "=> there" should be interpreted as pointing
53 at gemini://blah.com/hi/there, while currently they are
54 interpreted as pointing at gemini://blah.com/there.
55
56 ** CLOSED History inconsistency when restarting elpher <2020-05-26 Tue>
57
58 To reproduce:
59 1. open elpher and follow a few links until you're a handful of links below
60    the start page.
61 2. kill the elpher buffer with C-x k
62 3. Open elpher again, which will show the start page.
63 4. Press 'u' to go up.  Elpher wiill respond stating that there is no previous page.
64 5. Press 'u' again. Elpher will then jump to the page that was open when
65    the buffer was originally killed.
66
67 Expected behaviour: elpher should be once again at the bottom of the history
68 stack and should not remember the previous history.
69
70 Observed behaviour: elpher _does_ remember the previous history.
71
72 *** update <2020-05-27 Wed>
73 Turns out this was just because the `elpher` function was merely setting
74 the `elpher-current-page` variable to nil, then using `elpher-visit-page`
75 to visit the start page, resulting in the nil being pushed onto the existing
76 history stack.  Because `elpher-visit-previous-page` always trys to pop from
77 this stack and tests whether the result is nil (which it is when the stack is empty),
78 the first "u" would result in the "no previous page" message but would still
79 pop the stack, meaning that subsequent "u" commands would succeed.
80
81 The fix is just to zero out the history list in the `elpher` function just as
82 `elpher-current-page` is cleared.
83
84 * Open Enhancements
85
86 ** OPEN Allow multiple elpher buffers [33%]
87
88    Shouldn't be too hard, just need elpher-current-node to be
89 buffer-local and allow various buffer-switching procedures to
90 do something sensible.
91
92 Here are the things that need to be implemented before
93 this can happen:
94 - [X] shift history out of node tree and into separate stack
95 - [ ] make history stack variables buffer-local
96 - [ ] have elpher-with-clean-buffer select appropriate buffer 
97
98 ** OPEN Replace support for user-specified starting pages
99 This used to be available, but was removed during a refactor.
100    
101 ** OPEN Make installing existing certificates easier
102    :LOGBOOK:
103    - State "OPEN"       from "CLOSED"     [2020-06-22 Mon 10:34]
104    :END:
105
106 It's naive to think that people don't have client certificates created
107 outside of elpher. Thus we need some easy way to "install" these
108 certificates, either by copying them or by referencing them in some
109 way.
110
111 * Closed Enhancements
112   
113 ** CLOSED Turn on lexical scoping
114
115    A branch exists for this, but there are some compilation kinks
116 to iron out.
117
118   
119 ** CLOSED Implement support for telnet entries
120
121 Similar to http entries, telnet entries will be handled by code
122 external to elpher. However it seems I made http entry handling a
123 special case, and I don't want another!  So the only option is to
124 bring both http and telnet entries back into the fold by representing
125 them both as standard nodes and having the grunt work done by getter
126 functions.
127
128 ** CLOSED Allow users to access selected and current node details.
129    
130 ** CLOSED Implement bookmark system
131
132   Currently the bookmark page replaces the current page, and it
133   does so silently (i.e. it doesn't become part of the link hierarchy).
134   I think this is a mistake, as it results in confusing behaviour when
135   traversing the link hierarchy after visiting one of the bookmarked links.
136
137   Instead, I think I should
138   1. Make the bookmark page part of the hierarchy, and
139   2. Reinstate the visited node hash table to avoid excess link hierarchy pollution.
140
141   In order to accomplish 1. it will be necessary to make the bookmark page renderer
142   a proper getter function, and one that never caches the contents of the buffer.
143
144   Actually, I might have to think about that a bit more.  I don't know
145   how to answer the question of what the best thing to do with node
146   parent links when using a cached node in place of a new node.  (Maybe
147   I always update node.parent unless parent is already an ancestor of
148   node?)
149
150   
151 ** CLOSED Support character encoding diversity
152
153 ** CLOSED Make URLs the basic address type.
154 Currently I waste a lot of effort converting between
155 URL and non-URL representations.  This is unnecessary, and
156 actually makes lots of things uglier.
157
158 For example, the bookmarks file contains addresses in Elpher's
159 internal representation, whereas I expect users would prefer
160 it contain URLs.
161
162 So the idea would be for (elpher-node-address node) to be
163 a either a string or a symbol, with symbols used for "special"
164 pages (bookmarks, start page, etc).  The getter functions
165 `elpher-address-selector' etc will still do what they currently
166 do, but will process the URL to do it.
167
168 This also means that non-gopher URLs will be explicitly represented
169 as such: no more abusing the "h" type for these.
170
171 ** INVALID Remove "redraw" command
172 This is only necessary for returning from displaying the raw
173 server response.  If I can provide a better way of doing that
174 then we can get rid of redraw entirely.
175
176 Actually, this command can be useful to correct rendering issues that
177 occasionally pop up in termal windows.  Lets leave it for now.
178
179 ** CLOSED Implement Finger support
180    
181 ** CLOSED Improve download performance
182    This is actually easy to fix - the major problem at the moment is
183    the braindead way the incrementally-retrieved data is recorded:
184    (setq result-string (concat result-string next-bit)).
185    This is O(N^2).  Yuck!
186    
187    Okay, replacing this really does improve things.  Large gemini
188    downloads now seem occur at rates I'd expect.
189    
190 ** CLOSED Download/rendering progress feedback
191    Particularly for large files or complicated pages, elpher can
192    take a few seconds or more to generate a response.  Thhis is
193    frustrating for users, who are left staring at a blinking
194    cursor.
195
196    A small amount of feedback could help with this.
197
198 ** CLOSED Implement Gemini support [100%]
199    :LOGBOOK:
200    - State "CLOSED"     from "OPEN"       [2020-06-20 Sat 22:32]
201    :END:
202    
203 Here is the checklist of features required before release:
204 - [X] basic genimi transactions
205 - [X] gemini transactions requiring client certificates
206 - [X] gemini input handling
207 - [X] gemini map files (text/gemini)
208 - [X] Support for plain text responses (text/*)
209 - [X] Support for image responses (text/image)
210 - [X] Support for mime-specified character encodeing
211 - [X] Saving responses to disk
212 - [X] Viewing raw responses
213   
214 The last few will be made infinitely easier if we factor the
215 gopher "getter" code differently.
216
217
218 ** INVALID Allow for grouping of bookmarks
219 :LOGBOOK:
220 - State "INVALID"    from              [2021-07-23 Fri 10:10] \\
221   Since switching to Emacs native bookmarks, this is no longer our concern.
222 :END:
223 To support this I'd like to add a bookmark page specific
224 set of keybindings.  Currently all bindings available on
225 the bookmark page are available everywhere else.  But
226 expanding and collapsing bookmark groups sounds like it
227 might need more specific bindings.
228
229 *** Priority bump <2020-05-31 Sun>
230
231 As bookmark lists grow, some sort of grouping is becoming more and more
232 important.  Furthermore, with this in place it would become feasible
233 (and I really suspect almost trivial) to implement an update-checking
234 system for chosen groups of bookmarks.
235
236 For instance, we could prefetch content for each of the addresses within
237 a chosen group, indicating which had been changed since the last fetch.
238 (We could just store hashes of earlier content to detect changes.)
239
240 The difficult thing to decide is how the UI for the new bookmark page
241 will work.  It already has its own renderer, and we could easily stop
242 using the gopher directory line renderer in favour of something more
243 amenable to displaying the group information.  Thus we're very free to
244 do whatever we like once we also have a special key map in place as well.
245
246 I guess I need to look into what native widgets Emacs has for displaying
247 collapsable hierarchies.
248
249
250 ** CLOSED Add history browsing
251 :LOGBOOK:
252 - State "CLOSED"     from "OPEN"       [2021-07-23 Fri 10:09]
253 :END: