Emacs bookmarks

来源:互联网 发布:军用软件关键性等级 编辑:程序博客网 时间:2024/05/02 02:50

Bookmarks provide a convenient way of marking your place in a file, a place you can easily return to

when you create a bookmark, Emacs creates a bookmark file in your home directory. called .emacs.bmk


Setting Bookmarks

C-x r m bookmark-set Emacs asks for a bookmark name, you can either press enter to accept default or type a bookmark name.


Moving to a Bookmark

C-x r b bookmark-jump type bookmark's name or type the first few letters and press Tab.


Renaming and Deleting Bookmarks

M-x bookmark-rename  Emacs prompts Old bookmark name first.

M-x bookmark-delete   delete the bookmark name you type.


书签指向的时文件的位置,而不是文件的内容,所以说不论你是在file中新加了数据还是删除了一些数据,当你打开的时候它都会指向原来定义时的位置。


move or rename file, what happens to its bookmarks现在就是相当与文件不存在了,如果这个时候你仍旧在Emacs中输入原file关联的书签,Emacs会报下面的错误,说文件已经不存在了,是否重新关联,然后你可以选y,在重新输入路径就行了,如果你选n就会提示下面第二条信息。

filename nonexistent. Relocate "bookmark name"? (y or n) 

Bookmark not relocated, consider removing it


working with a list of bookmarks

C-x r l 显示书签列表,然后的命令跟我们在输入C-x C-b 得到buffer list 进行处理的方式一样。


Annotating Bookmarks(加批注)

C-x r l -> type e ->里面默认提供一些带#的信息,只会在第二次显示的时候显示不带#的信息,最好把时间/作者前的#去掉 --> C-c C-c 保存

当你保存批注以后,书签表中相应的书签前面就多了一个*,你可以通过a 查看一个,A查看所有。


如何显示标注信息

只有在你跳到书签或者在书签表中a命令这两种方式可以进行标注查看。而你C-x C-f打开文件的话,不会显示标注。


其它书签的命令



Using Emacs's Bookmark Feature


原创粉丝点击