What is Sdcv ?

Sdcv is a mode that interface for sdcv (StartDict console version).


To use this package, you have to install StartDict and sdcv in your system.
In Debian, just type:
sudo aptitude install stardict sdcv -y
And copy dictionary file to /usr/share/startdict/dic/.
Put Lisp:showtip.el and Lisp:sdcv.el in your load-path, add
        (require 'sdcv)
in ~/.emacs
Or use Lisp:auto-install.el install Sdcv with following:
    1. M-x auto-install-batch RET
    2. Input “sdcv”
(How to install Lisp:auto-install.el, see AutoInstall)
Add few dictionary name to ‘sdcv-dictionary-simple-list’ for display simple describe with tooltip,
    (setq sdcv-dictionary-simple-list        ;; a simple dictionary list
Add complete directionay name to ‘sdcv-dictionary-complete-list’ for display detail describe with buffer,
    (setq sdcv-dictionary-complete-list      ;; a complete dictionary list

Configure Example

Lisp:init-sdcv.el have example file for configure Lisp:sdcv.el.


Search word around point and display detail describe with buffer.
Search word around point and display simple describe with tooltip.
Search input word and display detail describe with buffer.
Search input word and display simple describe with tooltip.


All below option can customize by: M-x customize-group RET sdcv RET

The name of sdcv buffer.
The dictionary list for simple describe.
The dictionary list for complete describe.




When call function ‘sdcv-search-input’, sdcv report “unrecognized option” warning, apply below patch(against v1.5.2) will fix this problem:

--- sdcv.el	2009-08-23 17:18:34.000000000 +0800
+++ /home/reiv/emacs/site-lisp/sdcv.el	2009-08-23 17:19:04.000000000 +0800
@@ -356,9 +356,10 @@
     (setq buffer-read-only nil)
     (let* ((process
-            (start-process
-             "sdcv" sdcv-buffer-name "sdcv"
-             (sdcv-search-witch-dictionary word sdcv-dictionary-complete-list))))
+            (apply 'start-process
+                   (append `("sdcv" ,sdcv-buffer-name "sdcv")
+                           (sdcv-search-args word sdcv-dictionary-complete-list))
+                   )))
        (lambda (process signal)
@@ -367,6 +368,10 @@
+(defun sdcv-search-args (word dict-list)
+  (append (apply 'append (mapcar (lambda (d) `("-u" ,d)) dict-list))
+          (list "-n" word)))
 (defun sdcv-search-simple (&optional word)
   "Search WORD simple translate result."