emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/pyim 940f1aa489 2/3: Merge pull request #447 from tumas


From: ELPA Syncer
Subject: [elpa] externals/pyim 940f1aa489 2/3: Merge pull request #447 from tumashu/run-emacs
Date: Thu, 23 Jun 2022 03:57:53 -0400 (EDT)

branch: externals/pyim
commit 940f1aa48996b4a65d4e15eaa30172037c5de1d4
Merge: 5617d8f87c 8d76a25bb8
Author: tumashu <tumashu@163.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #447 from tumashu/run-emacs
    
    run specific version of emacs to test latest pyim code
---
 Makefile                 |  6 +++++-
 README.org               | 13 +++++++++++++
 tests/pyim-emacs-init.el | 10 ++++++++++
 3 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 85889e6f98..b89c59fc5d 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,8 @@ EMACS ?= emacs
 
 .PHONY: test lint clean deps compile
 
-EMACS_BATCH_OPTS=--batch --quick --directory . --directory .deps
+EMACS_GENERIC_OPTS=--quick --directory . --directory .deps
+EMACS_BATCH_OPTS:=--batch $(EMACS_GENERIC_OPTS)
 RM=@rm -rf
 
 
XR_URL="https://git.savannah.gnu.org/cgit/emacs/elpa.git/plain/xr.el?h=externals/xr";
@@ -41,3 +42,6 @@ compile: deps
 test: compile deps
        @$(EMACS) $(EMACS_BATCH_OPTS) --load ./tests/pyim-tests.el
        $(RM) pyim-tests-temp-*
+
+runemacs: deps
+       @$(EMACS) $(EMACS_GENERIC_OPTS) --load ./tests/pyim-emacs-init.el
diff --git a/README.org b/README.org
index 7b0a9bbaa0..55f6da2fd0 100644
--- a/README.org
+++ b/README.org
@@ -406,6 +406,19 @@ pyim 当前内置两种指示器实现方式:
 
 * 开发
 请参考 [[file:Development.org][Development.org]] 文档
+
+
+* 试用
+在pyim项目根目录运行命令=make runemacs=试用最新的pyim。
+
+只有pyim和其依赖的包被载入。用户自己的emacs配置不会被载入。
+
+指定运行的Emacs版本用以下命令,
+#+begin_src sh
+EMACS=~/my-whatever-directory/bin/emacs make runemacs
+#+end_src
+
+Emacs启动后运行=M-x toggle-input-method= 或按=C-/=启动输入法。
 * 捐赠
 您可以通过小额捐赠的方式支持 pyim 的开发工作,具体方式:
 
diff --git a/tests/pyim-emacs-init.el b/tests/pyim-emacs-init.el
new file mode 100644
index 0000000000..8263ebeb97
--- /dev/null
+++ b/tests/pyim-emacs-init.el
@@ -0,0 +1,10 @@
+(require 'pyim)
+(setq default-input-method "pyim")
+
+(defun pyim-test-find-file (file)
+  "Read FILE's content into current buffer."
+  (let* ((files (directory-files-recursively default-directory file)))
+    (file-truename (car files))))
+
+(setq pyim-dicts (list (list :name "basedict" :file (pyim-test-find-file 
"pyim-basedict.pyim"))))
+(message "pyim-dicts=%s" pyim-dicts)



reply via email to

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