LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 810|回复: 11

A puzzle about emacs

[复制链接]
发表于 2006-5-31 08:07:43 | 显示全部楼层 |阅读模式
After I edit a file, emacs always create a backup in the dir, that sounds very interesting, but isn't what I want, how can I disable this "smart" function?
发表于 2006-5-31 09:02:36 | 显示全部楼层
在~/.emacs中写

(setq make-backup-files nil)
回复 支持 反对

使用道具 举报

发表于 2006-5-31 11:54:57 | 显示全部楼层
那vim如何做到呢?
回复 支持 反对

使用道具 举报

发表于 2006-5-31 12:13:57 | 显示全部楼层
Post by tingxx
那vim如何做到呢?

set nobackup
回复 支持 反对

使用道具 举报

发表于 2006-5-31 14:54:29 | 显示全部楼层
you can make it smarter by setting the variable backup-directory-alist, the document says:
Post by Emacs

backup-directory-alist is a variable defined in `files.el'.
Its value is nil

Documentation:
Alist of filename patterns and backup directory names.
Each element looks like (REGEXP . DIRECTORY).  Backups of files with
names matching REGEXP will be made in DIRECTORY.  DIRECTORY may be
relative or absolute.  If it is absolute, so that all matching files
are backed up into the same directory, the file names in this
directory will be the full name of the file backed up with all
directory separators changed to `!' to prevent clashes.  This will not
work correctly if your filesystem truncates the resulting name.

For the common case of all backups going into one directory, the alist
should contain a single element pairing "." with the appropriate
directory name.

If this variable is nil, or it fails to match a filename, the backup
is made in the original file's directory.

On MS-DOS filesystems without long names this variable is always
ignored.

You can customize this variable.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-1 00:21:52 | 显示全部楼层
In addition, I use debian3.1 sarge, and the emacs's version is emacs21, I've heard of that it could not support Chinese characters, is it the true? How can I deal this tedious thing?
回复 支持 反对

使用道具 举报

发表于 2006-6-1 00:34:56 | 显示全部楼层
It can support Chinese, if your locale is UTF-8 (That's very popular today), just type
  1. apt-get install mule-ucs
复制代码
then your emacs can handle chinese well. If your locale is GB*, then maybe you should install mule-gbk or sth. else I don't know exactly.
But mule may cause emacs start a little slowly. If you use Debian etch or sid, I strongly recommend you install emacs-snapshot:
  1. apt-get install emacs-snapshot-gtk
复制代码
which can handle chinese without installing any mule-*, and there's many things improved since version 21. You can also check out the source tree from Emacs's cvs reopsitory and build an emacs 22 for yourself(emacs-snapshot is version 22). However, there's a version 23 which, I think, is not as stable as version 22.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-1 06:37:49 | 显示全部楼层
Oh, I have try it out, but it seems that it doesn't work correctly, and I really dissatisfy its speed, so now I use vim to display Chinese text.
Buy the way, I don't know my system coding, locale shows en_US, and zhcon has installed.
回复 支持 反对

使用道具 举报

发表于 2006-6-1 15:12:44 | 显示全部楼层
you may look at this to speedup your emacs
http://www.linuxsir.cn/bbs/showt ... A%A0%E9%80%9F+emacs
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-1 16:31:45 | 显示全部楼层
Post by izzystar
在~/.emacs中写

(setq make-backup-files nil)

Does emacs have a default rc file? So I have no need to create different files for different users?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表