Showing posts with label emacs. Show all posts
Showing posts with label emacs. Show all posts

Saturday, November 13, 2010

Keep favorite info pages in $HOME

Info is a handy document system most emacs fans love. We can learn Info, Emacs Basics, Emacs Lisp, Magit and blah blah blah through the system and look up any detail every time we need without leaving Emacs, so that I install many info pages into /usr/local/info, /usr/share/info and /usr/share/local/info. However, when I need to migrate all data to new computer, keeping my info pages is really a nightmare. So I add a few of lines shown below into ~/.emacs

(custom-set-variables
'(Info-default-directory-list
(append Info-default-directory-list
'("~/.info"))))

and put all info pages I collected before into ~/.info

Now I just need to migrate all files in my $HOME to new computer.

Saturday, October 23, 2010

Fullscreen Emacs on Mac OS X from tarball

Emacs 23.2 in trunk doesn't support fullscreen on Mac OS X.

Japanese hacker typester do a patch for this.

Following is a quick step-by-step instruction to compile emacs 23.2 supporting fullscreen with this patch.


cd /tmp

wget http://ftp.twaren.net/Unix/GNU/gnu/emacs/emacs-23.2.tar.gz

wget http://github.com/downloads/typester/emacs/feature-fullscreen.patch

tar xzvf emacs-23.2.tar.gz

cd emacs-23.2

patch -p1 < /tmp/feature-fullscreen.patch

./configure --with-ns

make

sudo make install

mv nextstep/Emacs.app ~/Applications



Reference:
[1] Emacs Wiki
[2] sanityinc.com
[3] Citizen428

Thursday, June 25, 2009

disable beep in emacs

使用 Emacs 也有一段時間,在 Mac 的 GUI 環境下使用 touch panel 撥弄 emacs 的 scroll bar,總會有令人中斷思緒的嗶嗶聲。Emacs Wiki: AlarmBell 這頁把處理警告的設定方式寫的頗為清楚。

要把警示聲換成視覺警示,可以寫成

(custom-set-variables '(visible-bell t))

在 GNU Emacs,這樣預設是閃爍第一行或最後一行,端看 touch panel 是轉哪一邊,XEmacs 則是閃爍整個螢幕,要讓 XEmacs 僅閃爍一行,則要寫成

(custom-set-variables '(visible-bell 'top-bottom))

完全關閉警告,可以設成

(custom-set-variables '(ring-bell-function 'ignore))

ring-bell-function 還可以設定成一個 lambda,指定警示聲去播放某個音效檔案。
(setq ring-bell-function (lambda ()
(call-process "audioplay" nil 0 nil
"/this/is/my/errorsound.au")))

或是送出訊息
(setq ring-bell-function (lambda ()
(message "use the message to replace beep")))


Emacs is awesome :D

 

Saturday, September 6, 2008

emacs.app

the default color scheme looks more beautiful in emacs.app. :D

From temp

Wednesday, September 3, 2008

expand tab

emacs: (setq-default indent-tabs-mode nil)
vim: set expandtab

but I could not find the setting in textmate :~