From d5ba212946944ccbe9297c04b413ad484a8a410a Mon Sep 17 00:00:00 2001 From: Torsten Hilbrich Date: Mon, 18 Mar 2002 19:49:00 +0100 Subject: Imported version 1.7.4 from tarball dictionary.el (dictionary-do-matching): removed quotes around dictionary name and match strategy dictionary.el (dictionary-do-search): removed quotes around dictionary name dictionary.el (dictionary-display-more-info): removed quotes around dictionary name. This problem (occurring with jdictd) was reported by E C Vijil --- ChangeLog | 39 ++++ Makefile | 21 ++ README | 18 +- debian/changelog | 15 ++ debian/control | 6 +- debian/files | 1 + dictionary.el | 15 +- doc/dictionary.info | 250 ++++++++++++++++++++ doc/dictionary.texi | 351 ++++++++++++++++++++++++++++ doc/dictionary/HTTP-Proxy.html | 14 ++ doc/dictionary/Index.html | 34 +++ doc/dictionary/Installation.html | 146 ++++++++++++ doc/dictionary/Usage.html | 21 ++ doc/dictionary/User-callable-Functions.html | 16 ++ doc/dictionary/Variables.html | 20 ++ doc/dictionary/index.html | 81 +++++++ install-package.el | 7 - package-info.in | 19 ++ 18 files changed, 1052 insertions(+), 22 deletions(-) create mode 100644 ChangeLog create mode 100644 debian/files create mode 100644 doc/dictionary.info create mode 100644 doc/dictionary.texi create mode 100644 doc/dictionary/HTTP-Proxy.html create mode 100644 doc/dictionary/Index.html create mode 100644 doc/dictionary/Installation.html create mode 100644 doc/dictionary/Usage.html create mode 100644 doc/dictionary/User-callable-Functions.html create mode 100644 doc/dictionary/Variables.html create mode 100644 doc/dictionary/index.html delete mode 100644 install-package.el create mode 100644 package-info.in diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..a8ab955 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,39 @@ +2002-03-15 Torsten Hilbrich + + * dictionary.el (dictionary-do-matching): + removed quotes around dictionary name and match strategy + + * dictionary.el (dictionary-do-search): + removed quotes around dictionary name + + * dictionary.el (dictionary-display-more-info): + removed quotes around dictionary name + + This problem (occurring with jdictd) was reported by E C Vijil + +2002-01-29 Torsten Hilbrich + + * dictionary.el (dictionary-default-popup-strategy): added this + variable and changed dictionary-popup-matching-words to use + this as matching strategy (suggested by Renaud Pons) + +2001-12-21 Torsten Hilbrich + + * link.el (link-initialize-keymap): fixed keybinding bug (reported + by David A. Panariti) + +2001-12-15 Torsten Hilbrich + + * Fixed bug for non-mule Emacsen (dictionary-coding-system + was incorrectly written) + +2001-12-09 Torsten Hilbrich + + * Added HTTP-proxy support (using the HTTP CONNECT) + * Added support for dictionaries with encodings other + than utf-8 + +2001-09-08 Steve Youngs + + * Initial XEmacs Package version. + diff --git a/Makefile b/Makefile index 122ee65..6ff1d3f 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +# -*- Makefile -*- $Id$ + EMACS=emacs VERSION=1.7 @@ -56,6 +58,25 @@ package-install: package @if [ `id -u` -ne 0 ]; then printf "\aWarning, you are not root; the installation might fail\n\n"; fi @$(EMACS) -vanilla -batch -l install-package.el -f install-package `pwd`/$(XEMACS-PACKAGE) +.PHONY: view-info +view-info: info + info doc/dictionary.info + +.PHONY: doc +doc: info html + +.PHONY: info +info: doc/dictionary.info + +doc/dictionary.info: doc/dictionary.texi + cd doc && makeinfo --output dictionary.info dictionary + +.PHONY: html +html: doc/dictionary + +doc/dictionary: doc/dictionary.texi + cd doc && makeinfo --html dictionary + .PHONY: clean clean: rm -f $(XEMACS-PACKAGE) $(COMPILED) build diff --git a/README b/README index 7b448bc..cddcbf7 100644 --- a/README +++ b/README @@ -59,7 +59,13 @@ custom.el file in the above GNU Emacs. Please update to the current version whenever possible. XEmacs 21 and Emacs 20 as well as Emacs 21 have been tested too. - * Current version (1.7.3) of this package + * Current version (1.7.2) of this package + * Version 1.5.1 of this package + * Version 1.4.1 of this package + * Version 1.3.3 of this package + * Version 1.2.1 of this package + * Version 1.1 of this package + * Initial version (1.0) of this package I you want to know more about the differences please look at the ChangeLog. @@ -74,14 +80,14 @@ Unpacking the archive The package is distributed as tar.gz file. You unpack it using: -gzip -dc dictionary-1.7.3.tar.gz | tar xf - +gzip -dc dictionary-1.7.2.tar.gz | tar xf - or -tar -xzf dictionary-1.7.3.tar.gz +tar -xzf dictionary-1.7.2.tar.gz (with the version number subject to change) depending on whether you are using GNU tar which support the z flag for compression. After - unpacking the archive a directory dictionary-1.7.3 has been created + unpacking the archive a directory dictionary-1.7.2 has been created containing the necessary files. Installation @@ -93,8 +99,8 @@ Debian dpkg-buildpackage) you can use the supplied debian support. make debian - This will create a package named dictionary-1.7.3-1_i386.deb or - similiar in the parent directory of dictionary-1.7.3. You can now + This will create a package named dictionary-1.7.2-1_i386.deb or + similiar in the parent directory of dictionary-1.7.2. You can now install this package as root, it will automatically byte-compile itself for all installed emacs versions and provide a startup-file which autoloads this package. In the configuration example given below diff --git a/debian/changelog b/debian/changelog index 331063b..c4f32cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +dictionary (1.7.4-1) unstable; urgency=low + + * dictionary.el (dictionary-do-matching): removed quotes around + dictionary name and match strategy + + * dictionary.el (dictionary-do-search): removed quotes around dictionary + name + + * dictionary.el (dictionary-display-more-info): removed quotes around + dictionary name + + This problem (occurring with jdictd) was reported by E C Vijil + + -- Torsten Hilbrich Fri, 15 Mar 2002 21:19:23 +0100 + dictionary (1.7.3-1) unstable; urgency=low * dictionary.el (dictionary-default-popup-strategy): added this diff --git a/debian/control b/debian/control index e4fc207..22c21cb 100644 --- a/debian/control +++ b/debian/control @@ -1,11 +1,11 @@ Source: dictionary -Section: unknown +Section: unofficial Priority: optional -Maintainer: Torsten Hilbrich +Maintainer: Torsten Hilbrich Standards-Version: 3.2.1 Package: dictionary -Architecture: any +Architecture: all Depends: emacsen Description: dictionary client for emacs This dictionary client provides access to a dictionary server diff --git a/debian/files b/debian/files new file mode 100644 index 0000000..e5456d4 --- /dev/null +++ b/debian/files @@ -0,0 +1 @@ +dictionary_1.7.4-1_all.deb unofficial optional diff --git a/dictionary.el b/dictionary.el index a848f73..0d72efa 100644 --- a/dictionary.el +++ b/dictionary.el @@ -2,7 +2,7 @@ ;; Author: Torsten Hilbrich ;; Keywords: interface, dictionary - ;; $Id: dictionary.el,v 1.34 2002/02/06 20:49:41 torsten Exp $ + ;; $Id: dictionary.el,v 1.36 2002/03/18 18:13:59 torsten Exp $ ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -456,6 +456,7 @@ by the choice value: (defun dictionary-send-command (string) "Send the command `string' to the network connection." (dictionary-check-connection) + ;;;; ##### (connection-send-crlf dictionary-connection string)) (defun dictionary-read-reply () @@ -545,7 +546,7 @@ This function knows about the special meaning of quotes (\")" "Convert the text to the charset defined by the dictionary given." (let ((coding-system (dictionary-coding-system dictionary))) (if coding-system - (decode-coding-string text coding-system) + (encode-coding-string text coding-system) text))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -614,9 +615,10 @@ This function knows about the special meaning of quotes (\")" "The workhorse for doing the search" (message "Searching for %s in %s" word dictionary) - (dictionary-send-command (concat "define \"" dictionary "\" \"" + (dictionary-send-command (concat "define " dictionary " \"" (dictionary-encode-charset word dictionary) "\"")) + (message nil) (let ((reply (dictionary-read-reply-and-split))) (if (dictionary-check-reply reply 552) @@ -822,7 +824,7 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." (equal dictionary "!")) (dictionary-store-positions) (message "Requesting more information on %s" dictionary) - (dictionary-send-command (concat "show info \"" dictionary "\"")) + (dictionary-send-command (concat "show info " dictionary)) (let ((reply (dictionary-read-reply-and-split))) (message nil) (if (dictionary-check-reply reply 550) @@ -911,8 +913,8 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." (message "Lookup matching words for %s in %s using %s" word dictionary strategy) (dictionary-send-command - (concat "match \"" dictionary "\" \"" - strategy "\" \"" word "\"")) + (concat "match " dictionary " " + strategy " \"" (dictionary-encode-charset word "") "\"")) (let ((reply (dictionary-read-reply-and-split))) (message nil) (if (dictionary-check-reply reply 550) @@ -1066,6 +1068,7 @@ It presents the word at point as default input and allows editing it." (dictionary (car list)) (word (dictionary-decode-charset (cadr list) dictionary))) + (message word) (if (equal word "") [ "-" nil nil] (vector (concat "[" dictionary "] " word) diff --git a/doc/dictionary.info b/doc/dictionary.info new file mode 100644 index 0000000..9805f6e --- /dev/null +++ b/doc/dictionary.info @@ -0,0 +1,250 @@ +This is dictionary.info, produced by makeinfo version 4.0b from +dictionary.texi. + +INFO-DIR-SECTION Emacs +START-INFO-DIR-ENTRY +* Dictionary: (dictioanry). Dictionary client for using a RFC 2229 dict server. +END-INFO-DIR-ENTRY + + This file documents Dictionary, a client software for a RFC 2229 +dict server. + + Copyright (C) 1998, 2002 Torsten Hilbrich + + Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover texts being "A GNU Manual", +and with the Back-Cover Texts as in (a) below. A copy of the license +is included in the section entitled "GNU Free Documentation License" in +the Emacs manual. + + (a) The FSF's Back-Cover Text is: "You have freedom to copy and +modify this GNU Manual, like GNU software. Copies published by the +Free Software Foundation raise funds for GNU development." + + This document is part of a collection distributed under the GNU Free +Documentation License. If you want to distribute this document +separately from the collection, you can do so by adding a copy of the +license to the document, as described in section 6 of the license. + + +File: dictionary.info, Node: Top, Next: Installation, Prev: (dir), Up: (dir) + +Dictionary +********** + + Dictionary is a Emacs(1) package for accessing a dictionary server +providing word definitions. + + The Request for Comments 2229 `http://www.dict.org/rfc2229.txt' +defines a protocol for communication between a dictionary client and a +dictionary server. The dictionary server keeps several databases +(containing dictionary definitions) and provides an interface for the +client to list the definition for a word and to search for words +matching to pattern. + + This software implements the client side of that protocol. It allows +you to use a dictionary server (for example provided by the site +`www.dict.org') from within Emacs. + + Please note that the dictionary protocol uses the port 2628 which is +likely to be blocked by firewalls. It is possible to connect to the +dictionary server through a HTTP proxy similiar to the way HTTPS +connections on port 443 are relayed, *Note HTTP Proxy::. + +* Menu: + +* Installation:: Installation of the package +* Usage:: User manual +* Variables:: Customizing dictionary's behaviour +* User callable Functions:: +* Index:: Variable, functions, and concept index. + + ---------- Footnotes ---------- + + (1) In the following manual Emacs is a name for both GNU Emacs and +XEmacs. If I need to differ between both Emacs variants I will use +these names instead + + +File: dictionary.info, Node: Installation, Next: Usage, Prev: Top, Up: Top + +Installation +************ + + The dictionary client is distributes as `tar.gz' file. You can +found the latest version at +`http://www.myrkr.in-berlin.de/dictionary/dictionary-1.7.2.tar.gz'. +Please download this file now before continue reading. + +Unpacking +========= + + To unpack the archive use the following command: + gzip -dc dictionary-1.7.2.tar.gz | tar -xf - + + If you have a `GNU tar' installed, you can also the following +command: + tar -xzf dictionary-1.7.2.tar.gz + + A directory named `dictionary-1.7.2' will have been created by these +commands. + +Installing the files +==================== + + There are several ways of installing this package. If you are a +Debian user you can create a Debian Package for installation using the +`dpkg' command. XEmacs users can create a XEmacs package which can be +easily installed too. Other users have to compile the package using +the supplied `Makefile' and manually install the files. All these +installation methods are described in the following sections. + +Debian +------ + + If you are using a current Debian distribution (one that support the +emacsen package system) and have the `dpkg-dev' package installed (for +running `dpkg-buildpackage') you can use the supplied debian support: + + make debian + + This will create a package named `dictionary-1.7.2-1_all.deb' or +similiar in the parent directory of `dictionary-1.7.2'. You can now +install this package as root, it will automatically byte-compile itself +for all installed emacs versions and provide a startup-file which +autoloads this package. In the configuration example given below you +can omit the autoload lines. + + If you no longer want to use this package, you can remove it using: + + dpkg -r dictionary + +XEmacs 21 +--------- + + XEmacs starting with version 21 has support for so called _xemacs +packages_. These packages are also supported, you can create them +using: + make EMACS=xemacs package + + The created package will be named `dictionary-1.7-pkg.tar.gz' and +stored within the current directory. If you don't want to install this +package manually, you can use the following command, provided you have +sufficient privileges (if unsure, login as super user): + + make EMACS=xemacs package-install + + If you have more than one XEmacs versions installed make sure the +`EMACS' argument to make points to the correct binary. + + Please note, dictionary is now part of the official XEmacs package +distribution. This means you can install this package using the +integrated package management. + +Manual Installation +------------------- + + The first step in the manual installation is the byte compilation of +the lisp file for quicker loading and execution. Using the supplied +`Makefile' this is quite easy, just invoke: + + make + + in the `dictionary-1.7.2' sub directory. This will use emacs as the +name of the Emacs executable. If you want to use a different location +or a different program (for example, XEmacs) for byte compilation, use +the `EMACS' argument to the `Makefile' like in the following example +for XEmacs: + + make EMACS=xemacs + + If your custom package is not up-to-date expect some warnings about +free variables. + + The next step is the installation of the files. At the moment there +is no support for this step, you have to copy the compiled lisp files +(named `*.elc') to a directory within your LOAD-PATH by yourself. +Usually the directories `/usr/lib/emacs/site-lisp' or +`/usr/local/lib/emacs/site-lisp' are suitable locations for this. +XEmacs users please use the according `xemacs/site-lisp' directory. + + The final step is to inform your Emacs of the newly installed +package. I added a `dictionary-init.el' file to the distribution which +contains some `autoload' instructions to let Emacs know of the new +functions. You can now insert the contents of this file in your +`.emacs' or `.xemacs' file or install `dictionary-init.el' into the +`site-lisp' directory and load it using: + + (load "dictionary-init") + +Key Bindings +============ + + You probably want to define some key combinations to invoke the +`dictionary-search' or `dictionary-match' functions. + + The following example shows the key bindings I'm using myself for +this package. These are not supplied by this package because the `C-c' +prefix key together with a letter suffix are reserved for the user +itself. To activate these bindings insert them into your `.emacs' or +`.xemacs' file: + + ;; key bindings for the dictionary package + (global-set-key "\C-cs" 'dictionary-search) + (global-set-key "\C-cm" 'dictionary-match-words) + + +File: dictionary.info, Node: Usage, Next: Variables, Prev: Installation, Up: Top + +Usage +***** + + The default setup of dictionary connects to `dict://dict.org', so +the package should work without modification if you are connected to +the Internet. Otherwise you should configure the package first, *Note +Variables::. + + +File: dictionary.info, Node: Variables, Next: User callable Functions, Prev: Usage, Up: Top + +Variables +********* + +* Menu: + +* HTTP Proxy:: Configuration for HTTP proxy support + + +File: dictionary.info, Node: HTTP Proxy, Prev: Variables, Up: Variables + +HTTP Proxy +========== + + +File: dictionary.info, Node: User callable Functions, Next: Index, Prev: Variables, Up: Top + +User callable Functions +*********************** + + +File: dictionary.info, Node: Index, Prev: User callable Functions, Up: Top + +Index +***** + +* Menu: + + +Tag Table: +Node: Top1265 +Ref: Top-Footnote-12587 +Node: Installation2746 +Node: Usage7409 +Node: Variables7733 +Node: HTTP Proxy7932 +Node: User callable Functions8033 +Node: Index8181 + +End Tag Table diff --git a/doc/dictionary.texi b/doc/dictionary.texi new file mode 100644 index 0000000..62cafc5 --- /dev/null +++ b/doc/dictionary.texi @@ -0,0 +1,351 @@ +\input texinfo @c -*- texinfo -*- + +@setfilename dictionary +@settitle Dictionary Client Manual +@synindex fn cp +@synindex vr cp +@synindex pg cp +@dircategory Emacs +@direntry +* Dictionary: (dictioanry). Dictionary client for using a RFC 2229 dict server. +@end direntry +@iftex +@finalout +@end iftex +@setchapternewpage odd + +@ifnottex + +This file documents Dictionary, a client software for a RFC 2229 dict server. + +Copyright (C) 1998, 2002 Torsten Hilbrich + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover texts being ``A GNU Manual'', +and with the Back-Cover Texts as in (a) below. A copy of the license +is included in the section entitled ``GNU Free Documentation License'' +in the Emacs manual. + +(a) The FSF's Back-Cover Text is: ``You have freedom to copy and +modify this GNU Manual, like GNU software. Copies published by the +Free Software Foundation raise funds for GNU development.'' + +This document is part of a collection distributed under the GNU Free +Documentation License. If you want to distribute this document +separately from the collection, you can do so by adding a copy of the +license to the document, as described in section 6 of the license. +@end ifnottex + +@tex +@titlepage +@title Dictionary Client Manual + +@author by Torsten Hilbrich +@page + +@vskip 0pt plus 1filll +Copyright @copyright{} 1998, 2002 + Torsten Hilbrich + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with the +Invariant Sections being none, with the Front-Cover texts being ``A GNU +Manual'', and with the Back-Cover Texts as in (a) below. A copy of the +license is included in the section entitled ``GNU Free Documentation +License'' in the Emacs manual. + +(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify +this GNU Manual, like GNU software. Copies published by the Free +Software Foundation raise funds for GNU development.'' + +This document is part of a collection distributed under the GNU Free +Documentation License. If you want to distribute this document +separately from the collection, you can do so by adding a copy of the +license to the document, as described in section 6 of the license. +@end titlepage +@page + +@end tex + +@node Top, Installation, (dir), (dir) +@top Dictionary + +Dictionary is a Emacs@footnote{In the following manual Emacs is a name +for both GNU Emacs and XEmacs. If I need to differ between both Emacs +variants I will use these names instead} package for accessing a +dictionary server providing word definitions. + +The Request for Comments 2229 @uref{http://www.dict.org/rfc2229.txt} +defines a protocol for communication between a dictionary client and a +dictionary server. The dictionary server keeps several databases +(containing dictionary definitions) and provides an interface for the +client to list the definition for a word and to search for words +matching to pattern. + +This software implements the client side of that protocol. It allows +you to use a dictionary server (for example provided by the site +@uref{www.dict.org}) from within Emacs. + +Please note that the dictionary protocol uses the port 2628 which is +likely to be blocked by firewalls. It is possible to connect to the +dictionary server through a HTTP proxy similiar to the way HTTPS +connections on port 443 are relayed, @xref{HTTP Proxy}. + +@menu +* Installation:: Installation of the package +* Usage:: User manual +* Variables:: Customizing dictionary's behaviour +* User callable Functions:: +* Index:: Variable, functions, and concept index. +@end menu + +@node Installation, Usage, Top, Top +@chapter Installation + +The dictionary client is distributes as @file{tar.gz} file. You can +found the latest version at +@uref{http://www.myrkr.in-berlin.de/dictionary/dictionary-1.7.3.tar.gz}. +Please download this file now before continue reading. + +@section Unpacking +To unpack the archive use the following command: +@example +gzip -dc dictionary-1.7.3.tar.gz | tar -xf - +@end example + +If you have a @command{GNU tar} installed, you can also the following +command: +@example +tar -xzf dictionary-1.7.3.tar.gz +@end example + +A directory named @file{dictionary-1.7.3} will have been created by +these commands. + +@section Installing the files + +There are several ways of installing this package. If you are a +Debian user you can create a Debian Package for installation using the +@command{dpkg} command. XEmacs users can create a XEmacs package +which can be easily installed too. Other users have to compile the +package using the supplied @file{Makefile} and manually install the +files. All these installation methods are described in the following +sections. + +@subsection Debian + +If you are using a current Debian distribution (one that support the +emacsen package system) and have the @file{dpkg-dev} package installed +(for running @command{dpkg-buildpackage}) you can use the supplied +debian support: + +@example +make debian +@end example + +This will create a package named @file{dictionary-1.7.3-1_all.deb} or +similiar in the parent directory of @file{dictionary-1.7.3}. You can +now install this package as root, it will automatically byte-compile +itself for all installed emacs versions and provide a startup-file +which autoloads this package. In the configuration example given below +you can omit the autoload lines. + +If you no longer want to use this package, you can remove it using: + +@example +dpkg -r dictionary +@end example + +@subsection XEmacs 21 + +XEmacs starting with version 21 has support for so called @emph{xemacs +packages}. These packages are also supported, you can create them +using: +@example +make EMACS=xemacs package +@end example + +The created package will be named @file{dictionary-1.7-pkg.tar.gz} and +stored within the current directory. If you don't want to install +this package manually, you can use the following command, provided you +have sufficient privileges (if unsure, login as super user): + +@example +make EMACS=xemacs package-install +@end example + +If you have more than one XEmacs versions installed make sure the +@code{EMACS} argument to make points to the correct binary. + +Please note, dictionary is now part of the official XEmacs package +distribution. This means you can install this package using the +integrated package management. + +@subsection Manual Installation + +The first step in the manual installation is the byte compilation of +the lisp file for quicker loading and execution. Using the supplied +@file{Makefile} this is quite easy, just invoke: + +@example +make +@end example + +in the @file{dictionary-1.7.3} sub directory. This will use emacs as +the name of the Emacs executable. If you want to use a different +location or a different program (for example, XEmacs) for byte +compilation, use the @code{EMACS} argument to the @file{Makefile} like +in the following example for XEmacs: + +@example +make EMACS=xemacs +@end example + +If your custom package is not up-to-date expect some warnings about +free variables. + +The next step is the installation of the files. At the moment there +is no support for this step, you have to copy the compiled lisp files +(named @file{*.elc}) to a directory within your @var{load-path} by +yourself. Usually the directories @file{/usr/lib/emacs/site-lisp} or +@file{/usr/local/lib/emacs/site-lisp} are suitable locations for this. +XEmacs users please use the according @file{xemacs/site-lisp} +directory. + +The final step is to inform your Emacs of the newly installed package. +I added a @file{dictionary-init.el} file to the distribution which +contains some @code{autoload} instructions to let Emacs know of the +new functions. You can now insert the contents of this file in your +@file{.emacs} or @file{.xemacs} file or install +@file{dictionary-init.el} into the @file{site-lisp} directory and load +it using: + +@lisp +(load "dictionary-init") +@end lisp + +@section Key Bindings + +You probably want to define some key combinations to invoke the +@code{dictionary-search} or @code{dictionary-match} functions. + +The following example shows the key bindings I'm using myself for this +package. These are not supplied by this package because the +@code{C-c} prefix key together with a letter suffix are reserved for +the user itself. To activate these bindings insert them into your +@file{.emacs} or @file{.xemacs} file: + +@lisp +;; key bindings for the dictionary package +(global-set-key "\C-cs" 'dictionary-search) +(global-set-key "\C-cm" 'dictionary-match-words) +@end lisp + +@node Usage, Variables, Installation, Top +@chapter Usage + +The default setup of dictionary connects to @uref{dict://dict.org}, so +the package should work without modification if you are connected to +the Internet. Otherwise you should configure the package first, +@xref{Variables}. + +@menu +* Invoking:: Starting the package +* Quitting:: End your work +* Using:: +@end menu + +@node Invoking, Quitting, Usage, Usage +@section Invoking + +There are six different ways of invoking the package. + +By calling @code{dictionary} you can start a new (empty) dictionary +buffer waiting for your commands. If you want to create multiple +buffers for searching, you can run this function multiply times. + +The function @code{dictionary-search} asks you for a word to search +defaulting to the word at point. It allows you to modify the default +word before starting the search. + +If you want to lookup the word at point without further confirmation, +you can use the @code{dictionary-lookup-definition} function. + +A quite different function is @code{dictionary-match-words}. It will +not search for a single word definition but will present you a list of +all matching words. You can now choose the word's definition you are +interested in. + +A convience function to list matching words is +@code{dictionary-mouse-popup-matching-words}. It must be bound to a +mouse button event and will present you a popup menu of all matching +words to the word where you clicked with the mouse. This functions +works in GNU Emacs 21 and XEmacs 21. + +The last method is the tool-tip support. If activated it will search +all words where your mouse cursor is pointed. It will show the words +definition as tool-tip (a little yellow window). This function is +currently supported in GNU Emacs 21 only. + +@node Quitting, Using, Invoking, Usage +@section Quitting + +Once a dictionary buffer is created you can close it by simply typing +@key{q} (@code{dictionary-close}) or pressing the @strong{Quit} button +one the top. + +Another, also correctly implemented way, is the @code{kill-buffer} +function which can be invoked by @code{C-x k}. + +@node Using, , Quitting, Usage +@section Using + +After a successful search the dictionary buffer is divided into two +sections. THe first one is the @dfn{button area} at the top, the +second one is the text buffer below displaying the result. By +pressing the buttons you can select some functions that are otherwise +inaccessible with the mouse. + +A button is pressed by using the middle mouse button (@key{Button-2} +or @key{Mouse-2} in Emacs speak). You can also use the @key{RET} key +on your keyboard when the point is located at a button. + +In the text area each definition is introduced by the name of the +database contanining it. In the default configuration this text is in +italic face (@code{dictionary-word-entry-face}). The definition +itself can contains hyper-links that are marked with the +@code{dictionary-reference-face}. Depending on the background and the +facilities of your Emacs and terminal it can be shown in yellow, cyan, +and blue color. In the X11 window system it is displayed in blue. + +These links can be selected using either the mouse button +(@key{Button-2} or @key{Mouse-2}) or the @key{RET} key on your +keyboard. The buffer will be updated with the selected definition. +You can use the @key{l} (@code{dictionary-previous}) or the +@strong{Back} button at the top to return to the previous entry. + + +@node Variables, User callable Functions, Usage, Top +@chapter Variables + +@menu +* HTTP Proxy:: Configuration for HTTP proxy support +@end menu + +@node HTTP Proxy, , Variables, Variables +@section HTTP Proxy + +@node User callable Functions, Index, Variables, Top +@chapter User callable Functions + +@node Index, , User callable Functions, Top +@chapter Index +@printindex cp + +@summarycontents +@contents +@bye + diff --git a/doc/dictionary/HTTP-Proxy.html b/doc/dictionary/HTTP-Proxy.html new file mode 100644 index 0000000..d6f0dd9 --- /dev/null +++ b/doc/dictionary/HTTP-Proxy.html @@ -0,0 +1,14 @@ +HTTP Proxy + + + +

+Node:HTTP Proxy, +Previous:Variables, +Up:Variables +



+ +

HTTP Proxy

+ + + diff --git a/doc/dictionary/Index.html b/doc/dictionary/Index.html new file mode 100644 index 0000000..8f1df45 --- /dev/null +++ b/doc/dictionary/Index.html @@ -0,0 +1,34 @@ +Index + + + +

+Node:Index, +Previous:User callable Functions, +Up:Top +



+ +

Index

+ +
    +
+ + +

Table of Contents

+ + + + diff --git a/doc/dictionary/Installation.html b/doc/dictionary/Installation.html new file mode 100644 index 0000000..3d1e197 --- /dev/null +++ b/doc/dictionary/Installation.html @@ -0,0 +1,146 @@ +Installation + + + + +

+Node:Installation, +Next:, +Previous:Top, +Up:Top +



+ +

Installation

+ +

The dictionary client is distributes as tar.gz file. You can +found the latest version at +http://www.myrkr.in-berlin.de/dictionary/dictionary-1.7.2.tar.gz. +Please download this file now before continue reading. + +

Unpacking

+ +

To unpack the archive use the following command: +

gzip -dc dictionary-1.7.2.tar.gz | tar -xf -
+
+ +

If you have a GNU tar installed, you can also the following +command: +

tar -xzf dictionary-1.7.2.tar.gz
+
+ +

A directory named dictionary-1.7.2 will have been created by +these commands. + +

Installing the files

+ +

There are several ways of installing this package. If you are a +Debian user you can create a Debian Package for installation using the +dpkg command. XEmacs users can create a XEmacs package +which can be easily installed too. Other users have to compile the +package using the supplied Makefile and manually install the +files. All these installation methods are described in the following +sections. + +

Debian

+ +

If you are using a current Debian distribution (one that support the +emacsen package system) and have the dpkg-dev package installed +(for running dpkg-buildpackage) you can use the supplied +debian support: + +

make debian
+
+ +

This will create a package named dictionary-1.7.2-1_all.deb or +similiar in the parent directory of dictionary-1.7.2. You can +now install this package as root, it will automatically byte-compile +itself for all installed emacs versions and provide a startup-file +which autoloads this package. In the configuration example given below +you can omit the autoload lines. + +

If you no longer want to use this package, you can remove it using: + +

dpkg -r dictionary
+
+ +

XEmacs 21

+ +

XEmacs starting with version 21 has support for so called xemacs +packages. These packages are also supported, you can create them +using: +

make EMACS=xemacs package
+
+ +

The created package will be named dictionary-1.7-pkg.tar.gz and +stored within the current directory. If you don't want to install +this package manually, you can use the following command, provided you +have sufficient privileges (if unsure, login as super user): + +

make EMACS=xemacs package-install
+
+ +

If you have more than one XEmacs versions installed make sure the +EMACS argument to make points to the correct binary. + +

Please note, dictionary is now part of the official XEmacs package +distribution. This means you can install this package using the +integrated package management. + +

Manual Installation

+ +

The first step in the manual installation is the byte compilation of +the lisp file for quicker loading and execution. Using the supplied +Makefile this is quite easy, just invoke: + +

make
+
+ +

in the dictionary-1.7.2 sub directory. This will use emacs as +the name of the Emacs executable. If you want to use a different +location or a different program (for example, XEmacs) for byte +compilation, use the EMACS argument to the Makefile like +in the following example for XEmacs: + +

make EMACS=xemacs
+
+ +

If your custom package is not up-to-date expect some warnings about +free variables. + +

The next step is the installation of the files. At the moment there +is no support for this step, you have to copy the compiled lisp files +(named *.elc) to a directory within your load-path by +yourself. Usually the directories /usr/lib/emacs/site-lisp or +/usr/local/lib/emacs/site-lisp are suitable locations for this. +XEmacs users please use the according xemacs/site-lisp +directory. + +

The final step is to inform your Emacs of the newly installed package. +I added a dictionary-init.el file to the distribution which +contains some autoload instructions to let Emacs know of the +new functions. You can now insert the contents of this file in your +.emacs or .xemacs file or install +dictionary-init.el into the site-lisp directory and load +it using: + +

(load "dictionary-init")
+
+ +

Key Bindings

+ +

You probably want to define some key combinations to invoke the +dictionary-search or dictionary-match functions. + +

The following example shows the key bindings I'm using myself for this +package. These are not supplied by this package because the +C-c prefix key together with a letter suffix are reserved for +the user itself. To activate these bindings insert them into your +.emacs or .xemacs file: + +

;; key bindings for the dictionary package
+(global-set-key "\C-cs" 'dictionary-search)
+(global-set-key "\C-cm" 'dictionary-match-words)
+
+ + + diff --git a/doc/dictionary/Usage.html b/doc/dictionary/Usage.html new file mode 100644 index 0000000..8093821 --- /dev/null +++ b/doc/dictionary/Usage.html @@ -0,0 +1,21 @@ +Usage + + + + +

+Node:Usage, +Next:, +Previous:Installation, +Up:Top +



+ +

Usage

+ +

The default setup of dictionary connects to dict://dict.org, so +the package should work without modification if you are connected to +the Internet. Otherwise you should configure the package first, +See Variables. + + + diff --git a/doc/dictionary/User-callable-Functions.html b/doc/dictionary/User-callable-Functions.html new file mode 100644 index 0000000..626e889 --- /dev/null +++ b/doc/dictionary/User-callable-Functions.html @@ -0,0 +1,16 @@ +User callable Functions + + + + +

+Node:User callable Functions, +Next:, +Previous:Variables, +Up:Top +



+ +

User callable Functions

+ + + diff --git a/doc/dictionary/Variables.html b/doc/dictionary/Variables.html new file mode 100644 index 0000000..9358af5 --- /dev/null +++ b/doc/dictionary/Variables.html @@ -0,0 +1,20 @@ +Variables + + + + +

+Node:Variables, +Next:, +Previous:Usage, +Up:Top +



+ +

Variables

+ +
    +
  • HTTP Proxy: Configuration for HTTP proxy support +
+ + + diff --git a/doc/dictionary/index.html b/doc/dictionary/index.html new file mode 100644 index 0000000..72e7574 --- /dev/null +++ b/doc/dictionary/index.html @@ -0,0 +1,81 @@ + + +Dictionary Client Manual + + + + + + + +This file documents Dictionary, a client software for a RFC 2229 dict server. + +

Copyright (C) 1998, 2002 Torsten Hilbrich + +

Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover texts being "A GNU Manual", +and with the Back-Cover Texts as in (a) below. A copy of the license +is included in the section entitled "GNU Free Documentation License" +in the Emacs manual. + +

(a) The FSF's Back-Cover Text is: "You have freedom to copy and +modify this GNU Manual, like GNU software. Copies published by the +Free Software Foundation raise funds for GNU development." + +

This document is part of a collection distributed under the GNU Free +Documentation License. If you want to distribute this document +separately from the collection, you can do so by adding a copy of the +license to the document, as described in section 6 of the license. + +Top + + +

+Node:Top, +Next: +



+ +

Next: + +

Dictionary

+ +

Dictionary is a Emacs1 package for accessing a +dictionary server providing word definitions. + +

The Request for Comments 2229 http://www.dict.org/rfc2229.txt +defines a protocol for communication between a dictionary client and a +dictionary server. The dictionary server keeps several databases +(containing dictionary definitions) and provides an interface for the +client to list the definition for a word and to search for words +matching to pattern. + +

This software implements the client side of that protocol. It allows +you to use a dictionary server (for example provided by the site +www.dict.org) from within Emacs. + +

Please note that the dictionary protocol uses the port 2628 which is +likely to be blocked by firewalls. It is possible to connect to the +dictionary server through a HTTP proxy similiar to the way HTTPS +connections on port 443 are relayed, See HTTP Proxy. + +

+ +

Footnotes

+
    +
  1. +

    In the following manual Emacs is a name +for both GNU Emacs and XEmacs. If I need to differ between both Emacs +variants I will use these names instead

    + +

+ + + diff --git a/install-package.el b/install-package.el deleted file mode 100644 index 5b0474e..0000000 --- a/install-package.el +++ /dev/null @@ -1,7 +0,0 @@ -(defun install-package () - (interactive) - (let ((filename (apply 'concat command-line-args-left))) - (message (concat "Installing package " filename)) - (package-admin-add-binary-package filename) - (set-buffer "*Package Output*") - (message (buffer-substring (point-min) (point-max))))) diff --git a/package-info.in b/package-info.in new file mode 100644 index 0000000..a16dfcc --- /dev/null +++ b/package-info.in @@ -0,0 +1,19 @@ +(dictionary + (standards-version 1.1 + version VERSION + author-version AUTHOR_VERSION + date DATE + build-date BUILD_DATE + maintainer MAINTAINER + distribution xemacs + priority low + category CATEGORY + dump nil + description "Interface to RFC2229 dictionary servers." + filename FILENAME + md5sum MD5SUM + size SIZE + provides (dictionary connection link) + requires (REQUIRES) + type regular +)) -- cgit v1.2.3