Emacs 23の(主観に基づく)主な変更点とそれへの対応
- 以下の引用文は全て http://www.gnu.org/software/emacs/NEWS.23.1 から引用しています。順番は若干入れ替えています。
フォントまわりの改善 †
** New font code.
Fonts are handled by new code capable of dealing with multiple font
backends. This uses the freetype and fontconfig libraries.
*** Emacs now accepts font names supplied in the fontconfig format
(e.g. "monospace-12:bold") and GTK format (e.g. "Monospace Bold 12").
*** Added support for local fonts (fonts installed on the machine
where Emacs is running).
*** Added support for the Xft library for antialiasing.
*** Added support for the otf library for complex text layout by
OpenType fonts.
Xft、OTFを利用して、よりきれいなフォントレンダリングができるようになっている。
*** New commands to change the default face size in the current buffer.
To increase it, type `C-x C-+' or `C-x C-='. To decrease it, type
`C-x C--'. To restore the default (global) face size, type `C-x C-0'.
These work via Text Scale mode, a new minor mode.
The final key in the above commands may be repeated without the
leading `C-x', e.g. `C-x C-= C-= C-=' increases the face height by
three steps. Each step scales the height of the default face by the
value of the variable `text-scale-mode-step'.
フォントの大きさを簡単に変えられる。おお、ブラウザっぽい!
*** Which font backends to use can be specified by the X resource
"FontBackend". For instance, to use both X core fonts and Xft fonts:
Emacs.FontBackend: x,xft
If this resource is not set, Emacs tries to use all font backends
available on your graphic device.
フォントのバックエンドはXresourcesファイルで指定できるらしい。
閲覧機能の強化 †
*** Emacs now supports the SVG image format through librsvg2.
SVGファイルを画像として閲覧することが可能。
** DocView mode allows viewing of PDF, PostScript and DVI documents.
One can also search for a regular expression in the document. For
details, see the commentary in doc-view.el.
PDF and DVI files are now opened in Doc View mode by default.
In Postcript mode, C-c C-c launches Doc View minor mode for viewing
the postscript file.
DocViewによってPDF、PostScript、DVIを閲覧可能。 実際は内部でPNGに変換してるっぽい。日本語のドキュメントを読めるようにするには難しいか?
Xウィンドウとtty上のEmacsを同時に扱う †
*** Emacs now supports using both X displays and ttys in one session.
With an Emacs server active (M-x server-start), `emacsclient -t'
creates a tty frame connected to the running emacs server. You can
use any number of different ttys. `emacsclient -c' creates a new X11
frame on the current $DISPLAY (or a tty frame if $DISPLAY is not set).
There may be problems if a display exits unexpectedly and Emacs is compiled
with Gtk+, see etc/PROBLEMS.
You can test for the presence of this feature in your Lisp code by
testing for the `multi-tty' feature.
emacsclientを使う場合、サーバが稼働しているEmacsに無関係に新しいフレームをttyやXウィンドウとして表示できる。
Emacsデーモン †
*** Emacs starts in the background, as a daemon, when given the
--daemon command line argument. It disconnects from the terminal and
starts the server. Clients can connect and create graphical or
terminal frames using emacsclient.
**** emacsclient starts emacs in daemon mode and connects to it when
--alternate-editor="" is used (or when the evironment variable
ALTERNATE_EDITOR is set to "") and emacsclient cannot connect to an
emacs server.
--daemonオプションを渡してEmacsを起動すると、デーモンモードで常駐する。 Emacsデーモンにつないで新しいフレームを作るにはemacsclientを使えばいい。
Emacsからシリアルターミナルを操る †
** Emacs now supports serial port access on GNU/Linux, Unix, and
Windows. The new command `serial-term' starts an interactive terminal
on a serial port. The serial port can be configured at runtime with
the mode-line mouse menu.
Emacsからシリアルポートにつなぐことができるらしい。 使用感はansi-termに似ているんだろうか。 C-c C-jでLine-modeにしないとEmacsへのコマンドをほとんど打ち込めないのでパニクる。
ファイルをゴミ箱に捨てることができる †
** File deletion can make use of the Recycle Bin or system Trash folder.
Set `delete-by-moving-to-trash' non-nil to use this. Deleted files
and directories will then be sent to the Recycle Bin on Windows, and
to `trash-directory' on other systems.
Diredを使ったりした場合の話だろうか。
最初のバッファを指定できる †
** New user option `initial-buffer-choice' specifies what to display
after starting Emacs: startup screen, *scratch* buffer, visiting a
file or directory.
scratchバッファ以外にも好きなように最初のバッファを指定できるらしい。
isearchまわり †
** In Isearch mode, a special case of typing `C-w' at the beginning of
the minibuffer that toggles word search (i.e. using key sequences
`C-s RET C-w' or `C-s M-e C-w') is obsolete. You can use the global key
`M-s w' to start word search, or type `M-s w' in Isearch mode to
toggle word search. To start nonincremental word search you can now use
`M-s w RET' and `M-s w C-r RET' instead of `C-s RET C-w' and `C-r RET C-w'.
M-sをプレフィクスキーとしてより一貫性のあるキーバインドになったということか。
*** Isearch started in the minibuffer searches in the minibuffer history.
Reverse Isearch commands (C-r, C-M-r) search in previous minibuffer
history elements, and forward Isearch commands (C-s, C-M-s) search in
next history elements. When the reverse search reaches the first history
element, it wraps to the last history element, and the forward search
wraps to the first history element. When the search is terminated, the
history element containing the search string becomes the current.
isearchでミニバッファの履歴を検索可能。
スクリーン行によるカーソル移動をデフォルトに †
** The C-n and C-p line-motion commands now move by screen lines,
taking continued lines and variable-width characters into account.
Setting `line-move-visual' to nil reverts this to the previous
behavior (i.e., motion by logical lines based on buffer contents
alone).
C-n, C-pによる行移動は従来はデフォルトで論理行移動だったが、スクリーン行での移動がデフォルトになった。 なお、移動がスクリーン行単位になっただけで、C-a, C-e, C-k, C-x rなどの他のコマンドは論理行単位で効く。
Visual Lineモード †
** Visual Line mode provides support for editing by visual lines.
It turns on word-wrapping in the current buffer, and rebinds C-a, C-e,
and C-k to commands that operate by visual lines instead of logical
lines. This is a more reliable replacement for longlines-mode.
This can also be turned on using the menu bar, via
Options -> Line Wrapping in this Buffer -> Word Wrap
C-a, C-e, C-kコマンドも論理行ではなくスクリーン行で機能させたい場合はVisual Lineモードを使えばいいらしい。
マークまわりの変更 †
*** Transient Mark mode is now on by default.
Transient Markモードがデフォルトでオンに。 そのため、C-SPCでマークをおくとそれだけでリージョンがアクティブになり、ハイライトされる。 はっきり言ってこれは相当ウザい。 なので、.emacsに一行、(transient-mark-mode nil)と書いておく。これで以前の挙動に戻る。 もちろん、C-SPC C-SPCで一時的にTransient Markモードを起動できる。
*** When Transient Mark mode is on, TAB now indents the region if the
region is active.
これは結構役に立つかも。アクティブリージョンを作った状態でTABを押すとリージョン全体がインデントされる。
*** The new variable shift-select-mode, non-nil by default, controls
shift-selection. When Shift Select mode is on, shift-translated
motion keys (e.g. S-left and S-down) activate and extend a temporary
region, similar to mouse-selection.
*** Temporarily active regions, created using shift-selection or
mouse-selection, are not necessarily deactivated in the next command.
They are only deactivated after point motion commands that are not
shift-translated, or after commands that would ordinarily deactivate
the mark in Transient Mark mode (e.g., any command that modifies the
buffer).
"シフト押しながらカーソル移動"でリージョンの指定ができる。 シフト移動を始めた地点でマークが置かれるようだ。
ミニバッファの補完まわり †
*** Emacs may ask for confirmation before opening a non-existent file
or buffer. By default, Emacs requests confirmation if you type RET
immediately after TAB, and the resulting input is not an existing file
or buffer; this usually happens when the minibuffer input did not
complete far enough and you entered RET by mistake. In that case,
Emacs puts the message "[Confirm]" in the minibuffer; type RET again
to create the file or buffer.
The new variable confirm-nonexistent-file-or-buffer determines whether
Emacs asks for confirmation. The default value is `after-completion'.
If you change it to t, Emacs always asks for confirmation; if you
change it to nil, Emacs never asks for confirmation.
補完後にすぐRETを押して存在しないファイルを開こうとした場合、確認してくるようになった。
*** If `completion-auto-help' is `lazy', Emacs shows the completions
buffer only on the second attempt to complete. This was already
supported in `partial-completion-mode'.
ミニバッファの補完候補を出すタイミングを設定可能になった。
C-lの挙動 †
*** C-l is bound to the new command recenter-top-bottom, rather than recenter.
This moves the current line to window center, top and bottom on
successive invocations.
C-lを連打すると、現在の行がウィンドウ中央→先頭→末尾の順番に見え方が変わる。 地味だが、便利。
butterfly †
** butterfly flips the desired bit on the drive platter.
蝶の羽ばたきによって上空の大気圧を操り、レンズを作る。 そのレンズによって宇宙線をハードディスクに収束させ、任意のビットを書き換えるコマンド。 もちろん冗談だが、、、本当に作るか、普通www
Proced: プロセス管理モード †
** proced.el provides a Dired-like interface for operating on
processes. Proced makes an Emacs buffer containing a listing of the
current processes. You can use the normal Emacs commands to move
around in this buffer, and special Proced commands to operate on the
processes listed. It is currently only functional on GNU/Linux,
MS-Windows and Solaris.
procedコマンドでプロセス管理モード"proced"に入ることができる。
新しいwhitespaceパッケージ †
** There is a new `whitespace' package.
(The pre-existing one has been renamed to `old-whitespace'.)
Now, besides reporting bogus blanks, the whitespace package has a
minor mode and a global minor mode to visualize blanks (TAB, (HARD)
SPACE and NEWLINE). The visualization is made via faces and/or display
table. It can also indicate lines that extend beyond a given column,
trailing blanks, and empty lines at the start or end of a buffer.
See `whitespace-style' for more details. The `whitespace-action' option
specifies what to do when a buffer is visited, killed, or written.
ブランク文字の可視化のためのパッケージ"whitespace"が新しくなったらしい。
Emacsカスタマイズディレクトリの指定 †
** New variable `user-emacs-directory'.
Use this instead of "~/.emacs.d".