win10にmobile-orgを設定。MACは簡単に設定できましたが、winは少々手こずりました。以下、手順を備忘録としてまとめました。
emacsインスト
emacsは、gnu emacs-26.3-x86_64 をインスト。siteは以下。
https://www.gnu.org/software/emacs/download.html
フォルダの設置場所です。
c:\Users\user(名称はownerによる)\emacs-26.3-x86_64
起動fileは、\binにあるrunemacs.exe
起動する前に、環境変数HOMEを定義しておきます。
HOME=c:\Users\user (名称はownerによる)
runemacs.exeを起動すると、\user直下に .emacs.d が生成されます。
ここまでは、簡単。ここから先はinit.elの定義に依存します。
mobile-org
MobileOrg はiphoneアプリ。iphoneでcaptureした内容をdropbox経由で共有(同期)できるすぐれもの。同期にはPC(MAC、win、linux)が介在しますが、思いついたことをその場で記録できるMobileOrgは、何物にも替えがたいアプリです。
私の環境は、iphone、mac book air(ダイニング)、win(二台・自室)、linux(自室)。
MACでの使い勝手が良かったので、winでも使えるよう試みたところ、二種類のエラーに悩ませられました。
1.”Variable org-mobile-directory must point to an existing directory “
ディレクトリが指定されていないというエラー。init.elで定義していますが、定義が不十分らしい。
2.”No executable found to compute checksums”
checksumsルーチンが見つかりませんというエラー。MACではお目にかかりませんでした。win環境特有のエラーのようです。
エラーメッセージで検索すると、色々な答えが見つかりました。
1.は https://superuser.com/questions/429880/variable-org-mobile-directory-must-point-to-an-existing-directory-multiplatfo
2.は https://www.mail-archive.com/emacs-orgmode@gnu.org/msg26767.html と http://please.makesure.to/archives/78
以上から、init.elに以下を追記。winから、org-mobile-pull/push コマンドが使えるようになりました。
;;On Windows root set
(if (eq system-type ‘windows-nt) (progn (setq default-directory “~/”)))
;;On Windows checksum link
(if (eq system-type ‘windows-nt) (progn (setq org-mobile-checksum-binary “powershell -Command Get-FileHash -Algorithm SHA256”)))
init.elはdropboxにて一元管理、MAC・winともSymbolicLink。