Книга: Learning GNU Emacs, 3rd Edition

4.7.4 Working with a List of Bookmarks

4.7.4 Working with a List of Bookmarks

Remember the buffer list we discussed earlier in this chapter? Bookmarks have a similar list with one-letter commands that allow you to work with all your bookmarks at once.

To work with a list of bookmarks, type C-x r l (the lowercase letter "L"). The *Bookmark List* buffer appears.

Type: C-x r l


Emacs displays a list of bookmarks and the path to the associated files.

If you press Enter, f, or j, Emacs displays the bookmarked file with the cursor in the bookmarked location. From the bookmark list, press d to mark bookmarks for deletion, then x to delete them (unlike in the buffer list, in the bookmark list, deleting is the only reason you need the x command). If you change your mind, press Del to remove the d before you press x. Pressing r renames a bookmark, and Emacs prompts you for the new name. To save all the bookmarks, press s. You can mark several bookmarks and then display their associated files by typing m next to the bookmarks. A > appears beside bookmarks you've marked. When you've marked all you want, type v (for view) and Emacs pulls up the files associated with the bookmarks and displays them in multiple windows (with the cursor at the bookmarked location, of course). If you just want to move to one bookmarked file, you can press v without marking the bookmark first.

You can change the display of the bookmark list slightly by pressing t. By default, the list shows a bookmark's name, followed by the complete path to the file with which it is associated. If you press t (for toggle), only the bookmark names appear.

Table 4-5 summarizes the bookmark list commands. It includes a few commands relating to annotations; we'll cover these in the next section.

Table 4-5. Commands for editing the bookmark list

Command Action
Enter, f, or j Go to the bookmark on the current line.
C-o or o Open the bookmark on the current line in another window; o moves the cursor to that window; C-o keeps the cursor in the current window.
d, C-d, or k Flag bookmark for deletion.
r Rename bookmark.
s Save all bookmarks listed.
m Mark bookmarks to be displayed in multiple windows.
v Display marked bookmarks or the one the cursor is on if none are marked.
t Toggle display of paths to files associated with bookmarks.
w In the minibuffer, display location of file associated with bookmark.
x Delete bookmarks flagged for deletion.
u Remove mark from bookmark.
Del Remove mark from bookmark on previous line or move to the previous line (if there is no mark).
q Exit bookmark list.
Space or n Move down a line.
p Move up a line.
l Load a bookmark file (other than the default).
A Display all annotations.
a Display annotation for current bookmark.
e Edit (or create) annotation for the current bookmark.

Оглавление книги


Генерация: 1.216. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз