[emacs] 如何比較方便地 make 我的專案已刪文

看板Editor作者 (Neisseria)時間10年前 (2014/01/13 18:45), 編輯推噓1(104)
留言5則, 4人參與, 最新討論串1/1
我用 Sphinx 建了一個 reStructuredText 文件的專案 $ sphinx-quickstart mybook 然後這個專案的內容如下 因為希望把文件都放在資料夾 content/ 底下 所以另外建了一個資料夾 $ cd mybook $ mkdir content $ ls -F conf.py content/ index.rst make.bat Makefile 開始用 emacs 編輯文件 $ emacs index.rst 在 emacs 裡編輯另一個檔案 C-x C-f content/another_document.rst 然後,編輯完後想要生成 html 檔 M-x compile <RET> make html <RET> 但是 emacs 似乎會將資料夾的位置設定在 another_document.rst 所在的位置 所以 make 指令會讀不到 Makefile 當然把所有的檔案都放到和 Makefile 同一層資料夾也可以 但是這樣覺得資料夾裡一堆檔案 感覺比較亂 想請問一下比較順手的方法? 另外 有沒有將以下這行寫成比較方便的指令 像 bash 裡的 alias 一樣 M-x compile <RET> make html; firefox --new-tab .build/html/index.html <RET> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.104.122.31

01/14 01:20, , 1F
有試過make -f? compile 應該會記得上次的指令
01/14 01:20, 1F

01/14 13:03, , 2F
寫在 makefile 裡就好 這樣管理上比較有彈性
01/14 13:03, 2F

01/14 13:03, , 3F
不用在 emacs 寫死各個專案的編譯方法
01/14 13:03, 3F
感謝建議 後來用改 Makefile 的方式 ※ 編輯: Neisseria 來自: 118.168.118.42 (01/15 15:52)

01/22 21:11, , 4F
在emacs開個shell
01/22 21:11, 4F

07/02 09:57, , 5F
M-x ansi-term XDDDD
07/02 09:57, 5F
文章代碼(AID): #1IqyFNUY (Editor)