Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Emacs predictive completion manual.V0.12.2.pdf
Скачиваний:
14
Добавлен:
23.08.2013
Размер:
270.17 Кб
Скачать

Chapter 6: Bugs and Future Improvements

18

6 Bugs and Future Improvements

The predictive completion package has been tested on Emacs versions 21.3 and the multitty CVS branch, and is known to work reasonably well. It will not work tested under older versions, and currently doesn’t work under any version of XEmacs.

Report bugs and feature requests to toby-predictive@dr-qubit.org. Even reports of which versions of Emacs it runs under are useful at this stage (though check the website http://www.dr-qubit.org/emacs.php first to make sure your version is not already listed).

6.1 Known Bugs

Known bugs (in no particular order):

1.Predictive mode does not work under XEmacs. Making it work will take some compatibility work, but should be possible.

2.No predictive-remove-from-dict command exists to remove a word from a dictionary. However, it it unlikely ever to exist unless there is huge demand (because removing entries from a ternary search tree is fraught with di culties). The quick-and-dirty work-around at the moment is to reduce the word’s weight using predictive-add- to-dict with a large negative weight, so that it is unlikely to show up as a likely completion. The better work-around is to dump the dictionary to a text file using predictive-dump-dict-to-file, remove the o ending word, and recreate the dictionary.

3.There are probably still bugs remaining in the auto-overlay code, used in some major modes to set up region-local dictionaries. If you find one, please report it along with precise instructions on how to reproduce it. They’re fiendishly di cult to track down!

6.2 Future Improvements

Possible future improvements to predictive completion (in no particular order):

1.Allow the learning rate (i.e. increment added each time a word is learnt) to be set bu er-locally and/or separately for each dictionary?

2.More dictionaries and setup functions. (This one will probably be here for ever. I suspect new major modes are being created faster than predictive mode setup functions!)

3.More predictive mode configuration variables could be allowed to have “overlay-local” bindings, not just the active dictionary and completion-menu function.

4.Predictive mode should be integrated with the semantic package, to make it more useful for writing programs. At the moment, it works best with plain text and markup languages.

Possible future improvements to auto overlays (in no particular order):

1.A “flat” regexp class is missing from the auto-overlay package, i.e. regions that start at a start delimiter and ignore any further start delimiters until the first following end delimiter (c.f. block comments in c++).

2.Currently, it’s di cult to deal with stack class regexps for which the end regexps match some start regexps of interest but also others that are irrelevant. E.g. ‘{’ and ‘}’ in

Chapter 6: Bugs and Future Improvements

19

LaTEX when you’re only interested in ‘\somecommand{’ start regexps. Or matching parens in LISP, when you’re only interested in function bodies, say. The only solution is to include all start regexps and give the irrelevant ones a null dict property. This can end up creating a lot of overlays! A variant of the stack class that avoids this problem is needed.

3.The auto-overlay-init command takes a long time to create all the overlays in even medium-sized bu ers. There’s not much one can do about this the first time it’s run, but the overlays could be saved in an auxiliary file when killing the bu er or Emacs, and reloaded from there to speed up subsequent invocations.

4.It would be nice to automatically load LaTEX dictionaries based on \includepackage commands. It would also be nice to be able to select the main dictionary automatically based on the \documentclass. This could be done fairly easily by deriving a couple of new auto-overlay classes from the word class, with modified parse and suicide functions to do the dictionary loading.

Соседние файлы в предмете Электротехника