Ticket #319 (closed 不具合: fixed)

Opened 2 years ago

Last modified 1 year ago

SDICについて

Reported by: anonymous Assigned to: shirai
Priority: minor Milestone:
Component: Emacs Lisp Version: 3.00 (開発中)
Keywords: Cc:

Description

Meadow3.0ではSDICが使用できません. なにか特別な設定が必要でしょうか.

Attachments

Change History

2006年07月27日 11時29分45秒 changed by shirai

  • owner set to shirai.
  • priority changed from major to minor.
  • version changed from 2.10 to 3.00 (開発中).
  • status changed from new to assigned.

Meadow1 から Meadow3 まで特に設定を変更しなくても、ぼくの手元の SDIC は問題なく動作しています。

(1) なにがどう動作しないのか
(2) 辞書のフォーマットと検索方法
(3) 自分で設定している内容

がわからないと何ともいえません。ちなみにぼくは SDIC フォーマットの辞書(何種類もある)を array で検索しています。

2006年08月06日 15時24分25秒 changed by anonymous

input wordで単語を入力した後、 grepで辞書内を検索している時に 応答がなくなります.

ただ、同時にcygwinのshellが暴走しているので そちら側の問題かと思っています.

ご回答有り難う御座いました

2006年11月15日 13時54分08秒 changed by kose

  • status changed from assigned to closed.
  • resolution set to fixed.

Meadow側の問題だとわかったら再オープンしてください。

2006年12月22日 17時56分28秒 changed by naoki

  • status changed from closed to reopened.
  • resolution deleted.

Meadow3用setup.exeを使ってMeadow2.10を上書きした所
sdicが使えなくなりました.

症状も同じで,応答がなくなります(c-gで復帰).

sdicをインストールしなおしても駄目でした

(follow-up: ↓ 6 ) 2006年12月28日 13時21分28秒 changed by shirai

手元では再現しないので

(1) 辞書のフォーマットと検索方法
     SDIC形式 or COMPAT形式?
     array or egrep or fgrep or look or elisp?
(2) 自分で設定している内容

を見せてください。また、C-g で抜けるなら、

(1) sdic の *.elc を全部消して Meadow 再立ち上げ
(2) M-x toggle-debug-on-quit
(3) SDIC を動かして、固まったら C-g
(4) backtrace の中身をコピペ

もよろしくお願いします。

(in reply to: ↑ 5 ) 2006年12月28日 18時40分54秒 changed by naoki

(1) 辞書のフォーマットと検索方法

SDIC形式です 検索方法は分かりません.

(2) 自分で設定している内容

sample.emacsのままです

(setq load-path (cons "d:/Tools/Meadow/lisp" load-path))
(autoload 'sdic-describe-word "sdic" "英単語の意味を調べる" t nil)
(global-set-key "\C-cw" 'sdic-describe-word)
(autoload 'sdic-describe-word-at-point "sdic" "カーソルの位置の英単語の意味を調べる" t nil)
(global-set-key "\C-cW" 'sdic-describe-word-at-point)

backtrace の中身をコピペ

Debugger entered--Lisp error: (quit)
  call-process("d:/cygwin/bin/fgrep" nil t nil "-e" "<K>buf" "d:/Tools/Dict/gene.sdic")
  apply(call-process "d:/cygwin/bin/fgrep" nil t nil ("-e" "<K>buf" "d:/Tools/Dict/gene.sdic"))
  (let ((default-directory sdicf-default-directory) (coding-system-for-read coding-system) (coding-system-for-write coding-system) (process-input-coding-system coding-system) (process-output-coding-system coding-system) (file-name-coding-system coding-system) (default-process-coding-system ...)) (apply (quote call-process) program infile buffer display args))
  sdicf-call-process("d:/cygwin/bin/fgrep" euc-japan-unix nil t nil "-e" "<K>buf" "d:/Tools/Dict/gene.sdic")
  apply(sdicf-call-process "d:/cygwin/bin/fgrep" euc-japan-unix nil t nil ("-e" "<K>buf" "d:/Tools/Dict/gene.sdic"))
  (save-excursion (set-buffer (sdicf-get-buffer sdic)) (delete-region (point-min) (point-max)) (apply (quote sdicf-call-process) (if regexp sdicf-egrep-command sdicf-fgrep-command) (sdicf-get-coding-system sdic) nil t nil (if regexp ... ...)) (goto-char (point-min)) (let (entries) (while ... ...) (nreverse entries)))
  sdicf-grep-search([SDIC "d:/Tools/Dict/gene.sdic" euc-japan-unix grep #<buffer  *sdic d:/Tools/Dict/gene.sdic*>] "<K>buf" nil nil)
  funcall(sdicf-grep-search [SDIC "d:/Tools/Dict/gene.sdic" euc-japan-unix grep #<buffer  *sdic d:/Tools/Dict/gene.sdic*>] "<K>buf" nil nil)
  (let ((case-fold-search ...)) (funcall (nth 4 ...) sdic (cond ... ... ... ... ... ...) (and ... case-fold-search) (eq method ...)))
  sdicf-search([SDIC "d:/Tools/Dict/gene.sdic" euc-japan-unix grep #<buffer  *sdic d:/Tools/Dict/gene.sdic*>] prefix "buf")
  (mapcar (if (get dic ...) (lambda ... ... ...) (lambda ... ...)) (sdicf-search (get dic ...) (cond ... ... ... ... ...) string))
  (let ((case-fold-search t) list) (mapcar (if ... ... ...) (sdicf-search ... ... string)))
  sdicf-client-search-entry(sdic-dictionary "buf" nil)
  funcall(sdicf-client-search-entry sdic-dictionary "buf" nil)
  (mapcar (lambda (c) (list ... dic ...)) (funcall (get ... ...) dic word search-type))
  sdic-search-entry(sdic-dictionary "buf" nil)
  (lambda (dic) (sdic-search-entry dic word search-type))(sdic-dictionary)
  mapcar((lambda (dic) (sdic-search-entry dic word search-type)) (sdic-dictionary))
  (apply (quote append) (mapcar (lambda ... ...) dic-list))
  (sdic-sort-dictionary-order (apply (quote append) (mapcar ... dic-list)))
  sdic-search-multi-dictionaries((sdic-dictionary) "buf")
  (or (and (= ... 1) (string= pat ...) (< ... 4) (append ... ...)) (sdic-search-multi-dictionaries sdic-eiwa-symbol-list pat))
  (mapcar (lambda (entry) (setq str ...) (and ... ... ...) entry) (or (and ... ... ... ...) (sdic-search-multi-dictionaries sdic-eiwa-symbol-list pat)))
  (prog1 (mapcar (lambda ... ... ... entry) (or ... ...)) (if orig (setq stem-list ... orig ... pat ...) (setq orig pat pat ...) (message "Can't find original form of \"%s\"" ...)))
  (mapcar (lambda (entry) (if ... entry)) (prog1 (mapcar ... ...) (if orig ... ... ...)))
  (delq nil (mapcar (lambda ... ...) (prog1 ... ...)))
  (progn (setq stem-list (let ... ...)) (if (> ... 1) (setq stem-list ...)) (setq pat (let* ... ... ...)) (delq nil (mapcar ... ...)))
  (or (and (setq stem-list ... pat nil) (setq stem-list ...) (sdic-sort-dictionary-order ...)) (progn (setq stem-list ...) (if ... ...) (setq pat ...) (delq nil ...)))
  (prog1 (or (and ... ... ...) (progn ... ... ... ...)) (setq pat (if ... ... ...)))
  (mapcar (lambda (entry) (and ... ... ...) (sdic-insert-content ... ...) (car entry)) (prog1 (or ... ...) (setq pat ...)))
  (prog1 (mapcar (lambda ... ... ... ...) (prog1 ... ...)) (setq sdic-buffer-start-point (if point ... ...)))
  (let (word-list stem-list orig pat point str) (setq word-list (sdic-split-string ...)) (prog1 (mapcar ... ...) (setq sdic-buffer-start-point ...)))
  (cond ((and ... ...) (sdic-insert-entry-list ...)) ((equal 47 ...) (sdic-insert-entry-list ...)) ((equal 42 ...) (sdic-insert-entry-list ...)) ((equal "*" ...) (sdic-insert-entry-list ...)) (t (let ... ... ...)))
  (sdic-decide-query-type sdic-eiwa-symbol-list query (let (word-list stem-list orig pat point str) (setq word-list ...) (prog1 ... ...)))
  sdic-search-eiwa-dictionary("buffer")
  funcall(sdic-search-eiwa-dictionary "buffer")
  (prog1 (funcall (or search-function ...) word) (setq buffer-read-only t) (set-buffer-modified-p nil))
  (if (prog1 (funcall ... word) (setq buffer-read-only t) (set-buffer-modified-p nil)) (sdic-display-buffer sdic-buffer-start-point) (message "Can't find word, \"%s\"." word) nil)
  (let ((case-fold-search t) (sdic-buffer-start-point ...)) (if (prog1 ... ... ...) (sdic-display-buffer sdic-buffer-start-point) (message "Can't find word, \"%s\"." word) nil))
  sdic-describe-word("buffer" nil)
  call-interactively(sdic-describe-word)

です. よろしくお願いします.

2007年01月06日 15時24分14秒 changed by shirai

# 反応悪くてすいません ()

> Debugger entered--Lisp error: (quit)
>  call-process("d:/cygwin/bin/fgrep" nil t nil "-e" "<K>buf" "d:/Tools/Dict/gene.sdic")

fgrep が終わらないということのようですが、同じ検索方法にしてみても、やっぱり、ぼくの環境では問題なく動いちゃって原因がわかりません ;;; ちなみに、ぼくの cygwin の fgrep は

#!/bin/sh
exec grep -F ${1+"$@"}

という shell script です。おそらくですが、下記のように直接 grep.exe を検索コマンドに設定すると動作すると思います。

(setq sdicf-fgrep-command "d:/cygwin/bin/grep.exe")
(setq sdicf-egrep-command "d:/cygwin/bin/grep.exe")

また、詳細は省きますが、Meadow2 と Meadow3 の file-executable-p() の挙動の違いで、SDIC での上記の変数の自動設定の結果が

Meadow2
 sdicf-fgrep-command => "d:/cygwin/bin/grep.exe"
Meadow3
 sdicf-fgrep-command => "d:/cygwin/bin/fgrep"

となるので Meadow3 になって急に動かなくなったのでしょう。

上記の内容が正解だとすると問題は『なんで、shell script (fgrep)が動かないの?』ということになるのですが、うーむ、手元で起きてくれるとわかるかもしれないのだけど。。。

2007年01月06日 17時28分34秒 changed by anonymous

Meadowは2でも3でもcall-processからshell scriptは起動できないはずです。 少なくとも-qで起動した場合はできません。 mw32-process-wrapper-alistとかadviceに何か設定しているのではないでしょうか?

2007年01月06日 18時06分36秒 changed by anonymous

すみません、一部撤回です。
素のままではshell scriptが動かないのはその通りとして、mw32script.elの存在を忘れていました。 多分naokiさんの環境でも有効にしているのですね(そうでなければエラーで止まるはず)。

2007年01月06日 22時05分56秒 changed by shirai

はい、もし

    (require 'mw32script)
    (mw32script-init)

をしていないで、shell script を動かそうとしているのなら全然別のエラーになるために、そこのところは大丈夫と判断しました。 naokiさんの fgrep が shell script なのかどうかは知りたいところです。

2007年01月07日 00時55分49秒 changed by naoki

お返事ありがとうございます.

(setq sdicf-fgrep-command "d:/cygwin/bin/grep.exe")
(setq sdicf-egrep-command "d:/cygwin/bin/grep.exe")

を評価した後は正しく動作しました.

ちなみに,fgrepはshell scriptでした.

[TOTORO ~] > cat `which fgrep`
#!/bin/sh
exec grep -F ${1+"$@"}

2007年07月12日 18時53分56秒 changed by kose

  • status changed from reopened to closed.
  • resolution set to fixed.

解決ずみのようなのでcloseします。


Add/Change #319 (SDICについて)




Change Properties
Action