Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working example16 #16

Open
conao3 opened this issue Nov 23, 2019 · 6 comments
Open

Not working example16 #16

conao3 opened this issue Nov 23, 2019 · 6 comments

Comments

@conao3
Copy link
Contributor

conao3 commented Nov 23, 2019

こんにちは。

(start-process "emacs" nil (file-truename (expand-file-name invocation-name invocation-directory)) "-Q" "-Q" "--execute" "(package-initialize)" "-L" (concat default-directory "../") "-l" (buffer-file-name) "--execute" "(launcher)")
により、上から実行していたのですが、 example16 の結果がいつまで待っても表示されませんでした。これは手元だけの不具合でしょうか。。?

@chuntaro
Copy link
Owner

すみません、自分の環境だと公式ビルドの Emacs26.3, Emacs27.0.50 で再現しませんでした…
数秒すると6270桁の数字が表示されます。
async.el によって別プロセスで計算しているはずですが、CPU負荷はずっと高いままでしょうか?

@conao3
Copy link
Contributor Author

conao3 commented Nov 24, 2019

(promise-rejection-tracking-enable '((all-rejections . t))) をした後に実行すると下記のエラーがでました。asyncが読み込めてないようです。。

Warning (promise): Possible Unhandled Promise Rejection (id:0):
Warning (promise): (void-function async-start)

@chuntaro
Copy link
Owner

なるほど…
確かに (require 'async) はしてないですが、Package-Requires に (async "1.9") が書いてあって、async-autoloads.el に async-start が autoload されているので問題無いと思ってましたが…明示的に (require 'asyc) が必要なのかもしれないです。
example16 のドキュメント文字列の下に (require 'async) を書くとどうでしょうか?

@conao3
Copy link
Contributor Author

conao3 commented Nov 24, 2019

このエラーが表示されました。

example16: Cannot open load file: No such file or directory, async

必要そうな情報は以下です。elpaの位置が違うのが原因かもしれません。バージョンごとに分けてるんですよね。。
Caskを使ってるので、 emacs-promise/examples/../.cask を使うと上手くいくのかもしれません。

(file-truename (expand-file-name invocation-name invocation-directory))
;;=> "/home/conao/.local/bin/emacs-26.3"

(concat default-directory "../")
;;=> "/home/conao/dev/forks/emacs-promise/examples/../"

user-emacs-directory
;;=> "/home/conao/.emacs.d/local/26.3/"

package-user-dir
;;=> "~/.emacs.d/local/26.3/elpa"

@chuntaro
Copy link
Owner

なんと、随分複雑ですね…
(require 'async) がエラーになると、正直対処法が分かりません…

@chuntaro
Copy link
Owner

多分 -Q を付けなければうまく行くのでしょうね。
出来る限り素の状態で動かしたかったので -Q を付けてますが、canao さんの環境に合わせて変更してみてくださいという感じでしょうか…

関係無いですが -Q がダブってたり、-f で良いのに --execute 使ってたりしますね…後ほど修正しておきます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants