diff options
author | Torsten Hilbrich <torsten.hilbrich@gmx.net> | 2002-03-18 19:49:00 +0100 |
---|---|---|
committer | Torsten Hilbrich <torsten@hilbrich.net> | 2011-08-27 20:47:38 +0200 |
commit | d5ba212946944ccbe9297c04b413ad484a8a410a (patch) | |
tree | 2bc62b5d7217d5265ce61bc6e14b0d01058a730c | |
parent | 0b2e0eeda8f3eacc1b38a674001b5d9c00a6309c (diff) |
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
-rw-r--r-- | ChangeLog | 39 | ||||
-rw-r--r-- | Makefile | 21 | ||||
-rw-r--r-- | README | 18 | ||||
-rw-r--r-- | debian/changelog | 15 | ||||
-rw-r--r-- | debian/control | 6 | ||||
-rw-r--r-- | debian/files | 1 | ||||
-rw-r--r-- | dictionary.el | 15 | ||||
-rw-r--r-- | doc/dictionary.info | 250 | ||||
-rw-r--r-- | doc/dictionary.texi | 351 | ||||
-rw-r--r-- | doc/dictionary/HTTP-Proxy.html | 14 | ||||
-rw-r--r-- | doc/dictionary/Index.html | 34 | ||||
-rw-r--r-- | doc/dictionary/Installation.html | 146 | ||||
-rw-r--r-- | doc/dictionary/Usage.html | 21 | ||||
-rw-r--r-- | doc/dictionary/User-callable-Functions.html | 16 | ||||
-rw-r--r-- | doc/dictionary/Variables.html | 20 | ||||
-rw-r--r-- | doc/dictionary/index.html | 81 | ||||
-rw-r--r-- | install-package.el | 7 | ||||
-rw-r--r-- | package-info.in | 19 |
18 files changed, 1052 insertions, 22 deletions
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@myrkr.in-berlin.de> + + * 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@myrkr.in-berlin.de> + + * 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 <dictionary@myrkr.in-berlin.de> + + * link.el (link-initialize-keymap): fixed keybinding bug (reported + by David A. Panariti) + +2001-12-15 Torsten Hilbrich <dictionary@myrkr.in-berlin.de> + + * Fixed bug for non-mule Emacsen (dictionary-coding-system + was incorrectly written) + +2001-12-09 Torsten Hilbrich <dictionary@myrkr.in-berlin.de> + + * Added HTTP-proxy support (using the HTTP CONNECT) + * Added support for dictionaries with encodings other + than utf-8 + +2001-09-08 Steve Youngs <youngs@xemacs.org> + + * Initial XEmacs Package version. + @@ -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 @@ -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 <dictionary@myrkr.in-berlin.de> 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 <Torsten.Hilbrich@gmx.net> +Maintainer: Torsten Hilbrich <dictionary@myrkr.in-berlin.de> 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 <dictionary@myrkr.in-berlin.de> ;; 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 @@ +<html><head><title>HTTP Proxy</title><link rel=previous href="Variables.html"> +<link rel=up href="Variables.html"> +</head> +<body> +<p> +Node:<a name="HTTP-Proxy.html">HTTP Proxy</a>, +Previous:<a rel=previous href="Variables.html">Variables</a>, +Up:<a rel=up href="Variables.html">Variables</a> +<hr><br> + +<h2>HTTP Proxy</h2> + +</body></html> + 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 @@ +<html><head><title>Index</title><link rel=previous href="User-callable-Functions.html"> +<link rel=up href="index.html"> +</head> +<body> +<p> +Node:<a name="Index.html">Index</a>, +Previous:<a rel=previous href="User-callable-Functions.html">User callable Functions</a>, +Up:<a rel=up href="index.html">Top</a> +<hr><br> + +<h1>Index</h1> + +<ul compact> +</ul> + + +<h1>Table of Contents</h1> +<ul> +<li><a href="Installation.html">Installation</a> +<ul> +<ul> +</ul> +</ul> +<li><a href="Usage.html">Usage</a> +<li><a href="Variables.html">Variables</a> +<ul> +<li><a href="HTTP-Proxy.html">HTTP Proxy</a> +</ul> +<li><a href="User-callable-Functions.html">User callable Functions</a> +<li><a href="Index.html">Index</a> +</ul> + +</body></html> + 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 @@ +<html><head><title>Installation</title><link rel=next href="Usage.html"> +<link rel=previous href="index.html"> +<link rel=up href="index.html"> +</head> +<body> +<p> +Node:<a name="Installation.html">Installation</a>, +Next:<a rel=next href="Usage.html">Usage</a>, +Previous:<a rel=previous href="index.html">Top</a>, +Up:<a rel=up href="index.html">Top</a> +<hr><br> + +<h1>Installation</h1> + +<p>The dictionary client is distributes as <code>tar.gz</code> file. You can +found the latest version at +<a href="http://www.myrkr.in-berlin.de/dictionary/dictionary-1.7.2.tar.gz">http://www.myrkr.in-berlin.de/dictionary/dictionary-1.7.2.tar.gz</a>. +Please download this file now before continue reading. + +<h2>Unpacking</h2> + +<p>To unpack the archive use the following command: +<pre>gzip -dc dictionary-1.7.2.tar.gz | tar -xf - +</pre> + +<p>If you have a <code>GNU tar</code> installed, you can also the following +command: +<pre>tar -xzf dictionary-1.7.2.tar.gz +</pre> + +<p>A directory named <code>dictionary-1.7.2</code> will have been created by +these commands. + +<h2>Installing the files</h2> + +<p>There are several ways of installing this package. If you are a +Debian user you can create a Debian Package for installation using the +<code>dpkg</code> command. XEmacs users can create a XEmacs package +which can be easily installed too. Other users have to compile the +package using the supplied <code>Makefile</code> and manually install the +files. All these installation methods are described in the following +sections. + +<h3>Debian</h3> + +<p>If you are using a current Debian distribution (one that support the +emacsen package system) and have the <code>dpkg-dev</code> package installed +(for running <code>dpkg-buildpackage</code>) you can use the supplied +debian support: + +<pre>make debian +</pre> + +<p>This will create a package named <code>dictionary-1.7.2-1_all.deb</code> or +similiar in the parent directory of <code>dictionary-1.7.2</code>. 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. + +<p>If you no longer want to use this package, you can remove it using: + +<pre>dpkg -r dictionary +</pre> + +<h3>XEmacs 21</h3> + +<p>XEmacs starting with version 21 has support for so called <em>xemacs +packages</em>. These packages are also supported, you can create them +using: +<pre>make EMACS=xemacs package +</pre> + +<p>The created package will be named <code>dictionary-1.7-pkg.tar.gz</code> 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): + +<pre>make EMACS=xemacs package-install +</pre> + +<p>If you have more than one XEmacs versions installed make sure the +<code>EMACS</code> argument to make points to the correct binary. + +<p>Please note, dictionary is now part of the official XEmacs package +distribution. This means you can install this package using the +integrated package management. + +<h3>Manual Installation</h3> + +<p>The first step in the manual installation is the byte compilation of +the lisp file for quicker loading and execution. Using the supplied +<code>Makefile</code> this is quite easy, just invoke: + +<pre>make +</pre> + +<p>in the <code>dictionary-1.7.2</code> 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</code> argument to the <code>Makefile</code> like +in the following example for XEmacs: + +<pre>make EMACS=xemacs +</pre> + +<p>If your custom package is not up-to-date expect some warnings about +free variables. + +<p>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 <code>*.elc</code>) to a directory within your <var>load-path</var> by +yourself. Usually the directories <code>/usr/lib/emacs/site-lisp</code> or +<code>/usr/local/lib/emacs/site-lisp</code> are suitable locations for this. +XEmacs users please use the according <code>xemacs/site-lisp</code> +directory. + +<p>The final step is to inform your Emacs of the newly installed package. +I added a <code>dictionary-init.el</code> file to the distribution which +contains some <code>autoload</code> instructions to let Emacs know of the +new functions. You can now insert the contents of this file in your +<code>.emacs</code> or <code>.xemacs</code> file or install +<code>dictionary-init.el</code> into the <code>site-lisp</code> directory and load +it using: + +<pre>(load "dictionary-init") +</pre> + +<h2>Key Bindings</h2> + +<p>You probably want to define some key combinations to invoke the +<code>dictionary-search</code> or <code>dictionary-match</code> functions. + +<p>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</code> prefix key together with a letter suffix are reserved for +the user itself. To activate these bindings insert them into your +<code>.emacs</code> or <code>.xemacs</code> file: + +<pre>;; key bindings for the dictionary package +(global-set-key "\C-cs" 'dictionary-search) +(global-set-key "\C-cm" 'dictionary-match-words) +</pre> + +</body></html> + 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 @@ +<html><head><title>Usage</title><link rel=next href="Variables.html"> +<link rel=previous href="Installation.html"> +<link rel=up href="index.html"> +</head> +<body> +<p> +Node:<a name="Usage.html">Usage</a>, +Next:<a rel=next href="Variables.html">Variables</a>, +Previous:<a rel=previous href="Installation.html">Installation</a>, +Up:<a rel=up href="index.html">Top</a> +<hr><br> + +<h1>Usage</h1> + +<p>The default setup of dictionary connects to <a href="dict://dict.org">dict://dict.org</a>, so +the package should work without modification if you are connected to +the Internet. Otherwise you should configure the package first, +See <a href="Variables.html">Variables</a>. + +</body></html> + 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 @@ +<html><head><title>User callable Functions</title><link rel=next href="Index.html"> +<link rel=previous href="Variables.html"> +<link rel=up href="index.html"> +</head> +<body> +<p> +Node:<a name="User-callable-Functions.html">User callable Functions</a>, +Next:<a rel=next href="Index.html">Index</a>, +Previous:<a rel=previous href="Variables.html">Variables</a>, +Up:<a rel=up href="index.html">Top</a> +<hr><br> + +<h1>User callable Functions</h1> + +</body></html> + 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 @@ +<html><head><title>Variables</title><link rel=next href="User-callable-Functions.html"> +<link rel=previous href="Usage.html"> +<link rel=up href="index.html"> +</head> +<body> +<p> +Node:<a name="Variables.html">Variables</a>, +Next:<a rel=next href="User-callable-Functions.html">User callable Functions</a>, +Previous:<a rel=previous href="Usage.html">Usage</a>, +Up:<a rel=up href="index.html">Top</a> +<hr><br> + +<h1>Variables</h1> + +<ul> +<li><a href="HTTP-Proxy.html">HTTP Proxy</a>: Configuration for HTTP proxy support +</ul> + +</body></html> + 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 @@ +<html lang="en"> +<head> +<title>Dictionary Client Manual</title> +<meta http-equiv="Content-Type" content="text/html"> +<meta name=description content="Dictionary Client Manual"> +<meta name=generator content="makeinfo 4.0b"> +<link href="http://texinfo.org/" rel=generator-home> +</head> + +<body> +This file documents Dictionary, a client software for a RFC 2229 dict server. + +<p>Copyright (C) 1998, 2002 Torsten Hilbrich + +<p>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. + +<p>(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." + +<p>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. + +<html><head><title>Top</title><link rel=next href="Installation.html"> +</head> +<body> +<p> +Node:<a name="index.html">Top</a>, +Next:<a rel=next href="Installation.html">Installation</a> +<hr><br> + +<p>Next:<a rel=next href="Installation.html">Installation</a> + +<h1>Dictionary</h1> + +<p>Dictionary is a Emacs<a rel=footnote href="#fn-1"><sup>1</sup></a> package for accessing a +dictionary server providing word definitions. + +<p>The Request for Comments 2229 <a href="http://www.dict.org/rfc2229.txt">http://www.dict.org/rfc2229.txt</a> +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. + +<p>This software implements the client side of that protocol. It allows +you to use a dictionary server (for example provided by the site +<a href="www.dict.org">www.dict.org</a>) from within Emacs. + +<p>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 <a href="HTTP-Proxy.html">HTTP Proxy</a>. + +<ul> +<li><a href="Installation.html">Installation</a>: Installation of the package +<li><a href="Usage.html">Usage</a>: User manual +<li><a href="Variables.html">Variables</a>: Customizing dictionary's behaviour +<li><a href="User-callable-Functions.html">User callable Functions</a>: +<li><a href="Index.html">Index</a>: Variable, functions, and concept index. +</ul> + +<hr><h4>Footnotes</h4> +<ol type="1"> +<li><a name="fn-1"></a> +<p>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</p> + +</ol><hr> + +</body></html> + 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 +)) |