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