Emacs AUCTEX Spell Checking Error: no dictionary ispell [Mac OS]

2014年4月18日 11:40

When using AUCTEX in Emacs, type M-x ispell then hit RET, there is an error saying : no dictionary found for ispell.

I already installed aspell using 

brew install aspell --all

It shows that:

Warning: aspell-0.60.6.1 already installed

Therefore, in the configure file ~/.emacs.d/init.el, I add 

(setq ispell-program-name "/usr/local/bin/aspell")

since the executable of aspell locates in the path "/usr/local/bin/aspell" for my Mac OS.

Then I type M-x ispell, it works.

评论(0) 阅读(1946)

Ubuntu 13.04 + Emacs 24.3 + W3M

2013年9月26日 08:05

1. 下载安装w3m

$ apt-get install w3m
$ cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot co emacs-w3m

下载完成后,将源码拷贝到/usr/local/src目录下

$ sudo cp -r emacs-w3m /usr/local/src/
$ cd /usr/local/src/emacs-w3m/
$ sudo autoconf
$ sudo ./configure
$ sudo make
$ sudo make install

2. Emacs 24.3,在~/.emacs.d/init.el 文件里添加如下设置

;; set emacs-w3m
;;设置emacs-w3m浏览器
(add-to-list 'load-path "/usr/local/src/emacs-w3m/")
(require 'w3m)
(require 'w3m-load)
;(require 'mime-w3m)
 
;; 设置w3m主页
(setq w3m-home-page "http://www.google.com")
 
;; 默认显示图片
(setq w3m-default-display-inline-images t)
(setq w3m-default-toggle-inline-images t)
 
;; 使用cookies
(setq w3m-command-arguments '("-cookie" "-F"))
(setq w3m-use-cookies t)
(setq browse-url-browser-function 'w3m-browse-url)
(setq w3m-view-this-url-new-session-in-background t)

3. 在Emacs中开启w3m:

M-x w3m


为图方便,大部分内容转载自阿戴网http://www.adaiw.com/?p=804

 

Tags: emacs ubuntu
评论(0) 阅读(4281)

 Mac OS X 下安装 Emacs 24及配置preclude

2013年3月26日 06:55

http://batsov.com/articles/2011/10/09/getting-started-with-emacs-24/

我用brew安装的emacs版本有问题,后来到http://emacsformacosx.com/下载纯净版本的emacs

然后再按如下文章配置preclude

经过emacs自动编译后如图

Last month I’ve blogged about the exciting things are coming up in Emacs 24. What I failed to mention originally is that altough Emacs 24 is slated for a Spring 2012 (tentatively) release there is no real reason not to start using it now. You should also keep in mind that it’s feature complete since it officially entered the feature freeze of its development cycle in July 2011.

I’ve been using Emacs 24 for several months now and it has been nothing but rock solid. I guess the only real obstacle currently is that the way to obtain Emacs 24 is not particularly straightfoward/clear, hence this post.

I’ll discuss here the installation and initial configuration of Emacs 24 on OSX, GNU/Linux and Windows.

Installing Emacs 24

OS X

Obtaining Emacs 24 on OS X is really simple. There are two popular ways to do it. The first is to simply download a pretest (or a nightly build) from Emacs for OSX. My personal recommendation would be to get the latest pretest (which is ironically the first pretest as well) from here.

That was really easy, right?

The second easy way to obtain Emacs 24 is via homebrew. Just type the following incantation in your shell and you’re done:

$ brew install emacs --cocoa --use-git-head --HEAD
$ cp -r /usr/local/Cellar/emacs/HEAD/Emacs.app /Applications/

The second step is optional, but it’s recommended if you like to start Emacs from the launchpad or from Spotlight. Personally I prefer to start Emacs in daemon mode (emacs --daemon), so that I could share a single Emacs instance between several Emacs clients.

That’s all folk! You may now proceed to the configuration section.

Linux

Given that Linux is more or less the home os of Emacs it presents us with the most installation options. Of course, we can build Emacs from source on every distribution out there, but I rarely bother to do so. Using the distribution’s package manager is a better idea for many reasons - you don’t need to install a build chain and lots of dev libraries, you get updated versions when they are released and you get automated dependency manager, just to name a few.

That said, few distributions include in their primary repositories builds of Emacs 24. Luckily there are some unofficial repos that come to the rescue.

Debian/Ubuntu users should look no further than the amazing emacs-snapshot APT repo. You’ll find installation instructions there for all the relevant Debian and Ubuntu versions out there. High quality, highly recommended builds!

Gentoo users have even less to do, since Emacs 24 can be obtained via the emacs-vcs package in portage, as noted in the official Emacs on Gentoo page.

Windows

There are several ways to obtain precompiled Emacs 24 binaries if you’re a Windows users. The most popular are EmacsW32,Emacs for Windows and of course the official Emacs Windows builds. I’ve ,personally, never used any builds other than the official ones. The unofficial builds usually include installers and various patches that might be of use to some users.

Since I rarely use Windows I cannot give you any more advice on the choice of a binary vendor.

Initial configuration

Installing Emacs has always been the easy part, configuring it properly - not that much. That’s why I’ve created the Emacs Prelude - an advanced Emacs setup specifically for Emacs 24 that has been tested to properly work on OSX, Linux and Windows.

Its installation is dead simple:

$ git clone git://github.com/bbatsov/prelude.git path/to/local/repo
$ ln -s path/to/local/repo ~/.emacs.d

For Windows Vista/7 the ~(home) folder is 

C:\Users\<USER>\AppData\Roaming\

The configuration in the Prelude is commented extensively and will be improved more along the way. Reading it will be an enlightening experience for all new Emacs users.

The Prelude itself is a moving target. I’ve created it recently and I plan to add a lot more cool things very soon, so stay tuned. If you have any problems with it or have feature suggestions - do not hesitate to open tickets and send pull requests.

Epilogue

Now that I’ve shown you how easy it is to get a hold of Emacs 24 and I’ve provided you with a starting configuration there is really no excuse not to switch to Emacs 24. Install it, use it, love it!

 

评论(0) 阅读(9496)

高手经典的Emacs配置文件 (cedet+ecb+cscope)

2011年6月03日 04:54

Emacs 23在ubuntu12.04下的配置。样式美观,功能强耐用齐全,可自己定义想要的功能。包括:
在左边显示行号
语法高亮
显示括号匹配
禁止自动保存
编译成功后自动关闭*compilation* buffer
缩进策略
输入左边的括号,就会自动补全右边的部分.包括(), "", [] , {} , 等等。

新增加了color theme。所有配置文件在:git clone https://github.com/ysonggit/emacs-ubuntu1204.git

评论(0) 阅读(7420)