Previous Next Top
If you have an sufficient recent custom version installed (e.g., the one provided in XEmacs 20.4) you can use the customize-group with the dictionary group to customize this package. For using the customize buffer please refer to its online help.
Of course you can set all the variables and hooks you want in the startup file. Here is a little example that I use for selecting the server on my local machine and for binding some function to the user-reserved keys starting from C-c a to C-c z. It also shows how to invoke popup menus (using the right button in GNU Emacs or ctrl+right button in XEmacs) and installs the global tooltip-mode.
;; Key binding to invoke the dictionary client (global-set-key "\C-cs" 'dictionary-search) (global-set-key "\C-cm" 'dictionary-match-words) ;; The dictionary server is running on the local machine (setq dictionary-server "localhost") ;; Popup menu for GNU Emacs 21, and XEmacs 21 (if (boundp 'running-xemacs) (global-set-key [(control button3)] 'dictionary-mouse-popup-matching-words) (global-set-key [mouse-3] 'dictionary-mouse-popup-matching-words)) ;; Tool-tip support for GNU Emacs 21 (setq dictionary-tooltip-dictionary "eng-deu") (global-dictionary-tooltip-mode 1)
Starting from version 1.6 (not officially released) the dictionary client supports connections via HTTP proxies. It uses the CONNECT method which is usually used to relay SSL connections through a proxy. On most proxies the dictionary port (2628) must be configured to be allowed to connect through the proxy server. You will get an error message like (in the case of wwwoffle):
HTTP/1.0 500 WWWOFFLE Server Error
if this is not the case.
To enable proxy support, set the variable dictionary-use-http-proxy to true. This can be done through the customize interface, there is a sub-group named Dictionary Proxy of the Dictionary group. Other settings you can modify are the name of the proxy server (dictionary-proxy-server, Default proxy) and the port of the proxy server (dictionary-proxy-port, Default 3128).
Although the standard definition specifies UTF-8 as character encoding to be used for the protocol there exists dictionaries encoding in other encodings like koi8-r for the russian language. To support these dictionaries there exists starting from version 1.7 a variable named dictionary-coding-systems-for-dictionaries. This is a list of cons cell containing the dictionary name (as string) and the coding system to use (as symbol). For modifying the variable the customize interface should be used, it helps you selecting a valid charset and keeping the lisp structure intact.
If a dictionary is not specified in this list its encoding defaults to UTF-8.
The default setting
'( ("mueller" . koi8-r))
specifies that the koi8-r encoding should be used for the english-russian dictionary internally called mueller. The internal dictionary name can be found in brackets within the dictionaries output buffer after the long dictionary name (for example, the output From WordNet (r) 1.6[wn] specifies the internal name of the Wordnet dictionary being wn.
Previous Next Top