Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1237328
  • 博文数量: 264
  • 博客积分: 10772
  • 博客等级: 上将
  • 技术积分: 2325
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-25 11:54
文章分类

全部博文(264)

文章存档

2012年(4)

2011年(51)

2010年(31)

2009年(57)

2008年(51)

2007年(70)

分类: LINUX

2007-08-17 21:42:01

Dired用正则表达示来匹配ls -l命令输出的文件名和目录名,
而日文locale的系统中ls -l的文件名和目录名前面有日文日期,日,月.所以和Dired所用的正则表达式不匹配,这样Dired就无法正常使用,无法打开文件也无法进入目录,
解决的办法是在shell中使用命令
export LC_ALL=C
这样的话就可以在本次对话中使用C locale,也就是ANSI C的locale,所对应的日期就变成了英文,
Dired也可以正常使用了
注:在emacs中调用Dired的命令是C-x d
Dired says, "no file on this line" when I try to do something.
==============================================================

   Chances are you're using a localized version of Unix that doesn't
use US date format in dired listings.  You can check this by looking at
dired listings or by typing `ls -l' to a shell and looking at the dates
that come out.

   Dired uses a regular expression to find the beginning of a file name.
In a long Unix-style directory listing (`ls -l'), the file name starts
after the date.  The regexp has thus been written to look for the date,
the format of which can vary on non-US systems.

   There are two approaches to solving this.  The first one involves
setting things up so that `ls -l' outputs US date format.  This can be
done by setting the locale.  See your OS manual for more information.

   The second approach involves changing the regular expression used by
dired, `dired-move-to-filename-regexp'.
阅读(857) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~