annotate etc/TUTORIAL.zh @ 50674:d0877472b39e

* xdisp.c (update_tool_bar): BLOCK_INPUT before calling tool_bar_items so GTK tool bar expose callback does not access items being updated.
author Jan Djärv <jan.h.d@swipnet.se>
date Wed, 23 Apr 2003 17:51:33 +0000
parents 173ef569a9e0
children 3b5f7614fdcc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1 您正在閱讀 Emacs 快速指南(Emacs tutorial)。請見頁尾條件。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
2 Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation.
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
3
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
4 Emacs 指令通常包含有 CONTROL 鍵(有時候以 CTRL 或 CTL 來標示)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
5 或是 META 鍵(有時候以 EDIT 或 ALT 來標示)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
6 為了避免每一次都要寫出其全名,我們將會使用下述的縮寫:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
7
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
8 C-<chr> 表示當鍵入字元 <chr> 時 按住 CONTROL 鍵。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
9 因此,C-f 就是:按住 CONTROL 鍵再鍵入 f。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
10 M-<chr> 表示當鍵入字元 <chr> 時 按住 META 或 EDIT 或 ALT 鍵。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
11 如果沒有 META、EDIT、或 ALT 鍵時,則可以用
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
12 「按一下 ESC 鍵然後放開,再鍵入 <chr> 的步驟」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
13 來作為替代。我們以 <ESC> 來表示 ESC 鍵。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
14
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
15 重要備忘錄:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
16 要離開 Emacs 作業階段(session),鍵入 C-x C-c (兩個字元)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
17 位在左側邊界的「>>」字元是讓您可以試著使用的指令的提示。舉例來說:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
18 <<Blank lines inserted here by startup of help-with-tutorial>>
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
19 >> 現在鍵入 C-v(View next screen)以移到下個螢幕。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
20 (試試看,鍵入字元 v 時,按住 CONTROL 鍵)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
21 從現在開始,您應該在每次閱讀完目前的螢幕時做一次這個動作。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
22
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
23 要注意的是,當您從一個螢幕移到另一個時,中間會有兩行重複;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
24 這樣做是為了提供一些連續性,讓您可以接續地閱讀文字。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
25
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
26 您需要知道的第一件事是如何在文字中移動。您已經知道了可以 C-v
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
27 來向前移動一個螢幕。要向後移動一個螢幕,則鍵入 M-v
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
28 (按住 META 鍵,然後鍵入 v,或是如果您沒有 META、EDIT、或 ALT 鍵
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
29 時鍵入 <ESC>v)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
30
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
31 >> 試著鍵入 M-v 然後 C-v,連續個幾次。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
32
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
33 【現在您可以 C-v 指令移到後面「翻譯」一節,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
34 以取得關於本文的翻譯相關事項;然後以 M-v 指令回到這裡。】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
35
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
36
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
37 * 摘要(SUMMARY)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
38 -----------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
39
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
40 以下的指令在檢閱螢幕時相當有用:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
41 【我們現在以「螢幕」來表示「顯示檔案內容的區域」,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
42 因為目前是處在 Emacs 中的單窗格(window)顯示狀態,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
43 如果是在多窗格的狀態下,這裡所介紹的指令則作用在「工作中的窗格」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
44 有關於窗格的介紹,請見窗格(windows)一節。】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
45
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
46 C-v 向前移動一個螢幕/窗格
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
47 M-v 向後移動一個螢幕/窗格
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
48 C-l 清除螢幕/窗格,再重新顯示所有文字,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
49 游標所在位置會顯示於螢幕/窗格的中央。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
50 (是 CONTROL-L 而不是 CONTROL-1)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
51
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
52 >> 找出游標的位置,並注意其附近的文字為何。然後鍵入 C-l。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
53 再次找出游標的位置,確認一下相同的文字現在也位在其附近。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
54
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
55
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
56 * 基本的游標控制(BASIC CURSOR CONTROL)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
57 ----------------------------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
58
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
59 螢幕到螢幕的移動是很有用,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
60 但是您如何移動到位於螢幕內文字中的特定位置呢?
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
61
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
62 有幾種方式可以進行。最基本的方法是使用指令 C-p、 C-b、 C-f、和 C-n。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
63 每一個指令都將游標移往某個特定的方向。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
64 下表所示的是這四個指令和它們所移動的方向:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
65
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
66 前一行 C-p
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
67 :
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
68 :
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
69 向後移 C-b .... 目前游標位置 .... 向前移 C-f
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
70 :
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
71 :
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
72 後一行 C-n
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
73
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
74 >> 以 C-n 或 C-p 將游標移到圖形的中央。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
75 鍵入 C-l 會看到整個圖形顯示在螢幕的中央。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
76
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
77 您應該會發現用字母來想這些很容易:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
78 P 表示 previous、N 表示 next、B 表示 backward、而 F 則表示 forward。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
79 這些就是基本的游標定位(positioning)指令,您將「總是」用到它們,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
80 所以現在就把它們記下來對您會很有用的。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
81
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
82 >> 按幾次 C-n 把游標往下移動到這行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
83
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
84 >> 按幾次 C-f 往前移到這行,然後再以 C-p 往後移動。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
85 看看當游標在本行中央時,C-p 的動作是怎樣。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
86
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
87 每一個文字行都以一個 Newline 字元作為結束,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
88 它是用來與下一行作為分別。在您檔案中的最後一行應該要有一個 Newline
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
89 來作為結束(但是 Emacs 並不一定需要它來編輯檔案)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
90
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
91 >> 試著在一行開始的地方鍵入 C-b 。結果應該會移動到前一行的最後面。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
92 這是因為它往後移動時越過了 Newline 字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
93
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
94 C-f 也可以和 C-b 一樣地越過 Newline 字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
95 【Newline 字元是「不可見(invisible)字元」,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
96 在編輯器中一般看不到它,這裡只是告訴您:在行首再往前走,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
97 那麼游標會跑到前一行(如果有前一行的話);在行尾再往後走,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
98 那麼游標會跑到後一行(如果有後一行的話)。「越過 Newline 字元」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
99 會讓游標跑到另外一行。】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
100
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
101 >> 多按幾次 C-b,自己感覺一下游標在哪。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
102 然後按幾次 C-f 回到這行的尾巴。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
103 再按一次 C-f 就可以移到下一行了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
104
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
105 當您移動游標穿越螢幕的上方或下方時,在邊界外的文字會移位進入螢幕內。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
106 這稱為「捲動」。它讓 Emacs 可以將游標移動到文字中的任意特定位置,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
107 同時(游標)不會跑出螢幕外。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
108
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
109 >> 試著以 C-n 將游標越過螢幕下方,然後看看發生了什麼事。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
110
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
111 如果一個字元一個字元地移動太慢的話,您可以一個字一個字地移動。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
112 M-f (META-f) 往前移動一個字,M-b 則往後移動一個字。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
113 【對中文來說,則是移動到下一個或下一個標點符號的所在。】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
114
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
115 >> 鍵入一些 M-f 和 M-b。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
116
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
117 當您在一個字的中間時,M-f 會移動到這個字的尾巴。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
118 當您在字與字間的空白時,M-f 會移動到下一個字的尾巴。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
119 M-b 的效果相似,只是方向不同。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
120
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
121 >> 按幾次 M-f 和 M-b,中間夾雜一些 C-f 和 C-b,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
122 這樣子您就可以觀察 M-f 和 M-b 在各種「位在字間或字元間」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
123 的不同位置,所表現出來的行為。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
124
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
125 請注意 C-f、C-b 和 M-f、M-b 兩對之間的相似性。「經常」的狀況是:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
126 META 字元是用來作為與「以語言定義出的單位(字、句子、段落)」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
127 有關的操作,而 CONTROL 字元則是作用在
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
128 「與您所編輯無關的『基本』單位(字元或行等)」上。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
129
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
130 這個相似性在「行與句子」之間也同樣適用:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
131 C-a 和 C-e 會將游標移動到「一行」的 開始和結尾處,而
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
132 M-a 和 M-e 則將游標移動到「一句」的 開始和結尾處。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
133
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
134 >> 試著按兩次 C-a,再按兩次 C-e。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
135 試著按兩次 M-a,再按兩次 M-e。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
136
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
137 看一下為什麼重複的 C-a 指令會沒有作用,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
138 而重複的 M-a 指令則繼續移動到下一個句子。雖然這並不能說是完全類比,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
139 但是其中每個指令的行為看起來都十分自然。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
140
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
141 游標在文字中的位置也可以稱作「點位(point)」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
142 簡單來說就是:游標表現出螢幕中「點位」所在的文字位置。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
143
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
144 這裡是一些簡單「游標移動(cursor-moving)操作」的整理,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
145 其中也包括了「字和句」的移動指令:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
146
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
147 C-f 往前移動一個字元
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
148 C-b 往後移動一個字元
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
149
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
150 M-f 往前移動一個字【中文是移動到上一個標點符號】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
151 M-b 往後移動一個字【中文是移動到下一個標點符號】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
152
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
153 C-n 移動到下一行
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
154 C-p 移動到前一行
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
155
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
156 C-a 移動到行首
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
157 C-e 移動到行尾
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
158
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
159 M-a 移回句首
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
160 M-e 移到句尾
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
161
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
162 >> 練習幾次這些指令。這些都是最常使用到的指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
163
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
164 還有兩個重要的游標動作(cursor-motion)指令,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
165 M-<(META Less-than),移動到文字的最開始,以及
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
166 M->(META Greater-than),移動到文字的最後。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
167
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
168 在大部份的終端機,「<」是在 comma 上方,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
169 所以您必須要使用 shift 鍵來鍵入。在這些終端機上,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
170 您必須使用 shift 鍵來鍵入 M-<;沒有使用 shift 鍵,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
171 您就變成鍵入 M-comma 了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
172
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
173 >> 現在試一下 M-< ,移到本快速指南的最開始。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
174 然後再重複地使用 C-v 回到這裡。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
175
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
176 >> 現在試一下 M-> ,移到本快速指南的最後。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
177 然後再重複地使用 M-v 回到這裡。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
178
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
179 如果您的終端機有方向鍵的話,您也可以用方向鍵移動游標。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
180 我們有三個理由建議您學習 C-b、C-f、C-n、和 C-p:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
181 (1) 任何的終端機都能使用。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
182 (2) 一旦您使用 Emacs 相當熟練了,您會發現鍵入這些 CONTROL 字元,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
183 比起使用方向鍵快多了(因為您不需要將手移開打字區)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
184 (3) 一旦您使用這些 CONTROL 字元指令成為習慣,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
185 您也可以很容易地學會其他進階的游標動作指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
186
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
187 大部份的 Emacs 指令接受數字參數;對大部份的指令而言,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
188 它的作用是指定重複次數。您要指定一個指令的重複次數的作法是:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
189 先鍵入 C-u,然後在您鍵入指令前,鍵入代表重複次數的數位。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
190 如果您有一個 META(或 EDIT 或 ALT)鍵,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
191 那麼您還有另外一個替代作法來輸入數字參數:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
192 按住 META 鍵時打入這數字。我們建議您學習 C-u 的方法,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
193 因為它在任何終端機都可以使用。此一數字參數也稱作為「字首參數」,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
194 因為您在這參數所作用到的指令前鍵入它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
195
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
196 舉例來說, C-u 8 C-f 向前移動 8 個字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
197
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
198 >> 試著以一個數字參數來使用 C-n 或 C-p,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
199 只一個指令就將游標移動到這行的附近。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
200
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
201 大部份的指令使用數字參數來作為其重複次數,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
202 但是其中有些指令則是作為其他用途。有幾個指令(目前您尚未學到)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
203 將它作為旗標--以一個字首參數的型態出現,而不管其值為何,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
204 它們讓這指令做些不一樣的事。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
205
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
206 C-v 和 M-v 則是另一類的例外。當給定一個參數時,它們捲動
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
207 「所指定的數量的行(以行為單位)」,而不是以「螢幕」為單位捲動。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
208 舉例來說,C-u 8 C-v 將顯示螢幕捲動 8 行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
209
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
210 >> 現在試著鍵入 C-u 8 C-v。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
211
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
212 這指令應該已經將螢幕向上移了 8 行。若您想將它再次地向下捲動,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
213 您可以在執行 M-v 時給定一個參數。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
214
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
215 如果您正在使用 X 視窗系統,在 Emacs 視窗左手側應該有一個稱為
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
216 「捲動軸」的長方型區域。您可以用滑鼠在捲動軸按一下來捲動文字。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
217
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
218 >> 試著在「捲動軸內反白區域上」壓一下中間鈕。這應該會將文字捲動到
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
219 「由您所按一下滑鼠的地方」所決定的位置。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
220
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
221 >> 當按住中間時,試著將滑鼠上下移動。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
222 您會看到文字隨著您移動滑鼠而上下移動。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
223
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
224
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
225 * 當 EMACS 發呆時(WHEN EMACS IS HUNG)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
226 ---------------------------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
227
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
228 如果 Emacs 停止回應您的指令,您可以鍵入 C-g 來安全地停止它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
229 您也可以使用 C-g 來停止執行過久的指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
230
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
231 您也可以使用 C-g 來取消數字參數或您不想要完成的指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
232
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
233 >> 鍵入 C-u 100 以設定一個 100 的數字參數,然後鍵入 C-g。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
234 現在鍵入 C-f。它應該只會移動一個字元,因為您已經以 C-g
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
235 取消了參數。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
236
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
237 如果您已經不小心地鍵入一個 <ESC>,您可以 C-g 來取消它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
238
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
239
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
240 * 無效化的指令(DISABLED COMMANDS)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
241 -----------------------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
242
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
243 有一些 Emacs 指令被「無效化」了,因此初學者不會意外地使用到它們。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
244
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
245 如果您鍵入了某一個無效化的指令,Emacs 會顯示一個訊息,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
246 說明這個指令是什麼,並且詢問您是否想要繼續,然後執行這指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
247
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
248 如果您真的想要試一下這個指令,那麼在當 Emacs 詢問您時,請鍵入空白。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
249 一般來說,如果您不想要執行這個無效化的指令,請以『n』來回答它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
250
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
251 >> 鍵入 C-x C-l (這是個無效化的指令)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
252 然後鍵入 n 來回答問題。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
253
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
254
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
255 * 窗格(WINDOWS)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
256 -----------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
257
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
258 Emacs 可以有數個窗格,每一個顯示它自己的文字。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
259 我們在稍後會解釋如何使用多重窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
260 現在我們想要解釋如何除去多餘的窗格,然後回到基本的單窗格編輯。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
261 它很簡單:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
262
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
263 C-x 1 One window (即,除去其他所有的窗格)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
264
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
265 那是個 CONTROL-x 後面跟著數字 1。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
266 C-x 1 將含有游標的窗格擴大到整個螢幕。它將所有其他的窗格除去。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
267
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
268 >> 移動游標到本行並且鍵入 C-u 0 C-l。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
269 >> 鍵入 CONTROL-h k CONTROL-f。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
270 看看這個窗格在當一個新的窗格出現
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
271 (以顯示有關 CONTROL-f 指令的文件時),它是如何縮小的。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
272
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
273 >> 鍵入 C-x 1 以使文件列表窗格消失。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
274
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
275 這個指令並不像您先前所學過的指令那般,它包括了兩個字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
276 它是以字元 CONTROL-x 作為開始。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
277 有一整個系列的指令是以 CONTROL-x 作為開始;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
278 它們之中有許多是與「窗格、檔案、暫存區以及相關事物」有關的。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
279 這些指令有 2、3 或 4 個字元長。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
280
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
281
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
282 * 插入與刪除(INSERTING AND DELETING)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
283 --------------------------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
284
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
285 如果您想要插入文字,把它鍵入就是了。您可以看到的字元,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
286 像是 A, 7, *, 等,被 Emacs 視為文字並且可以直接插入。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
287 鍵入 <Return>(carriage-return 鍵)以插入一個 Newline 字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
288
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
289 您可以鍵入 <Delete> 以刪除您最後鍵入的字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
290 <Delete> 是一個標示為「Del」的鍵盤鍵。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
291 在某些情形下,「Backspace」鍵的作用如同 <Delete>,但不總是如此!
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
292
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
293 更一般地說,<Delete> 將位於目前游標位置前一個字元加以刪除。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
294
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
295 >> 現在做--鍵入一些字元,然後鍵入幾次 <Delete> 來刪除它們。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
296 不要擔心這個檔案會被更動;您不會影響到原來的快速指南。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
297 (您現在看到的)這一個是您的個人拷貝。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
298
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
299 當一行文字變得比「在窗格中的一行」長時,這一行文字會「接續」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
300 到第二行窗格行。這時一個反斜線「\」(或如果您使用視窗化的顯示,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
301 則是一個小小彎彎的箭頭)會位在其右邊界以指出此行接續著。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
302
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
303 >> 插入文字,一直到您達到右邊界,然後再繼續插入。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
304 您會看到一個接續行出現。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
305
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
306 >> 使用 <Delete> 刪除一些文字,直到此行再次成為一個窗格行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
307 接續行消失了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
308
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
309 您可以像刪除其他字元一樣地刪除 Newline 字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
310 將位在兩行中的 Newline 字元刪除會讓它們合併成為一行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
311 如果合併的結果使這一行太長,以致無法符合窗格的寬度,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
312 它會以一個接續行來顯示。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
313
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
314 >> 移動游標到本行的開頭並鍵入 <Delete>。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
315 這會將本行與其前一行結合為一行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
316
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
317 >> 鍵入 <Return> 以重新插入您剛才刪除的 Newline 字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
318
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
319 記得大部份的 Emacs 指令都可以給予一個重複計數(repeat count);
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
320 這也包括了文字字元。重複一個文字字元會將它插入數次。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
321
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
322 >> 現在就試一下--鍵入 C-u 8 * 以插入 ********。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
323
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
324 您現在已經學到了「鍵入個什麼東西進 Emacs 以及修正錯誤」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
325 的大部份基本方法。您也可以「以字或行為單位」地刪除。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
326 這裡有份關於「刪除操作」的摘要:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
327
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
328 <Delete> 刪除游標所在的 前一個字元
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
329 C-d 刪除游標所在的 後一個字元
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
330
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
331 M-<Delete> 刪除游標所在的 前一個字
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
332 M-d 刪除游標所在的 後一個字
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
333
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
334 C-k 刪除從游標所在到「行尾」間的字元
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
335 M-k 刪除從游標所在到「句尾」間的字元
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
336
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
337 注意「<Delete> 和 C-d」還有「M-<Delete> 和 M-d」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
338 是平行地自 C-f 和 M-f 擴充出來的
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
339 (嗯,<Delete> 並不是控制字元,但是沒什麼好擔心的)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
340 C-k 和 M-k 在某種程度上與 C-e 和 M-e 一樣,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
341 如果把「一行」和「一句」作為類比的話。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
342
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
343 您也可以只以一種方法來刪除緩衝區內的任何部份,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
344 先移動到您想要刪除的部份的一端,然後鍵入 C-@ 或 C-SPC
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
345 (任一個即可)。(SPC 指的是 Space Bar。)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
346 再移到那部份的另一端,接著鍵入 C-w。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
347 這樣就會把介於這兩個位置間的所有文字刪除。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
348
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
349 >> 移動游標到上一段開頭的「您」字。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
350 >> 鍵入 C-SPC。 Emacs 應該會在螢幕的下方顯示一個「Mark set」訊息。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
351 >> 移動游標到第二行中的「端」字。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
352 >> 鍵入 C-w。這樣會把從「您」開始到剛好「端」之前的文字刪除。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
353
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
354 要注意的是「殺掉(killing)」和「刪除(deleting)」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
355 的不同在於被殺掉的可以拉回,而被刪除的則不能。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
356 【有點難以理解,您可以這麼想:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
357 (1) 「被殺掉的」尚存尸骨,而「被刪除的」則尸骨無存了!
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
358 可見得對電腦資料來說,「刪除」比「殺掉」嚴重多了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
359 (2) 實際上,就算被刪除了,我們還是有技術可以把它救回來,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
360 尤其是文字資料,前提是刪除後不能進行實體記憶體的格式化動作。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
361 但這對於一般使用者而言是不可能的,因此就不考慮這情形了。】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
362 重新插入被殺掉的文字稱為「拉回(yanking)」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
363 一般而言,可以移除掉很多文字的指令會把那些文字儲存起來
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
364 (它們設定成您可以將文字拉回),
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
365 而那些只是刪除一個字元或者空白行或空白的指令,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
366 則不會儲存這些被刪除的文字(因此您不能將那文字拉回)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
367
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
368 >> 移動游標到一非空白行的開始。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
369 然後鍵入 C-k 殺掉在那一行上的文字。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
370 >> 第二次鍵入 C-k。您將會看到它殺掉跟在那一行後面的 Newline 字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
371
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
372 請注意單獨的 C-k 會把一行的內容殺掉,而第二個 C-k
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
373 則會殺掉那一行本身,並且使得所有其他的行向上移動。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
374 C-k 以很特別的方式來處理數字參數,它會殺掉很多行以及它們的內容,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
375 這不僅僅是重複而已,C-u 2 C-k 會把兩行以及它們的 Newline 字元殺掉;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
376 如果只是鍵入 C-k 兩次並不會這樣。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
377
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
378 將被殺掉的文字回復的動作稱為「拉回(yanking)」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
379 (把它想像成您把別人從您身上奪去的東西猛力地拉回來)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
380 您可以在您刪除文字的地方拉回,也可以在文字的其他地方拉回。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
381 您可以拉回數次以製作它的數份拷貝。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
382
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
383 拉回的指令為 C-y。它會在目前游標的位置重新插入最後殺掉的文字。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
384
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
385 >> 試試看;鍵入 C-y 將文字拉回。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
386
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
387 如果您連續地做了數次 C-k,所有被殺掉的文字都會被儲存在一起,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
388 因此做一次 C-y 就會把所有這些行都拉回來。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
389
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
390 >> 現在做一下,鍵入 C-k 數次。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
391
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
392 現在要回復那些殺掉的文字:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
393
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
394 >> 鍵入 C-y。然後把游標往下移動個幾行,再一次鍵入 C-y。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
395 您現在知道如何複製某些文字了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
396
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
397 如果您有一些文字想要拉回來,但是後來您又殺了某些東西,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
398 那麼該怎麼做呢?C-y 會把最近殺掉的拉回來,但是先前的文字並沒有消失,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
399 您可以用 M-y 來回到它。當您已經使用 C-y 把最近殺掉的拉回來之後,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
400 再鍵入 M-y 來把這些拉回來的文字替換為先前所殺掉的。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
401 一次又一次地鍵入 M-y 會把先前再先前所殺掉的文字帶回來。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
402 當您到了您想找的文字時,您不需要做任何事來保存它,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
403 只要繼續您的編輯,把這些已拉回的文字留在那裡就好。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
404
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
405 如果您 M-y 做了很多次,您可能會回到起始點,也就是最近殺掉的。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
406
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
407 >> 殺掉一行,到處繞繞,再殺掉另一行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
408 然後用 C-y 將第二次殺掉的那行帶回來。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
409 然後再用 M-y,它將會被第一次殺掉的那行取代。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
410 再做幾次 M-y 看看您會得到什麼。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
411 不間斷地做,直到第二個殺掉行回來,再做個幾次。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
412 如果您想的話,您可以試著給 M-y 正的或是負的參數。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
413
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
414
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
415 * 取消動作(UNDO)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
416 ------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
417
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
418 如果您對文字做了一些改變,後來覺得它是個錯誤,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
419 您可以 Undo 指令取消這一個改變,C-x u。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
420
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
421 通常 C-x u 會把一個指令所造成的改變取消掉;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
422 如果您在一行中重複了許多次 C-x u,每一個重複都會取消額外的指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
423
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
424 但是有兩個例外:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
425 (1) 沒有改變文字的指令不算(這包括了游標移動的指令還有捲軸指令);
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
426 (2) 自行鍵入的字元以一群一群--每群最多 20 個--來進行處理。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
427 (這是為了減少您在取消「插入文字動作」所必須鍵入 C-x u 的次數)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
428
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
429 >> 以 C-k 將這一行殺掉,然後鍵入 C-x u 後它會再次出現。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
430
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
431 C-_ 是另一個取消指令;它的作用就和 C-x u 一樣,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
432 但是在一行中它比較容易鍵入許多次。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
433 C-_ 的缺點是在某些鍵盤中不太清楚如何鍵入它,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
434 這也是為什麼我們同時提供 C-x u 的原因。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
435 在某些終端機,您可以按住 CONTROL 再鍵入 / ,來鍵入 C-_。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
436
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
437 一個數字參數對 C-_ or C-x u 來說,是作為重複的次數。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
438
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
439
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
440 * 檔案(FILE)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
441 --------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
442
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
443 為了使您編輯的文字永久保存,您必須把它放到一個檔案中。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
444 不然,當您離開 Emacs 後,它就會隨之消失。為了把您的文字放在檔案中,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
445 您必須在您鍵入這些文字前「找(find)」檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
446 (這也稱之為「拜訪(visiting)」檔案)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
447
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
448 找一個檔案表示您可以在 Emacs 中看到檔案的內容。從許多方面來看,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
449 它就像是您直接編輯那個檔案一樣。然而,直到您「儲存」這個檔案之前,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
450 您使用 Emacs 編輯所做出的改變並不會保存下來。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
451 這就是為什麼當您不想要時,您可以避免留下修改到一半的檔案在系統中。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
452 即使當您儲存了,Emacs 也會把原本的檔案以一個不同的名稱保留下來,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
453 若您稍後覺得您的改變是一個錯誤的話,就可以使用它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
454
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
455 在靠近螢幕的下方,您可以看到由破折號開始與結束的一行--
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
456 通常是以「--:-- TUTORIAL.zh」或其他類似的東西作為開始。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
457 這是螢幕的一部分,通常用來表示您正在拜訪的檔案。現在,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
458 您正在拜訪的檔案叫做「TUTORIAL.zh」,它是您個人的拷貝。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
459 當您以 Emacs 找出一個檔案時,那個檔案的名字就會出現在那個地方。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
460
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
461 關於尋找檔案的指令中,有一個很特別的是,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
462 您必須說出這個您想要的檔案名稱。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
463 我們說這個指令「從終端機中讀進了一個參數」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
464 (在這個例子中,這參數就是檔案的名稱)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
465 當您鍵入這個指令後,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
466
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
467 C-x C-f 找一個檔案
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
468
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
469 Emacs 會要您鍵入檔名。您所鍵入的檔名會出現在螢幕的底行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
470 在被用來作為這種形式的輸入時,底行被稱為小緩衝區(minibuffer)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
471 您可以使用正常的 Emacs 編輯指令來編輯這個檔名。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
472
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
473 當您正在鍵入檔名時(或是任何的小緩衝區輸入時),
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
474 您可以用 C-g 這個指令來取消它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
475
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
476 >> 鍵入 C-x C-f,然後鍵入 C-g。這會取消小緩衝區,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
477 並且也會取消使用這個小緩衝區的 C-x C-f 指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
478 因此您沒有找任何檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
479
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
480 當您已經鍵入了這個檔名,請鍵入 <Return> 來結束它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
481 然後 C-x C-f 指令就會開始運作,並且找到您所選擇的檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
482 小緩衝區在當 C-x C-f 指令結束時就會消失。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
483
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
484 過了一會兒,檔案的內容就會出現在螢幕,然後您就可以編輯它的內容。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
485 當您想要您的改變永久保存時,鍵入這個指令:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
486
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
487 C-x C-s 儲存這個檔案
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
488
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
489 這會把在 Emacs 中的文字複製到檔案中。當您第一次做這個動作時,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
490 Emacs 會將原始的檔案重新命名成一個新的名字,這樣它才不會消失。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
491 新的名字通常會加入「~」到原始檔案的名字後面。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
492
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
493 當儲存結束時,Emacs 會把寫入檔案的名字列出來。您應該經常地進行儲存,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
494 這樣子如果系統當機時,您就不會損失太多工作。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
495
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
496 >> 鍵入 C-x C-s 以儲存本快速指南的您的拷貝。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
497 這會把「Wrote ...TUTORIAL.zh」這個訊息顯示在螢幕的下方。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
498
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
499 注意:在某些系統中,鍵入 C-x C-s 將會把螢幕凍結,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
500 您將看不到從 Emacs 來的任何輸出。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
501 這表示作業系統一個稱為「流程控制」的「功能」將 C-s 指令攔截住,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
502 並且不讓它傳到 Emacs。要取消螢幕的凍結,請鍵入 C-q。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
503 然後到 Emacs 使用手冊中看看對於「漸進式搜尋的同時進入
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
504 (Spontaneous Entry to Incremental Search)」這個主題,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
505 以取得處理這個「功能」的建議。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
506
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
507 您可以找出一個已經存在的檔案,然後觀看它或編輯它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
508 您也可以找一個還沒有存在過的檔案。這是以 Emacs 建立一個檔案的方法:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
509 找這個檔案,就從零開始,然後開始插入文字到這個檔案中。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
510 當您要求「儲存」這個檔案,Emacs 會真的建立一個檔案,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
511 並把您所插入的文字擺到檔案中。從那時候開始,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
512 您就可以當自己是在編輯一個已經存在的檔案了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
513
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
514
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
515 * 緩衝區(BUFFER)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
516 ------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
517
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
518 如果您以 C-x C-f「找」第二個檔案,第一個檔案仍然存在 Emacs 內。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
519 要切換回它,您可以 C-x C-f 再找它一次。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
520 依此方式,您可以在 Emacs 內開啟不少檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
521
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
522 >> 以鍵入 C-x C-f foo <Return> 的方式建立一個名為「foo」的檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
523 然後插入一些文字,編輯它,然後再以 C-x C-s 儲存「foo」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
524 最後,鍵入 C-x C-f TUTORIAL.zh <Return> 回到本快速指南。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
525
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
526 Emacs 儲存每個檔案的文字在一個稱為「緩衝區(buffer)」的物件中。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
527 找一個檔案會在 Emacs 內部建立一個緩衝區。想要看目前存在您的 Emacs
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
528 的工作中緩衝區列表,鍵入
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
529
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
530 C-x C-b 列出緩衝區
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
531
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
532 >> 現在就試一下 C-x C-b
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
533
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
534 看看每一個緩衝區是如何命名的,它也可能同時擁有一個
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
535 「儲存其內容的檔案」的名稱。有一些緩衝區則沒有其對應的檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
536 舉例來說,命名為「*Buffer List*」的緩衝區並沒有任何檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
537 它是 C-x C-b 這個指令所建立出來的包含「緩衝區列表內容」的緩衝區。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
538 您在一個 Emacs 窗格所見到的「任何」文字都是某個緩衝區的一部份。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
539
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
540 >> 鍵入 C-x 1 以離開緩衝列表
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
541
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
542 如果您對檔案中的文字做了修改,然後找另一檔案,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
543 這個動作並不會儲存第一個檔案。它的修改仍舊存在 Emacs 中,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
544 也就是在那個檔案的緩衝區中。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
545 對於第二個檔案的建立或編輯並不會影響到第一個檔案的緩衝區。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
546 這樣子非常有用,但這個情形也表明了您需要「一個方便的方法」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
547 來儲存第一個檔案的緩衝區。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
548 只是為儲存第一個檔案就必須以 C-x C-f 切換緩衝區,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
549 才能以 C-x C-s 將它儲存,總是個讓人討厭的過程。因此我們有
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
550
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
551 C-x s 儲存一些緩衝區
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
552
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
553 C-x s 會詢問您關於您已做出修改但還沒儲存的每一個緩衝區。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
554 它會問您,對於每一個這樣的緩衝區,是否要儲存?
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
555
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
556 >> 插入一行文字,然後鍵入 C-x s。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
557 它應該會問您是否要儲存名為 TUTORIAL.zh 的緩衝區。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
558 鍵入『y』以回答要儲存。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
559
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
560
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
561 * 擴充指令集(EXTENDING THE COMMAND SET)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
562 -----------------------------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
563
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
564 由於 Emacs 擁有太多指令,即便使用上所有的 CONTROL 和 META 字元,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
565 也沒辦法完全擺上。Emacs 以 X(擴充『eXtend』)指令來解決這個問題。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
566 擴充指令有兩種型式:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
567
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
568 C-x 字元擴充。後面跟著一個字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
569 M-x 有名稱的指令擴充。後面跟著一個長的名稱。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
570
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
571 還有一些指令通常來說是很有用的,但是比您已經學到的指令較少使用。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
572 您已經看過其中兩個:檔案指令中的 C-x C-f 去尋找,以及 C-x C-s 去儲存。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
573 其他的例子則有結束 Emacs 階段的指令--這個指令是 C-x C-c。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
574 (不要擔心您會失去已經做出的改變,C-x C-c 在它殺掉 Emacs
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
575 之前會提供儲存每一個變動的檔案的機會。)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
576
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
577 C-z 是 *暫時* 離開 Emacs 的指令--
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
578 因此您稍後可以回到同樣的 Emacs 階段。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
579
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
580 在某些允許它的作用的系統中, C-z 會「暫停住(suspends)」Emacs,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
581 也就是說,它會回到 shell 但不會把 Emacs 毀掉。在最常用的 shell 中,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
582 您可以用『fg』或『%emacs』兩種指令恢復 Emacs。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
583
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
584 在沒有提供暫停功能的系統中,C-z 會在 Emacs 底下建立一個 subshell
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
585 以讓您有機會執行其他的程式,並且在稍後回到 Emacs,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
586 它並沒有真的離開 Emacs。在這個例子中,shell 指令『exit』是從
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
587 subshell 回到 Emacs 的通常方式。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
588
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
589 使用 C-x C-c 的時機是當您打算要登出時。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
590 它也非常適合用來離開被其他郵件處理程式,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
591 以及許多不同的應用程式所啟動的 Emacs。然而在一般的狀況下,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
592 如果您不打算登出,最好是把 Emacs 暫停而不是離開它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
593
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
594 有許多 C-x 的指令。這裡是一份您已經學過的列表:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
595
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
596 C-x C-f 找檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
597 C-x C-s 儲存檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
598 C-x C-b 列出緩衝區。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
599 C-x C-c 離開 Emacs。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
600 C-x 1 除了一個外,刪去其他所有的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
601 C-x u 取消動作。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
602
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
603 以擴充來命名的指令通常是不太常使用的指令,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
604 或是只在特定的模式下才會使用的指令。一個例子是取代字串指令,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
605 它會全域地將一個字串以另一個來取代。當您鍵入 M-x 時,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
606 Emacs 會在螢幕的底端詢問您,然後您也應該鍵入這個指令的名稱。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
607 在這個例子中是『replace-string』只要鍵入『repl s<TAB>』,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
608 然後 Emacs 將會補齊這個名稱。以 <Return> 來結束這個指令名稱。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
609
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
610 取代字串指令需要兩個參數--被取代的字串以及用來取代它的字串。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
611 您必須以 Newline 字元來結束每一個參數。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
612
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
613 >> 將游標移到本行的下兩行空白,然後鍵入
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
614 M-x repl s<Return>changed<Return>altered<Return>。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
615
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
616 【為了說明的目的,於下保留一行原文。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
617 Notice how this line has changed: you've replaced... 】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
618
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
619 請注意這一行是怎麼改變的:在游標的起始位置之後,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
620 您已經將 c-h-a-n-g-e-d 這個字--不管它在哪裡出現--
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
621 以「altered」這個字來取代了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
622
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
623
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
624 * 自動存檔(AUTO SAVE)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
625 -----------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
626
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
627 當您在一個檔案中做了修改,但是還沒有將它們儲存起來,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
628 那麼如果您的電腦當機,它們將有可能遺失。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
629 為了避免這種情形發生在您的身上,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
630 Emacs 會定期地將您正在編輯的檔案寫入「自動儲存」檔案中。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
631 自動儲存檔案在檔名的前後會各有一個 # 符號;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
632 舉例來說,如果您的檔案名為「hello.c」,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
633 那麼它的自動儲存檔案的檔名就是「#hello.c#」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
634 當您以平常的方式儲存檔案時,Emacs 就會把它的自動儲存檔刪除。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
635
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
636 如果當機,您可以經由正常地尋找檔案,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
637 (指的是您在編輯的檔案而不是自動儲存檔)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
638 然後鍵入 M-x recover file<Return> 來回復您的自動儲存檔。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
639 當它要求確認時,鍵入 yes<Return> 以繼續並回復自動儲存的資料。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
640
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
641
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
642 * 回應區(ECHO AREA)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
643 ---------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
644
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
645 如果 Emacs 見到您很慢地鍵入多字元指令,它會將它們顯示在位於窗格下方,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
646 稱為「回應區」的區域給您參閱。回應區位在窗格的最後一行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
647
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
648
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
649 * 狀態行(MODE LINE)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
650 ---------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
651
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
652 位在回應區的正上面是稱為「狀態行」的一行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
653 狀態行顯示出一些資訊,如:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
654
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
655 --:** TUTORIAL.zh (Fundamental)--L670--58%----------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
656
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
657 本行提供一些關於「Emacs 的狀態」以及「您正在編輯的文字」的有用資訊。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
658
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
659 您已經知道檔名的意義是什麼了--就是您找的檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
660 -NN%-- 指出目前您在文字檔中的位置;它的意思是說:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
661 有 NN 百分比的文字位在窗格的上面。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
662 如果檔案的頂端就位在窗格中,那麼它就會顯示 --Top-- 而不是 --00%--。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
663 如果檔案的底部就位在窗格中,那麼它是顯示 --Bot--。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
664 如果您正在看的文字檔很小,在窗格中就足以看到全部的內容,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
665 那麼狀態行就會顯示 --All--。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
666
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
667 L 和數字以另一種方式來表示出位置:它們給出了目前所在的行數(Line)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
668
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
669 在靠近前面的星號表示您已經對這些文字做了改變。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
670 在您剛拜訪或儲存一個檔案之後,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
671 狀態行的那個部分會沒有星號,只有破折號。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
672
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
673 狀態行中位於小括弧裡面的部分,是用來告訴您正在使用什麼編輯模式。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
674 預設的模式是 Fundamental,也就是您現在使用的。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
675 它是「主模式」的一個例子。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
676
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
677 Emacs 有許多不同的主模式。它們之中有一些是用來編輯不同的語言
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
678 以及/或不同種類的文字,像是 Lisp 模式、Text 模式等等。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
679 在任何的時間只有一個主模式可以作用,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
680 並且它的名稱總可以在狀態行中被找到,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
681 就在現在的「Fundamental」中的位置。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
682
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
683 每一個主模式都使得一些指令的行為表現得不太一樣。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
684 舉例來說,在一個程式中有一些指令用來製作出註解,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
685 而由於每一種程式語言對於一個註解應該長得像什麼,都有著不同的想法,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
686 因此每一個主模式都必須以不同的方式來插入註解。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
687 每一個主模式是一個延伸指令的名稱,使得您可以用來切換至那個模式。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
688 舉例來說,M-x fundamental-mode 就是切換到 Fundamental
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
689 模式的一個指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
690
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
691 如果您想要編輯中文或英文等文字類型的檔案--像是現在的這一個,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
692 您應該使用 Text 模式。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
693
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
694 >> 鍵入 M-x text mode<Return>。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
695
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
696 不要擔心,沒有任何一個您已經學過的 Emacs 指令,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
697 會被改變成任何非常不同的形式。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
698 但是您可以發現到 M-f 和 M-b 現在把撇號(')視為字的一部分。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
699 先前,在 Fundamental 模式中,M-f 和 M-b 將撇號視為字的分隔符號。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
700
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
701 主模式通常會像上述那個例子一樣,做出一些精巧的改變:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
702 大部分的指令在每一個主模式中「做同樣的事」,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
703 但是它們以一點點不同的方式來工作。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
704 【再舉個例子,接續上面所開的頭,以程式語言的註解來說。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
705 同樣一個插入註解的動作,因為您使用的程式語言/主模式的不同而不同。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
706 若您使用 C 語言,Emacs 插入『/* 介於中間的為註解區塊 */』;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
707 若您使用的是 Fortran 語言,Emacs 插入『c 以字元 c 為首的為註解行』;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
708 若您使用的是 Basic 語言,Emacs 則插入『' 撇號以後的為註解文字』。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
709 編輯器的彈性如此,實在沒有必要為了不同的語言、目的或外觀,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
710 設計特殊化的編輯器。「求大同,存小異」在這裡也是成立的。】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
711
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
712 要瀏覽您現在所處的主模式的文件,鍵入 C-h m。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
713
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
714 >> 使用 C-u C-v 一或數次,將本行帶到靠近螢幕的上方。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
715 >> 鍵入 C-h m,看看 Text 模式與 Fundamental 模式是哪裡不同。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
716 >> 鍵入 C-x 1 將文件從螢幕移除掉。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
717
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
718 主模式之所以稱為「主要(major)」的原因是因為它們也有次模式
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
719 (minor mode)。次要的模式並不是主模式的其他選擇,而只是次要的更改。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
720 每一個次模式可以被它本身啟用或停止,和所有其他的次模式無關,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
721 並且也和您的主模式無關。所以您可以不使用次模式,或一個,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
722 或任何數量的次模式的組合。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
723
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
724 有一個次模式非常有用,特別是在編輯英文文字時,叫做 Auto Fill 模式。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
725 當這個模式啟用時,Emacs 在當您插入文字並且使一行太寬時,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
726 會將那一行,在字與字之間自動地分隔開。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
727
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
728 您可以 M-x auto fill mode<Return> 來將 Auto Fill 模式啟用。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
729 當這個模式啟用時,您可以使用 M-x auto fill mode<Return> 來將它取消。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
730 當這個模式不用時,則這個指令會將它啟動,而當這個模式啟用時,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
731 這個指令會將它關閉。我們說這個指令用來「切換(toggle)」模式。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
732
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
733 >> 現在鍵入 M-x auto fill mode<Return>。然後一再地插入字串
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
734 「 asdf 」,直到您看到它分成兩行。您必須在它們之間擺上空白,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
735 因為 Auto Fill 只在空白處斷行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
736
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
737 邊界通常被設定為 70 個字元,但是您可以用 C-x f 指令來改變它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
738 您應該以一個數字參數的方式來給定您所希望的邊界設定。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
739
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
740 >> 鍵入 C-x f 並附上引數 20:『C-u 2 0 C-x f』。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
741 然後鍵入一些文字,看看 Emacs 以 20 個字元,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
742 在行與行之間進行 fill 動作。然後再用一次 C-x f 將邊界設回 70。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
743
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
744 如果您在一個段落的中間做出改變,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
745 Auto Fill 模式並不會為您重新進行 fill 的動作(re-fill)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
746 要 re-fill 這個段落,鍵入 M-q (META-q),而游標必須處在其中。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
747
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
748 >> 移動游標到前一段中,然後鍵入 M-q。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
749
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
750
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
751 * 搜尋(SEARCHING)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
752 -------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
753
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
754 Emacs 可以搜尋字串(字串可以是一群連續的字元或字)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
755 【就中文來說,字元和字基本上意義相同;此處所指的『字』,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
756 是英文中沒有被空白隔開的字元集合。】,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
757 往前或往後搜尋都可以。搜尋一個字串是一種游標移動指令,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
758 它會將游標移動到字串出現的下一個地方。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
759
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
760 Emacs 搜尋指令與大部分編輯器的搜尋指令不同的地方在於,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
761 它是「漸進的(incremental)」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
762 這表示搜尋發生在您鍵入想要搜尋的文字串後。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
763
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
764 要開始搜尋的指令是:C-s 往前搜尋,C-r 往後搜尋。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
765 但先等一下!現在先不要試。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
766
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
767 當您鍵入 C-s 時,會發現到有一個字串「I-search」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
768 出現在回應區中作為提示。它告訴您 Emacs 現在正處於稱為「漸進式搜尋」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
769 的狀態中,等待您鍵入您想要搜尋的字串。<Return> 會結束一個搜尋。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
770
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
771 >> 現在鍵入 C-s 開始一個搜尋。慢一點,一次鍵入一個字元,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
772 鍵入『cursor』這個字,每鍵入一個字元時,稍微停一下,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
773 注意看看游標發生了什麼事。現在您已曾經搜尋過「cursor」這個字了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
774 >> 再次鍵入 C-s 來搜尋「cursor」的下一個出現位置。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
775 >> 現在鍵入 <Delete> 四次,看看游標是如何移動的。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
776 >> 鍵入 <Return> 結束搜尋。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
777
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
778 您有沒有看到發生了什麼?在一個漸進式搜尋中,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
779 Emacs 試著要走到您鍵入的字串的下一個出現位置。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
780 要移動到游標所在的下一個出現位置,只要再鍵入 C-s 一次。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
781 如果並沒有這樣的出現位置存在,Emacs 會嗶一聲,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
782 並告訴您目前的搜尋「失敗」。另外 C-g 也可以用來結束搜尋。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
783
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
784 注意:在某些系統中,鍵入 C-s 將會把螢幕凍結,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
785 您將看不到從 Emacs 來的任何輸出。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
786 這表示作業系統一個稱為「流程控制」的「功能」將 C-s 指令攔截住,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
787 並且不讓它傳到 Emacs。要取消螢幕的凍結,請鍵入 C-q。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
788 然後到 Emacs 使用手冊中看看對於「漸進式搜尋的同時進入
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
789 (Spontaneous Entry to Incremental Search)」這個主題,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
790 以取得處理這個「功能」的建議。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
791
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
792 如果您在一個漸進式搜尋的中間,並且鍵入 <Delete>,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
793 您可以發現在搜尋字串中的最後一個字元被消除了,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
794 並且搜尋會回到這個搜尋的最後一個地方。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
795 舉例來說,假設您已經鍵入了『c』,用來尋找「c」的第一次出現。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
796 現在如果您鍵入『u』,游標會移動到「cu」的第一次出現位置。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
797 現在鍵入 <Delete> ,這會將「u」從搜尋字串中消除,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
798 並且游標會移回到「c」的第一次出現位置。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
799
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
800 如果您在一個搜尋的中間,並且鍵入一個 CONTROL 或 META 字元的話,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
801 (但有一些例外--對搜尋而言特別的字元,像是 C-s 和 C-r),
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
802 搜尋會被結束。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
803
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
804 C-s 會開始一個搜尋,它會尋找搜尋字串在目前游標位置「之後」,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
805 的任何出現位置。如果您想要在先前文字中搜尋,鍵入 C-r 作為替代。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
806 除了搜尋的方向相反之外,我們所說的有關 C-s 的所有事情,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
807 同樣地可以應用到 C-r 上。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
808
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
809
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
810 * 多重窗格(MULTIPLE WINDOWS)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
811 ------------------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
812
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
813 Emacs 許多好功能的其中之一是,您可以在螢幕中同時展示超過一個窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
814
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
815 >> 移動游標到這一行並且鍵入 C-u 0 C-l。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
816
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
817 >> 現在鍵入 C-x 2,它會將螢幕平分成兩個窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
818 這兩個窗格都顯示著這個快速指南。游標則停留在上方的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
819
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
820 >> 鍵入 C-M-v 以捲動下方的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
821 (如果您並沒有一個真的 META 鍵,則鍵入 ESC C-v 亦可。)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
822
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
823 >> 鍵入 C-x o(『o』指的是其他『other』的意思),
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
824 將游標移動到下方的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
825
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
826 >> 在下方的窗格中,使用 C-v 和 M-v 來捲動它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
827 繼續維持在上方的窗格中閱讀這些指引。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
828
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
829 >> 再一次鍵入 C-x o 將游標移回到上方的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
830 游標會回到它在上方窗格中,原本所在的位置。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
831
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
832 您可以持續使用 C-x o 在窗格之間切換。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
833 每一個窗格有它自己的游標位置,但是只有一個窗格會真的顯示出游標。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
834 所有通常的編輯指令只會應用到那個游標所在的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
835 我們稱這個為「被選擇的窗格」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
836
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
837 指令 C-M-v 在當您於一個窗格中編輯文字,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
838 並使用其他的窗格作為參考之用時,是非常有用的。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
839 您可以將游標一直保持在您正在編輯的窗格中,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
840 並以 C-M-v 指令在其他的窗格循序地前進。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
841 【驗證工作特別適合以這種方式來進行,如 GNU 中譯小組:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
842 找一個原始英文檔案;再找它翻譯好的中文檔案,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
843 編輯這個「被選擇的窗格」,以 C-M-v 指令跟上驗證中的段落……。】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
844
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
845 C-M-v 是 CONTROL-META 字元的一個例子。如果您有一個真的 META 鍵,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
846 您可以同時按住 CONTROL 和 META 再鍵入 v 來鍵入 C-M-v。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
847 CONTROL 或 META 「誰先被按住」並沒有影響,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
848 因為這兩個鍵都是用來修飾您所鍵入的字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
849
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
850 如果您並沒有一個真的 META 鍵,您可以使用 ESC 來作為替代,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
851 這樣子順序就有關係了:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
852 您必須鍵入 ESC ,跟著鍵入 CONTROL-v,CONTROL-ESC v 並不會作用。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
853 這是因為 ESC 是一個具有本身作用的字元,而不是一個修飾鍵。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
854
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
855 >> (在上方窗格)鍵入 C-x 1 以除去下方窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
856
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
857 (如果您已經在底端的窗格鍵入 C-x 1,那麼將會把上面的窗格隱藏住。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
858 將這個指令想像成「只保留一個窗格--我正在編輯的這個。」)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
859
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
860 您不需要在兩個不同的窗格中顯示相同的緩衝區。如果您使用 C-x C-f
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
861 在一個窗格中找檔案,另一個窗格並不因而改變。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
862 您可以在獨立的任一個窗格中找〔它自己的〕一個檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
863
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
864 這裡有另外一個方式可以用來,使用兩個窗格顯示兩個不同的東西:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
865
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
866 >> 鍵入 C-x 4 C-f,後面跟著您的其中一個檔案的名稱。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
867 以 <Return> 作為結束。看看指定的檔案出現在下方的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
868 游標也跑到那裡。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
869
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
870 >> 鍵入 C-x o 以回到上方的窗格,然後以 C-x 1 刪除掉下方窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
871
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
872
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
873 * 遞迴編輯階層(RECURSIVE EDITING LEVELS)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
874 ------------------------------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
875
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
876 有時候您會進入所謂的「遞迴編輯階層」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
877 它是由位在狀態行的方括弧所指明,並且包含住以小括弧來指明的模式名稱。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
878 舉例來說,您可能會看到 [(Fundamental)],而不是 (Fundamental)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
879
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
880 要離開遞迴編輯階層,請鍵入 ESC ESC ESC。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
881 這是個全功能的「離開」指令。您也可以使用它來除去多餘的窗格,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
882 並且離開小緩衝區。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
883
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
884 >> 鍵入 M-x 以進入小緩衝區;然後鍵入 ESC ESC ESC 離開。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
885
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
886 您無法使用 C-g 來離開遞迴編輯階層。這是因為 C-g 是用來取消指令以及
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
887 「位於」遞迴編輯階層中的「引數(arguments)」之故。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
888
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
889
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
890 * 取得更多的幫助(GETTING MORE HELP)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
891 -------------------------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
892
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
893 在本快速指南中,我們試著僅提供剛剛好的資訊讓您可以開始使用 Emacs。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
894 在 Emacs 中有太多可取得的資訊,想要在這裡全部解釋是不可能的。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
895 然而,您也許會想要學習更多 Emacs 相關的資訊,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
896 因為它有許多其他有用的功能。Emacs 提供了「閱讀有關 Emacs 指令」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
897 的指令。這些「help」指令都以 CONTROL-h 這個字元作為開頭,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
898 稱作為「Help 字元」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
899
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
900 要使用 Help 功能,鍵入 C-h 字元,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
901 然後再鍵入一個說明您所需要的幫助的字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
902 如果您真的不知道要問什麼,那麼請鍵入『C-h ?』,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
903 此時 Emacs 將會告訴您它能夠提供的幫助。如果您已經鍵入 C-h,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
904 但發現您並不需要任何幫助,鍵入 C-g 來取消掉它就是了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
905
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
906 (有些網站將 C-h 這個字元的意義改變了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
907 他們真的不應該把它設為對所有使用者全部都適用的方法,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
908 所以您現在就有了個理由來抱怨系統管理者了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
909 在此同時,如果 C-h 並沒有在窗格的底部顯示任何有關幫助的訊息,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
910 試著鍵入 F1 鍵,或是 M-x help <Return>。)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
911
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
912 最基本的 HELP 功能是 C-h c。鍵入 C-h,字元 c,以及一個或一串字元;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
913 然後 Emacs 會顯示一個非常簡短的有關這個指令的解釋。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
914
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
915 >> 鍵入 C-h c C-p。訊息應該會像是:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
916
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
917 C-p runs the command previous-line
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
918
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
919 這告訴了您「函數的名稱」。函數名稱主要是用來自訂以及擴充 Emacs。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
920 但是由於函數名稱是由「用來指出這指令在做些什麼」而被選定,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
921 它們因此也可以作為非常簡短的文件--足夠提醒您已經學過的指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
922
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
923 多字元指令像是 C-x C-s 和 (如果您沒有 META 或 EDIT 或 ALT 鍵)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
924 <ESC>v 也可以在 C-h c 後面出現。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
925
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
926 要取得更多有關一個指令的資訊,用 C-h k 來取代使用 C-h c。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
927
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
928 >> 鍵入 C-h k C-p。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
929
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
930 這會在一個 Emacs 窗格顯示這個函數的說明文件以及它的名稱。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
931 當您閱讀完後,鍵入 C-x 1 以跳離這些幫助文字。您並不需要馬上跟著做。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
932 您可以做些編輯,當參考到幫助文字時再鍵入 C-x 1。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
933
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
934 這裡有一些其他有用的 C-h 選項:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
935
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
936 C-h f 解釋一個函數。您要鍵入此函數的名稱。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
937
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
938 >> 試著鍵入 C-h f previous-line<Return>。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
939 這會印出 Emacs 所有的有關「實作出 C-p 這個指令的函數」的資訊
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
940
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
941 C-h v 這個類似的指令會顯示出「您可以用來自訂 Emacs 行為的變數」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
942 的文件。當 Emacs 要求時,您需要鍵入這變數的名稱。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
943
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
944 C-h a 指令相關查找(Command Apropos)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
945 鍵入一個關鍵字然後 Emacs 會列出所有
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
946 「在其名稱中含有此關鍵字」的全部指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
947 這些指令全部都可以經由 META-x 來啟動。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
948 對於一些指令而言,指令相關查找也會列出
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
949 「可以執行相同指令」的一個或兩個字元的串列。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
950
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
951 >> 鍵入 C-h a file<Return>。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
952
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
953 這會在另一個窗格顯示一個「在其名稱中含有『file』的全部 M-x 指令」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
954 的列表。您將會看到像是 C-x C-f 的「字元-指令」列在其相對應指令名稱
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
955 (如:find-file)的旁邊。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
956
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
957 >> 鍵入 C-M-v 上下移動 help 窗格。試個幾次。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
958
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
959 >> 鍵入 C-x 1 來刪除 help 窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
960
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
961 C-h i 閱讀線上使用手冊(a.k.a. Info)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
962 這個指令將您帶到了稱為「*info*」的特殊緩衝區,在那,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
963 您可以閱讀安裝在您的系統裡的軟體套件的線上使用手冊。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
964 鍵入 m emacs <Return> 以閱讀 Emacs 使用手冊。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
965 如果您在此之前未曾使用過 Info 系統,請鍵入『?』。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
966 Emacs 將會帶您進入 Info 模式功能的導覽指南。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
967 一旦完成了本快速指南的研讀,您應該查閱 Emacs Info
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
968 使用手冊,以作為主要的參考文件。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
969
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
970
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
971 * 結論(CONCLUSION)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
972 --------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
973
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
974 記住,要完全離開 Emacs 請使用 C-x C-c。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
975 要暫時離開到 shell,稍後再回到 Emacs,請使用 C-z。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
976
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
977 本快速指南對於所有的新手應該都是易於理解的,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
978 所以如果您發現了什麼地方不清楚,不要只是坐著怪自己--
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
979 (向本文作者和翻譯)發點牢騷吧!
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
980
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
981
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
982 * 翻譯(TRANSLATION)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
983 ---------------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
984
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
985 本快速指南的翻譯人員列表如下,如果您在閱讀本文之前,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
986 「完全」對 Emacs 沒有概念,我們非常需要您的意見以作為改進的依據。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
987 我們也打算提供一份 Emacs 的導讀(或整理到本快速指南),
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
988 主要將會根據初學者閱讀本使用指南所面臨到的問題,撰寫而成。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
989
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
990 一個編輯器不應該讓初學者感到十足的困難,您的意見可以使 Emacs
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
991 更為貼近一般的使用者,並使電腦作為工具的角色得以充分發揮。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
992 如果您願意提供改進的意見,請寄 email 到
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
993 <chinese-translators@gnu.org> 。請不要害羞,我們歡迎任何有關的討論;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
994 如果您不想寄到郵件清單,請直接 email 給本文翻譯 <chliu@gnu.org> 。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
995 請在 Title 行中包含此字串「Emacs TUTORIAL: <your issue here>」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
996
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
997 如果您是 Emacs 老手,GNU Chinese Translators Team (GNU/CTT)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
998 <http://www.gnu.org/software/chinese/> 歡迎您的加入,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
999 我們現在正需要願意投入翻譯 Emacs 使用手冊的人員。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1000
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1001 本快速指南並沒有採用習慣上編輯器所使用的翻譯術語,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1002 一方面因為它的實際意義與一般的編輯器不同,原文本就不同;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1003 另一方面也因為 Emacs 所採用的視覺設計概念,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1004 早在視窗化系統之前就已經存在,本質也不相同。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1005 總之,翻譯以為這樣可以幫助對於 Emacs 整個設計哲學的理解。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1006 如果收到的回覆中,大部份要求提出修改,我們還是從善如流。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1007
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1008 (1) 在本文中,「行」指的是 row,這是採用一般的習慣用法。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1009 為了避免誤導中文讀者,特別在此說明。在正式的用法中:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1010 「column」翻譯為「行」,以「縱」為行(直行),也譯為「欄」;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1011 「row」翻譯為「列」,以「橫」為列(橫列)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1012 讀者思索一下「合縱連橫」應該可以理解。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1013 大約是因為中文原本是直書的,我們說「一行字」是沒問題;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1014 但現在大部份的情形中文是橫書的,由於習慣使然也稱為一行字了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1015 (2) 有關於「文字」及其集合的相關譯文,翻譯所採用的有:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1016 編輯的「文字」:「然後鍵入一些文字」、
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1017 用來作為說明功能的「文件」:「這個函數的說明文件」、
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1018 特指其所說明內容的「文本」:「實際效力以英文本為準」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1019 另外,即使只是「一行字」,只要它是用來作為說明之用,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1020 翻譯還是將它視為「文件」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1021 (3) 「cut」的動作在 Emacs 中分為「殺掉」和「刪除」,之間的差異如下:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1022 一般編輯器中的「cut」:只有最近被 cut 的文字擺到 clipboard 中、
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1023 「殺掉(killing)」:被殺掉的文字,全部被加入到 kill ring 中、
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1024 「刪除(deleting)」:被刪除的文字,就是被刪除了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1025 因此在一般編輯器中,您只能 paste「最近」被 cut 的文字;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1026 而在 Emacs 中,您可以「拉回」任何先前被殺掉的文字,同時,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1027 它的作法很容易。至於被刪除的,因為用來作為「刪除」功能的指令,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1028 所能移去的文字數量都很少,因此也沒什麼好拉回的;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1029 如果真的想回復這些文字,undo 您的動作就是了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1030 (4) 「window」同時翻譯為「視窗」和「窗格」,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1031 前者表示現在一般概念中的視窗系統,如「X 視窗」;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1032 後者表示 Emacs 中的視窗,翻譯在此通稱為「窗格」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1033 Emacs 的「窗格」即使在命令列提示下也可以正常工作,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1034 此一基本特性顯然值得我們以另一個專用術語來描述它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1035 (5) 關於檔案的術語,「找」一個檔案在 Emacs 中有兩種作用:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1036 找一個「並不存在」的檔案,讀者應認知為「開新檔案」;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1037 找一個「已經存在」的檔案,則是「開啟舊檔」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1038 Emacs 只以一個「找」的動作來解決,主要的原因是「實際上」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1039 的軟體工作如此。駭客們應該會發現這樣比較自然,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1040 因為它反應了電腦的工作方式,同時操作起來也較少廢話。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1041 (6) 在【】中的文字為翻譯的註解。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1042 (7) 關於使中文文件結構化的議題,問題已經獲得解決。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1043
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1044 另外,我們也十分歡迎讀者可以直接修改本快速指南,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1045 做出自己的版本,以自己認為最為合適的方式來介紹 Emacs。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1046 如果您做出了這樣個人化的版本,並且認為足供大家參考使用,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1047 請寄給 <chinese-coordinators@gnu.org> ,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1048 我們會將您的版本公開在 GNU/CTT 的網頁中提供給中文使用者下載。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1049
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1050 翻譯:劉 昭宏 <chliu@gnu.org>
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1051 驗證:馬 雪萍
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1052
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1053
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1054 * 複製(COPYING)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1055 -----------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1056
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1057 本快速指南沿襲自具有悠久歷史的 Emacs 快速指南,由 Stuart Cracraft
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1058 為了原始的 Emacs 所撰寫的版本開始。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1059
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1060 這個版本的快速指南和 GNU Emacs 一樣都是版權化的,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1061 並且允許在某些條件下散佈其拷貝:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1062
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1063 Copyright (c) 1985, 1996, 2002 Free Software Foundation
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1064 Chinese Translation by Chao-Hong Liu (2002)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1065
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1066 Permission is granted to anyone to make or distribute verbatim copies
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1067 of this document as received, in any medium, provided that the
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1068 copyright notice and permission notice are preserved,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1069 and that the distributor grants the recipient permission
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1070 for further redistribution as permitted by this notice.
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1071
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1072 本文允許在不變更文件內容的前提下刊登在任何形式的媒體中,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1073 但需保留版權聲明以及許可聲明,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1074 散佈者也必須給予接受者如同此聲明所允許的,進一步散佈的許可。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1075 【本段譯文提供讀者作為參考以幫助理解,實際效力以英文本為準。】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1076
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1077 Permission is granted to distribute modified versions
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1078 of this document, or of portions of it,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1079 under the above conditions, provided also that they
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1080 carry prominent notices stating who last altered them.
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1081
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1082 本文允許在與上述相同的條件下,散佈修改後的版本,或是其中的一部份,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1083 但它們也必須帶有顯著的,說明由誰最後更動了它的聲明。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1084 【Copyleft 版權除了提供使用者自由外,也維護原始作者,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1085 以及後來的修改作者的名譽權(credit)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1086 本段譯文提供讀者作為參考以幫助理解,實際效力以英文本為準。】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1087
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1088 複製 Emacs 本身的條件較為複雜,但是具有相同的精神。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1089 請閱讀 COPYING 這個檔案,並且確實給予您的朋友 GNU Emacs 的拷貝。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1090 請經由「使用、撰寫、以及分享自由軟體」來幫助消除軟體障礙主義
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1091 (擁有權)!
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1092
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1093 ;;; Local Variables:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1094 ;;; coding: chinese-big5
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1095 ;;; End: