免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: flw
打印 上一主题 下一主题

有关 Emacs 使用技巧的内容请在这个帖子讨论。 [复制链接]

论坛徽章:
0
281 [报告]
发表于 2006-02-19 10:35 |只看该作者
原帖由 unixer2i 于 2006-2-18 21:35 发表

RT。 我在我自己的NTEMACS中根据说明设置了一个emacs face,但在重新启动时,无法正常使用。有什么方法能让它正常使用呢?


先看看你定义的 Face 是否被应用到文本上:

1. 把光标移到你认为是那个 Face 的文本上。
2. 按 M-: ,MiniBuffer 里会有 Eval: 的字样。
3. 输入 (text-properties-at (point)) RET 来检查文本属性是否是你需要的。

论坛徽章:
0
282 [报告]
发表于 2006-02-19 22:34 |只看该作者
原帖由 herberteuler 于 2006-2-19 10:35 发表


先看看你定义的 Face 是否被应用到文本上:

1. 把光标移到你认为是那个 Face 的文本上。
2. 按 M-: ,MiniBuffer 里会有 Eval: 的字样。
3. 输入 (text-properties-at (point))[/font ...



我在emacs的配置文件里发现原来的设置还在,退出后,在任何一个文本中试过了,没用。而且还查过了它的info文档,我只想做一个facemenu中的一个键绑定设置。保存后可以在以后使用中直接使用就行了。你是怎么做的?能否给个提示呀?

论坛徽章:
0
283 [报告]
发表于 2006-02-20 10:05 |只看该作者
原帖由 unixer2i 于 2006-2-19 22:34 发表



我在emacs的配置文件里发现原来的设置还在,退出后,在任何一个文本中试过了,没用。而且还查过了它的info文档,我只想做一个facemenu中的一个键绑定设置。保存后可以在以 ...


你定义的是什么 Face?请贴一下设置。如果文本的 Face 属性并不是你定义的,即使它生效了也无法被看到。先看看文本的 Face 属性:

eface.PNG (30.57 KB, 下载次数: 41)

Emacs Text Face

Emacs Text Face

论坛徽章:
0
284 [报告]
发表于 2006-02-20 20:40 |只看该作者

M-x customize RET faces group RET facemenu RET facemenu keybindings RET 想定义一个当前单词的高亮显示,如何定义呀?我看了下emacs中自带的说明文字:

  1. Alist of interesting faces and keybindings.  Hide
  2. Each element is itself a list: the car is the name of the face,
  3. the next element is the key to use as a keyboard equivalent of the menu item;
  4. the binding is made in `facemenu-keymap'.

  5. The faces specifically mentioned in this list are put at the top of
  6. the menu, in the order specified.  All other faces which are defined,
  7. except for those in `facemenu-unlisted-faces', are listed after them,
  8. but get no keyboard equivalents.

  9. If you change this variable after loading facemenu.el, you will need to call
  10. `facemenu-update' to make it take effect.
复制代码

如何定义才能生效呢?

论坛徽章:
0
285 [报告]
发表于 2006-02-20 22:36 |只看该作者
原来你说的是这个呀。C-h v facemenu-keybindings RET 就可以看到值了。使用方式是,打开一个没有 Font Lock 的文件,然后按 M-o 你定义的字母,就可以设置相应的 Face 了。不过,不同的版本里案件似乎不太一样,你可以使用 C-h f facemenu-set-... 来查询某一个 Face 的快捷键是什么。

论坛徽章:
0
286 [报告]
发表于 2006-02-21 17:10 |只看该作者
原帖由 herberteuler 于 2006-2-20 22:36 发表
原来你说的是这个呀。C-h v facemenu-keybindings RET 就可以看到值了。使用方式是,打开一个没有 Font Lock 的文件,然后按 M-o 你定义的字母,就可以设置相应的 Face 了。不过,不同的版本里案件似乎不太一样, ...


C-h v facemenu-keybindings RET看过了,

  1. facemenu-keybindings's value is
  2. ((default . "d")
  3. (bold . "b")
  4. (italic . "i")
  5. (bold-italic . "l")
  6. (underline . "u"))


  7. Documentation:
  8. Alist of interesting faces and keybindings.
  9. Each element is itself a list: the car is the name of the face,
  10. the next element is the key to use as a keyboard equivalent of the menu item;
  11. the binding is made in `[u]facemenu-keymap[/u]'.

  12. The faces specifically mentioned in this list are put at the top of
  13. the menu, in the order specified.  All other faces which are defined,
  14. except for those in `[u]facemenu-unlisted-faces[/u]', are listed after them,
  15. but get no keyboard equivalents.

  16. If you change this variable after loading facemenu.el, you will need to call
  17. `facemenu-update' to make it take effect.

  18. You can [u]customize[/u] this variable.

  19. Defined in `facemenu'.
复制代码

M-o 命令不好用。我用的是NTEMACS 21。3。1,才试过。

论坛徽章:
0
287 [报告]
发表于 2006-02-21 18:23 |只看该作者
Emacs 21.3 里是 M-g,呵呵

论坛徽章:
0
288 [报告]
发表于 2006-02-21 20:33 |只看该作者
原帖由 herberteuler 于 2006-2-21 18:23 发表
Emacs 21.3 里是 M-g,呵呵


试过了,M-g只能设置已经emacs中定义好的face,无法设置我想要的,刚才我才试过M-g o
Use face:
是在一个没有任何包含font-lock的文件中,自己随便写了一个。无法定义。RET后显示no match。真不知道如何设置了。

论坛徽章:
0
289 [报告]
发表于 2006-02-21 20:56 |只看该作者
你是怎么设置的?

论坛徽章:
0
290 [报告]
发表于 2006-02-22 10:47 |只看该作者
我的emacs一直都是只能显示英文
并且连中文输入法输入的汉字都是乱码
其它编辑器都可以显示的
请问该如何设置才可以显示汉字呢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP