2016年1月27日 星期三

emacs magit workflow

http://ergoemacs.org/emacs/emacs_magit-mode_tutorial.html

(Install magit from elpa/melpa first)


Run once under terminal/command prompt:


  1. git clone https://github.com/AAA/BBB.git & cd BBB(if required)
    • if start from scratch, run "git init" instead

Run as you change code / debug under emacs :

  1. M-x magit-status (to bring up magit)
  2. S (= git add .)
  3. c c MMM C-c C-c (= git commit -m "MMM")
  4. P p (= git push origin master)

2016年1月26日 星期二

windows 下 emacs magit 無法 push 的問題

https://github.com/magit/magit/wiki/Pushing-with-Magit-from-Windows

真的是大杯無鹽…

emacs中bookmark plus (bookmark+)的使用 v.20160125

http://www.emacswiki.org/emacs/BookmarkPlus

用elpa裝好了以後,原則上按鍵組合與原先bookmark是相同的

(20170117特急通知:請勿更新 org 到 9.0以上版本,否則以下部分功能無法正常使用)

多個書籤檔的建立/切換


‘C-x p L’ (or just ‘L’ in the bookmark-list)(‘bmkp-switch-bookmark-file-create’)

新增bookmark: bookmark-set `C-x r m', `C-x p c m'


這不就最基本款的嗎?是的,不過它幕後記載了不少東西,使得某些功能更為強大了,例如它會記得這個buffer上次bookmark的名字;嚴格來說它有辦法撈出最近一次的bookmark,所以當它問你這次要給bookmark什麼名字時,按下 `C-M-u' 就直接幫你打出這個名字來,文件上說真的就像實體的書籤一樣,我們通常洗手間都會擺一本連著看很容易睡著的小說,這裏面是一定要夾一個書籤的不是嗎?它就是用來記得上次看到那兒的…

預設在問你要給什麼名字的時候,提示的是這個buffer中曾經設置過的所有bookmark名字;我通常會在文章中copy一段有代表性的文字,在它提示要輸入名字時按下 C-y ,省去打字的功夫。

檢視bookmark list


‘C-x p e’ or ‘C-x r l’ (command ‘bookmark-bmenu-list’)

跳到指定的 bookmark


‘C-x j j’ (‘bookmark-jump’)
‘C-x 4 j j’ (‘bookmark-jump-other-window’)

與 org mode 整合,在開發程式時做文件以跳轉到原始碼,或是為你不能check out只能clone/rebase的原始碼做注解


文件寫一寫要對照原始碼時,總要回去看一下原碼,如果結合org mode在裏面加link,就可以跳轉到原始碼,這不是太好了嗎?就是有這麼好的事, bookmark 可以成為link的目的地以進行跳轉。有兩個步驟:

  1. 複製連結。有兩種作法,一是先按個 C-x r l 把bookmark list先帶出來,然後 C-c l (‘org-store-link’) 複製連結;嫌麻煩的話直接在 org 檔中使用 M-x bmkp-store-org-link 在跳出的對話盒選取之前存下來的 bookmark 也行。
  2. 最後在要插入 bookmark link 的 org 檔中按 C-C C-l 插入連結。


結合dired記得整個buffer內容


dired就有點像文字版本的檔案管理員,把emacs當ide時可以把它放在左上角。在這個major mode中,bookmark+會把整個dired的配置都記得,把它拿來當成專案檔的話是滿不錯的…dired的說明:

http://ithelp.ithome.com.tw/question/10138296
http://ithelp.ithome.com.tw/question/10138547
https://yfwu.gitbooks.io/emacs-manual/content/chapter3-dired.html
http://kuanyui.github.io/2014/06/21/dired-tutorial-and-essential-configs/
https://twitter.com/emacstw/status/479866473226055680

bmkp-make-desktop-record 記得桌面配置 C-x p K


當桌面割得亂七八糟時,你會需要它的…

編輯bookmark list


http://www.emacswiki.org/emacs/BookmarkPlus#toc26

重要預設值


預設書籤檔位置    bmkp-last-as-first-bookmark-file

「org mode bookmark plus」的圖片搜尋結果

2016年1月21日 星期四

emacs lisp 學習計劃

Emacs 令人著迷卻又難以客製的原因,我想都是出自於所使用的 emacs lisp 語言。

lisp 現在的主要兩本教科書,分別是使用(號稱)精簡版的 scheme 語言的 sicp ,及使用 common lisp 的 paip。

根據此文所言,emacs lisp 應該是比較接近 common lisp ,因此似乎以學習 common lisp 是比較好的選擇。李殺則認為 common lisp 甚至不應作為學習的起點,而應該直接學習 emacs lisp;李殺網有不少學習的資料,值得好好看看,他也認為適當的結合其它腳本語言可以事半功倍,但是複雜的情況仍然需要直接使用 emacs lisp 當中的 buffer 概念來處理。

2016年1月20日 星期三

這次安裝 ubuntu 15.10 遇到的問題彙整

網卡驅動程式安裝

http://www.howopensource.com/2012/05/install-broadcom-sta-b43-wireless-driver-in-ubuntu-12-04-11-10-11-04/

安裝英文版,使得中文字體全變標楷體

移除2個設定檔
http://brianhu.logdown.com/posts/222914-ubuntu-14-04

變更系統字型

使用 Ubuntu tweak
http://blog.csdn.net/tao_627/article/details/24180781

Dropbox 的安裝/執行

https://www.dropbox.com/install?os=lnx

Ubuntu 14.10與嘸蝦米 - 使用fcitx

http://jyc-blog.blogspot.tw/2015/02/ubuntu-1410-fcitx.html
http://yuanfarn.blogspot.tw/2015/04/ubuntu-1504.html
http://www.pinyinjoe.com/linux/ubuntu-12-chinese-setup.htm

20171011更新:
下面這個連結比較精確
http://gitqwerty777.github.io/install-boshiamy-in-linux-by-fcitx/

2015年12月9日 星期三

另類流程圖軟體 yEd

http://www.yworks.com/products/yed

雖然有個 edit mode ,但是大量文字資料輸入時我覺得還是 mindjet 比較快


2015年10月9日 星期五