[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

leo-dict.el --- emacs interface for

From: Stefan Reichör
Subject: leo-dict.el --- emacs interface for
Date: Fri, 12 Aug 2005 22:45:27 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

;;; leo-dict.el --- emacs interface for

;; Copyright (C) 2005 by Stefan Reichoer

;; Author: Stefan Reichoer, <address@hidden>

;; leo-dict.el is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; leo-dict.el is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.

;;; Commentary:

;; leo-dict.el provides an emacs interface for the german<->english
;; dictionary on

;; The latest revision of leo-dict.el can be found at:

;; leo-dict.el needs my python script 'leo' to interact with the web interface
;; leo can be found here:

;;; History:

;;; Code:

(defvar leo-use-pymacs nil)
(defvar leo-program-name "leo") ;; On windows: python c:/utils/python/
(defvar leo-temp-file-name "~/tmp/leo-result")

(defun leo-run-query (word)
  "Query for a word.
This calls my python script leo (it can be found at:"
  (interactive "sLookup word at ")
  (pop-to-buffer "*LEO dictionary*")
  (goto-char (point-max))
  (insert "------------------------------------------------------------------")
  (insert (concat "Lookup " word ":"))
  (if leo-use-pymacs
      (insert (leo-py-search word))
    (shell-command-to-string (concat leo-program-name " " word " > " 
    (insert-file leo-temp-file-name)
    (delete-file leo-temp-file-name))

(defun leo-run-query-with-word-at-point ()
  (let ((word (thing-at-point 'word)))
    (message "Querying for %s" word)
    (xsteve-run-leo word)))

(provide 'leo-dict)

;;; leo-dict.el ends here

;;; arch-tag: daca3e4a-f131-45d2-9946-1f9c6a88fa97

reply via email to

[Prev in Thread] Current Thread [Next in Thread]