User visible changes:
[docutils/kirr.git] / docutils / tools / editors / emacs / IDEAS.rst
blobafd9c79ad1cb13914ec2b47bdf291efc0264918b
1 The following is a list of ideas of functionality which would be nice
2 to have in `rst.el`. In the examples a ``@`` stands for the cursor.
4 Convert to id
5 =============
7 * Convert the region to an HTML id
9   * For instance "Eine Überschrift" to "eine-berschrift"
11   * According the same rules as reST does this
13 Jump to internal target
14 =======================
16 * A command to jump to the internal target the point is on
18 * A target may be
20   * A section title
22   * Footnotes / citations
24   * Inline internal targets
26   * Hyperlink target definition
28   * Substitution definition
30 * See hunk #26 in `rst_el-emacs_V23_1_patch1_1_2` vs. `emacs_V23_1`
31   for some ideas
33 Completion for directive options
34 ================================
36 * Imagine ::
38     .. list-table::
39        :@
41   with the cursor at the asterisk
43 * There should be a command which offers all the possible options for
44   this particular directive as completion
46 * May be `skeleton.el` can also be useful
48 Completion for directives
49 =========================
51 * Imagine ::
53     .. @
55 * There should be a command which offers all directives as completion
57 * May be this should work for other keywords as well
59 * May be this could work even at the beginning of the line
61 * Completion must be bound to M-TAB
63   * Already existing binding must be chained
65   * May be `expand.el` can help (look in package finder)?
67   * May be `hippie` is good here
69   * Check `(info)autotype`
71 Completion for user-defined elements
72 ====================================
74 * Imagine ::
76     |@
78   or ::
80     [@
82   or ::
84     _@
86 * There should be a command which offers all defined substitutions /
87   footnotes / links as completion
89 Insertion of link alias
90 =======================
92 * Imagine ::
94     Aspect of something
95     ===================
97     This is about the `aspect of something`_@
99 * There should be a command which asks you for an alias for the link,
100   add the alias and change the link ::
102     .. _aspects of something:
104     Aspect of something
105     ===================
107     This is about the `aspects of something`_@
109 Smart use of `iimage-mode`
110 ==========================
112 * There is `iimage-mode` which shows ``.. image::``\s in Emacs
114 * May be we can add a binding to toggle it
116 TOC in speedbar
117 ===============
119 * If the TOC is displayed in the speedbar this could be used for
120   permanent navigation
122 toc-mode without markup
123 =======================
125 * The markup which may be contained in a section title is not useful
126   in toc-mode and should be suppressed
128 Sophisticated navigation in sections
129 ====================================
131 * Navigation in sections similar to navigation in other structured data
133   * Like XML, Lisp
135   * C-M-u für Up
137   * C-M-d für Down
139   * C-M-f / C-M-b für Forward / Backward
141 Display of current location
142 ===========================
144 * Display the "section path" to the current point
146 * Like in XML: In which element is the point?
148 toc-mode only to a certain level
149 ================================
151 * If a TOC buffer is created a prefix argument should limit the depth
152   of the listing to the given level
154 Imenu support
155 =============
157 * Imenu could be supported
159   * See `(elisp)Imenu`
161 Outline support
162 ===============
164 * Support for `outline-mode' / `allout-mode' would be nice
166   * Should consider section titles
168 * May be folding is also possible
170   * For item lists
172 Sophisticated filling
173 =====================
175 * These things must be filled special:
177   * Definitions
179   * Filling of ::
181       * VeryLongWordSuchAsAnURLVeryLongWordSuchAsAnURLVeryLongWordSuchAsAnURLVeryLongWordSuchAsAnURLVeryLongWordSuchAsAnURL
183     should work as expected by *not* breaking the line
185 * These things may not be filled at all
187   * Literal blocks
189   * Tables
191   * Section headers
193   * Link definitions
195 Sophisticated indentation
196 =========================
198 * It should be generally possible to shift one more to the right
200   * This makes indentation for quotes possible
202   * But not for literal blocks
204 * For item lists the best tab should be on the same level as the last
205   item::
207     * bla
209     @
211   * The second best tab should be where text starts::
213       * bla
215         @
217 * <backtab> should be used to indent in the other direction
219   * Or may be C-u <tab> but this has a different meaning
221 * <tab> could obsolete C-c C-r <tab>
223   * For this the indentation needs to be determined at the start
224     instead of per line
226     * <tab> over list works::
228         Text
230           * GGGGGG
231           * SSSSSSSSSSSSSSS
232           * TTTTTTTT
233           * ZZZZZZZZ
235     * <tab> over list doesn't work::
237         Text
239         * GGGGGG
240         * SSSSSSSSSSSSSSS
241         * TTTTTTTT
242         * ZZZZZZZZ
244 List to sections
245 ================
247 * A command would be nice which
249   * transforms the first level of a nested list in a region into a
250     header
252   * removes one level of indentation from the rest of the list
254 Change section level by more than one step
255 ==========================================
257 * It would be nice if <C-h> `rst-adjust` could rotate a section
258   adornment more than one level
260 * A modification of the semantic of the prefix arguments could do this
262   * Non-zero numeric prefix arg n rotates n step in the given direction
264   * Prefix arg 0 toggles overline / underline
266     * This would be different from current setup
268 Compiling for syntax check
269 ==========================
271 * Compiling with results going to `/dev/null` would be useful
273   * This would just do a syntax check with no files lying around
275 * Toolset choice for <C-c C-c C-c> `rst-compile` must be by
276   customizable if at all necessary
278   * Customization group must be used
280 Renumber an exisiting enumeration
281 =================================
283 * Renumbering an exisiting enumeration is not possible yet
285 Command to move across blocks
286 =============================
288 * A command moving forward / backward across the content blocks of the
289   current block would be nice
291   * For instance: Move across all blocks contained in an item or field
293   * This would move to the start of the sibling of the current block
295   * Would allow to jump to the next item on the same level in a list
297 * <C-M-f> `forward-sexp` could be a nice binding
299 rst-toc-insert features
300 =======================
302 * The `contents::` options could be parsed to figure out how deep to
303   render the inserted TOC
305 * On load, detect any existing TOCs and set the properties for links
307 * TOC insertion should have an option to add empty lines
309 * TOC insertion should deal with multiple lines
311 * Automatically detect if we have a `section-numbering::` in the
312   corresponding section, to render the toc.
314 Automatic handling of `.txt` files
315 ----------------------------------
317 It would be nice to differentiate between text files using
318 reStructuredText and other general text files. If we had a function to
319 automatically guess whether a `.txt` file is following the
320 reStructuredText conventions, we could trigger `rst-mode` without
321 having to hard-code this in every text file, nor forcing the user to
322 add a local mode variable at the top of the file. We could perform
323 this guessing by searching for a valid adornment at the top of the
324 document or searching for reStructuredText directives further on.
326 Entry level for rst-straighten-adornments
327 -----------------------------------------
329 * `rst-straighten-adornments` should have an entry level to start at a
330   lower than the top level
332   * I for one prefer a verbose style for top level titles which is not
333     appropriate for documents without titles
335   * Should be done by a prefix argument