Created attachment 1818551 [details] Tar file made of three patch files and one script file (not compressed) Description of problem: Emacs-anthy-unicode does not work on emacs, because the character encodings in anthy-agent-unicode and emacs lisp files are configured improperly. Version-Release number of selected component (if applicable): anthy-unicode-1.0.0.20201109-6.fc34.x86_64.rpm emacs-anthy-unicode-1.0.0.20201109-6.fc34.noarch.rpm How reproducible: Everytime Steps to Reproduce: 1. Add (require 'anthy) to ~/.emacs file. 2. Start emacs and type C-\ in emacs. 3. Type arbitrary Japanese romaji. Actual results: Entered romaji is displayed as two octets, and converted into two octets still when space-key is typed. Expected results: Entered romaji is displayed as Japanese hiragana, and converted into right Japanese characters when space-key is typed. Additional info: I attached three patch files and one script file. The anthy-unicode-util.patch and anthy-unicode-emacs-el.patch fix this problem sufficiently. To use anthy and anthy-unicode on emacs, the anthy-unicode-util-Makefile.patch and anthy-unicode-emacs-el-change-name.sh are required. These files add 'unicode' to the names of emacs lisp files and their functions, and change character encoding of emacs lisp files into utf8. The script file requires nkf.
Thank you very much for your patches. Your patch causes build errors: anthy-unicode.el:906:1:Error: Cannot open load file: No such file or directory, anthy-dic anthy-unicode-isearch.el:14:1:Error: Cannot open load file: No such file or directory, anthy https://kojipkgs.fedoraproject.org//work/tasks/879/77640879/build.log I modified #906 line in anthy-unicode.el but still receive a build error: --- a/src-util/anthy-unicode.el +++ b/src-util/anthy-unicode.el @@ -903,8 +903,8 @@ ;(global-set-key [(meta escape)] 'anthy-mode) (provide 'anthy) -(require 'anthy-dic) -(require 'anthy-conf) +(require 'anthy-unicode-dic) +(require 'anthy-unicode-conf) ;; is it ok for i18n? (set-language-info "Japanese" 'input-method "japanese-anthy") anthy-unicode.el:906:1:Error: Loading file /builddir/build/BUILD/anthy-unicode-1.0.0.20201109/src-util/anthy-unicode-dic.el failed to provide feature `anthy-unicode-dic' https://kojipkgs.fedoraproject.org//work/tasks/1392/77641392/build.log
https://github.com/fujiwarat/anthy-unicode/commits/master
Thank you for committing my patches and informing me. The patch files are insufficient if only the names of files are changed. I recommend adding "unicode" to the names of all functions and variables in anthy-unicode emacs lisp files because Fedora provides anthy and anthy-unicode RPMs. If anthy and anthy-unicode RPMs are installed simultaneously, "/usr/share/site-lisp/anthy-unicode" is earlier than "/usr/share/site-lisp/anthy" in the variable load-path of emacs. In this situation, there is a problem in using anthy in emacs because anthy and anthy-unicode RPMs provide the emacs lisp files that contain the functions with same name and different return values. Changing the subject, I have another proposal of a patch file to make consistent with adding word by kasumi-unicode. --- src-util/anthy-unicode-dic.el.orig 2021-08-28 19:09:41.806091512 +0900 +++ src-util/anthy-unicode-dic.el 2021-10-22 21:34:29.331951069 +0900 @@ -125,7 +125,7 @@ ((= cat 4) (setq param (anthy-dic-get-av-category word)))) (if param - (setq res (anthy-add-word yomi 1 word param))) + (setq res (anthy-add-word yomi 500 word param))) (if res (message (concat word "(" yomi ")を登録しました")))))
In my last comment Incorrect: "/usr/share/site-lisp/" Correct: "/usr/share/emacs/site-lisp/"
I don't think the build error is caused by installing both anthy and anthy-unicode. I think you suggest to fix another issue. I think your 500 word patch also does not resolve the build error. I mean if the build errors are not resolved, I will revert your patches in the upstream again. https://koji.fedoraproject.org/koji/taskinfo?taskID=77726241
Finally we fixed the build errors: https://github.com/fujiwarat/anthy-unicode/commit/e54c7582bc7284575c12827a9685c5ab08cb2674
I revised the patch. https://github.com/fujiwarat/anthy-unicode/commit/3268769dcf9599d0275b82edf88b9f8ac6d51891
FEDORA-2021-bf632768c1 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-bf632768c1
FEDORA-2021-bf632768c1 has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-bf632768c1` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-bf632768c1 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-bf632768c1 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.