Package: lookup-el
Version: 1.4.1-5
Severity: wishlist
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

Recently I found that /etc/emacs/site-start.d/50lookup-el.el does not
enable ndict when dicod is used as dict-server instead of dictd.

The attached patch is for $(SOURCE)/debian/emacsen-startup file
to automatically detect dicod server.

Best regards,
- -- 
Ryo IGARASHI, Ph.D.
rigar...@gmail.com

- -- System Information:
Debian Release: squeeze/sid
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'unstable'), (500, 'stable'), 
(1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/1 CPU core)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lookup-el depends on:
ii  dpkg                      1.15.7.2       Debian package management system
ii  emacs                     23.2+1-2       The GNU Emacs editor (metapackage)
ii  emacs23                   23.2+1-2       The GNU Emacs editor (with GTK+ us
ii  install-info              4.13a.dfsg.1-5 Manage installed documentation in 

Versions of packages lookup-el recommends:
ii  dicod [dict-server]         2.0.90-1+b1  RFC 2229 compliant modular diction
ii  dict-elements [dictd-dictio 20001107-a-5 Data regarding the Elements
ii  dict-foldoc [dictd-dictiona 20100130-1   FOLDOC dictionary database
ii  dict-gcide [dictd-dictionar 0.48-6       A Comprehensive English Dictionary
ii  dict-jargon [dictd-dictiona 4.4.7-2      dict package for The Jargon Lexico
ii  dict-vera [dictd-dictionary 1:1.17-5     Dictionary of computer related acr
ii  dict-wn [dictd-dictionary]  1:3.0-23     electronic lexical database of Eng
ii  eblook                      1:1.6.1-7    electronic dictionary search comma

Versions of packages lookup-el suggests:
pn  bitmap-mule                   <none>     (no description available)
ii  dict-foldoc                   20100130-1 FOLDOC dictionary database
ii  dict-gcide                    0.48-6     A Comprehensive English Dictionary
ii  dict-vera                     1:1.17-5   Dictionary of computer related acr
pn  dictzip                       <none>     (no description available)
pn  edict-fpw                     <none>     (no description available)
pn  flim                          <none>     (no description available)
pn  ispell                        <none>     (no description available)
pn  kakasi                        <none>     (no description available)
pn  namazu2                       <none>     (no description available)
pn  sufary                        <none>     (no description available)

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCgAGBQJMNSsbAAoJEOx5ooBqGSMZ5akQALYvcqI5eldkuxwLUGhEYxD9
NNXFGyNPZSfY8wMfoBb4tO91671//IWoyWTchDqOgE+jRjA1WaXLY9RJV650PfV+
ghBAVywvXhDHZaLsnObNFySlxaU3z4H/kj6oG2b3oNdpuZXCMERjxWpyPpDbUQdq
LUWwA04JgKC6iu5Kv1+tCruA7zQjMa5LlzEVk7fmIHMlzwE307aSOtydmwZ2ojmB
Viuip1TlkXfke6e72rAF24CZ2Fb2ZhYADBs2otJjaIkG/0EYAVWk0iTxNMWFkD3o
tpuHlw1I4wRNED6RePkLsVhMYwOS9/WqEB0/Qtj1tEzcF/Cy6DSdz8W4OEqwIo1A
4H/jrZwyw5wgo0Ow3/xQ/8uWwL0vlzAQ1MP71cEqI0LkLFqtr7jtsSTkrM5AQ72z
pXv+oOOc/nXpiffPzZ590xdP3FZdDnCFN/qug1CTFaMTzXRhkNeInU+v9ejf5ZAE
t2Q/R7gz6VK+KxcC56bb0tqjd7dOm3cEkk8E7K/VL5YJZMwieGxdGIQ9Z35vgbKb
80N56m09tm4h2twIWdibmIGL+p3arkgCkQ7BfnurxzNiloAhp0ZMzIeP5IO0fx97
sAkVr4Fhkb6afuH245j2pSemtHhxJUy2y5tMys1utGgxMxez5QJZyGW5SyZFdhXA
QoBMJgzcmPi7+EAzRafQ
=RyVD
-----END PGP SIGNATURE-----
--- emacsen-startup.old 2010-07-08 10:08:04.000000000 +0900
+++ emacsen-startup     2010-07-08 10:15:29.000000000 +0900
@@ -116,11 +116,23 @@
            (add-to-list 'agents '(ndict "localhost"
                                   :coding utf-8-dos) 'append)
          (add-to-list 'agents '(ndict "localhost") 'append))
+      (if (and (file-exists-p "/var/run/dicod/dicod.pid")
+               (file-exists-p "/usr/bin/dicod")
+               (file-exists-p "/usr/lib/dico/dictorg.so"))
+          ;; ndict
+          (if (or (and (fboundp 'find-coding-system)
+                       (find-coding-system 'utf-8-dos))
+                  (and (fboundp 'coding-system-p)
+                       (coding-system-p 'utf-8-dos)))
+              (add-to-list 'lookup-search-agents
+                           '(ndict "localhost" :coding utf-8-dos) 'append)
+            (add-to-list 'lookup-search-agents
+                         '(ndict "localhost") 'append))
       ;; ndic
       (if (file-directory-p "/usr/local/share/dictd")
          (add-to-list 'agents '(ndic "/usr/local/share/dictd") 'append))
       (if (file-directory-p "/usr/share/dictd")
-         (add-to-list 'agents '(ndic "/usr/share/dictd") 'append)))
+         (add-to-list 'agents '(ndic "/usr/share/dictd") 'append))))
     ;; ndspell
     (if (file-executable-p "/usr/bin/ispell")
        (add-to-list 'agents '(ndspell) 'append))

Reply via email to