這真是一個難設定的東西。雖然不知道這樣對不對,但至少是 work 的,記下來,免得下次又忘了。
安裝 pari-gp 和 emacs
# apt-get install pari-gp
如果直接 apt-get install emacs,通常裝的會是較新的版本,以這幾週的情況看起來,在 ubuntu 9.10 上至少會裝到 22.2 版,不過這一版以上都無法順利按照說明檔設定。最後裝了 21.1 版才 OK。
接著應該會在 /usr/local/share/emacs/site-lisp 看到一堆 *.el 或 *.elc 檔,以 21.1 版來看,就是全部複製到 /usr/local/share/emacs/21.1/ 之下。然後在自己的 home 下新增 .emacs 檔,加入下列:
(autoload 'gp-mode "pari" nil t)
(autoload 'gp-script-mode "pari" nil t)
(autoload 'gp "pari" nil t)
(autoload 'gpman "pari" nil t)
(setq auto-mode-alist
(cons '("\\.gp$" . gp-script-mode) auto-mode-alist))
(load "/usr/share/doc/pari-gp/emacs/pari.el" nil t)
存檔。然後啟動 emacs,照使用手冊上說的,按 alt+x 後,在下方會出現 M-x,然後打 gp,這樣就可以使用 pari-gp 了。
安裝 pari-gp 和 emacs
# apt-get install pari-gp
如果直接 apt-get install emacs,通常裝的會是較新的版本,以這幾週的情況看起來,在 ubuntu 9.10 上至少會裝到 22.2 版,不過這一版以上都無法順利按照說明檔設定。最後裝了 21.1 版才 OK。
接著應該會在 /usr/local/share/emacs/site-lisp 看到一堆 *.el 或 *.elc 檔,以 21.1 版來看,就是全部複製到 /usr/local/share/emacs/21.1/ 之下。然後在自己的 home 下新增 .emacs 檔,加入下列:
(autoload 'gp-mode "pari" nil t)
(autoload 'gp-script-mode "pari" nil t)
(autoload 'gp "pari" nil t)
(autoload 'gpman "pari" nil t)
(setq auto-mode-alist
(cons '("\\.gp$" . gp-script-mode) auto-mode-alist))
(load "/usr/share/doc/pari-gp/emacs/pari.el" nil t)
存檔。然後啟動 emacs,照使用手冊上說的,按 alt+x 後,在下方會出現 M-x,然後打 gp,這樣就可以使用 pari-gp 了。
留言
張貼留言