Emacs 31.1の新機能
What's new in Emacs 31.1 (masteringemacs.org)
要約
Emacs 31.1がリリースされ、大きな新機能はないものの、多くの小さな品質改善や一つの時代の終焉を告げる非推奨化が含まれています。特に、長年使われてきたunexec dumperが削除され、ユーザーLispディレクトリ機能の強化や、Tree-sitterの文法インストール支援などが注目されています。
全文翻訳
Emacs 31.1 の新機能?
Emacs 31.1 がついにリリースされました!以前の Emacs のバージョンとは異なり、このリリースには単一の大きな目玉機能はありません。私が把握した限りでは、新しいガベージコレクタは Emacs 31.1 に含められる予定だったようですが、Emacs 32 に延期されました。これについては、将来の投稿で詳しく説明します。興味深いトピックです。
Emacs 31.1 のより注目すべき機能のいくつかは、小さなライフサイクルの改善と、時代の終焉を告げる一つの非推奨化です。
いつものように、私の書籍「Mastering Emacs」は、リリースを祝って来週1週間、31%オフになります。
unexec/pdumper の論争とその後の非推奨化
Emacs は…普通のアプリケーションではありません。コンパイルしてリンクすると、temacs が得られます。これは Emacs の心臓部ですが、付属するほとんどのライブラリはありません。これは、C コアとインタプリタ以上のものはほとんどない、最小限の Emacs であり、実際にはあまり役に立ちません。
あなたが知っていて愛している Emacs バイナリを取得するには、temacs を実行し、標準ライブラリをメモリにロードするように指示する必要があります。これは遅いです。多くの elisp とハウスキーピングが発生します。この方法で Emacs を起動するには、数分とかなりの CPU および RAM がかかる場合があります。これは耐えられません。
これは何十年も Emacs を悩ませてきた問題です。今日では大きな問題ではありませんが、昔は、熱心な Emacs ユーザーが朝に Emacs を同時に起動することを決定した場合、家庭用コンピューターや共有マルチユーザー環境でバックを壊す可能性がありました。
この問題の解決策は?すべてを一度ロードしてから、Emacs のメモリのテキスト/データ/bss/etc. セグメントを新しいバイナリに文字通りダンプすることです。そうすれば、Emacs lisp 状態を何度もブートストラップする必要はありません。ほとんどレスリング技のように感じられます。重い Emacs を位置につかせ、The Attitude Adjustment を適用し、Emacs を新しいバイナリにボディスラムすれば、すべてがセットアップされ、準備完了です。
かなりすごい動きです。
しかし、この、えー、レスリング技を機能させるために、Emacs は glibc のいくつかのスノーフレーク関数に依存していました。数十年間にわたるこのような悪い挙動を可能にした後、glibc チームは断念し、Emacs は別の方法を見つけなければなりませんでした。
Daniel Colascione は、誰もがそれに満足していたわけではありませんが、より良い解決策を構築しました。簡単に言えば、Emacs の内部構造のシリアライゼーションを、内部メモリ構造の 1 対 1 のダンプではないものに標準化します。
ポータブルダンパーは、数年前からデフォルトになっています。これは約 10 年前に初めて導入され、Emacs の長い歴史の互換性を維持するために、ポータブルダンパーという考えがばかげているか実行不可能だと考える 1 人か 2 人のユーザーのために、古い unexec ダンパーは残されていました。
しかし、ついに完全に廃止されました。時代の終わりです。
User Lisp Directory
古典的な問題:Emacs パッケージをどこかに git clone またはダウンロードし、それを機能させたいとします。しかし、どうすればよいでしょうか?それはそれほど単純ではありません。それを実行する方法はいくつか競合しています。最も簡単なのは、ユーザーに .emacs.d ディレクトリの user-lisp/ にパッケージをドロップするように指示することです。Emacs はロードとオートロードの設定(M-x に正しいものが表示されるように)を処理します。
ミニバッファと補完
Emacs 30.1 は completion-preview-mode を獲得しました。これは Company や Corfu のようなネイティブな「ポップアップウィンドウ」システムですが、Emacs 自身のやり方に、より適応しています。Company などがフローティング子フレームを使用するのではなく、*Completions* ウィンドウを使用します。
Emacs 31.1 は、ネイティブな方法で行きたい場合にカスタマイズしたいであろう、幅広いカスタマイズ可能なオプションでこれを強化しています。
ウィンドウレイアウトの回転
M-x window-layout-rotate-clockwise(C-x w C-h で多くの新しいオプションを確認してください)などがウィンドウレイアウトを回転させます。もう一つの小さな UI の勝利です。
リージョンをアクティブ化せずにポイントとマークを交換する
私は(主に私の書籍で)、kill-region (C-w) のような Emacs の多数の「リージョンに影響する」コマンドの上に重ねられた、transient-mark-mode がかなり厄介なワンサイズフィットオールであることについて話しました。
したがって、C-x C-x はポイントとマークを交換するだけでなく、あなたがそれを望むかどうかにかかわらずリージョンをアクティブ化します。transient mark mode のマークコマンドの修正は私の古い記事で、まさにそれを行う方法を示しています。しかし今、それがそうしないための組み込みオプションがあります — 素晴らしいです。
Tree-sitter が文法をインストールするように提案するようになりました
Tree-sitter の Emacs でのより広範な採用を妨げている 2 つのブロッカーが連携しています。
- TS は動作するために特別なメジャーモードを要求し、そのモードは元のモードの薄っぺらな再実装であることが多いという事実。
- 文法をインストールすること、特に Windows では、巨大な手間がかかります。ツリーシッターライブラリ自体の厳密な ABI バージョンで針の穴を通すだけでなく、各言語文法の厳密なバージョンを確実に使用する必要があります。そうしないとすべてが煙になります。
前者はまだ問題ですが、後者はほとんど解決されました。Emacs は、知っている TS モードに必要な言語文法をインストールするように提案できるようになりました。
これで、Combobulate: Tree-Sitter による構造化された移動と編集を試す言い訳はありません。
そして、さらに多くのこと
多くの小さな調整と変更。読んでみてください。
Emacs 31.1 のインストール変更
unexec dumper removed.
The traditional unexec dumper, deprecated since Emacs 27, has been
removed.
The portable dumper now works on m68k a.out targets.
冒頭の紹介文で書いたように、これはまさに時代の終わりです。
Emacs's old 'ctags' program is no longer built or installed.
You are encouraged to use Universal Ctags <https://ctags.io/> instead.
For now, to get the old 'ctags' behavior you can can run 'etags --ctags'
or use a shell script named 'ctags' that runs 'etags --ctags "$@"'.
TAGS ユーザーであれば、where で確認し、新しいものをインストールしたことを確認してください。(TAGS を使用しているかどうかわからない場合は、使用していません。)
Changed GCC default options on 32-bit x86 systems.
When using GCC 4 or later to build Emacs on 32-bit x86 systems,
'configure' now defaults to using the GCC options '-mfpmath=sse' (if the
host system supports SSE2) or '-fno-tree-sra' (if not). These GCC
options work around GCC bug 58416, which can cause Emacs to behave
incorrectly in rare cases.
New configure option '--with-systemduserunitdir'.
This allows specifying the directory where the user unit file for
systemd is installed; the default is '${prefix}/usr/lib/systemd/user'.
Emacs に systemd サービスをインストールして Emacs のサーバーを実行するように指示できます。これを行うことをお勧めします。
Emacs 31.1 の起動変更
In compatible terminals, 'xterm-mouse-mode' is turned on by default.
For these terminals the mouse will work by default. A compatible
terminal is one that supports Emacs setting and getting the OS selection
data (a.k.a. the clipboard) and mouse button and motion events. With
'xterm-mouse-mode' enabled, you must use Emacs keybindings to copy to the
OS selection instead of terminal-specific keybindings.
You can keep the old behavior by customizing 'xterm-mouse-mode' to nil.
ほとんどの人は知りませんが、Emacs は数年前にターミナル Emacs にマウスサポートを追加しましたが、オフのままでした。ターミナルの機能は大きく異なるため、これは良い安全な決定でした。しかし今、期待どおりに動作します。メニューがクリック可能であるなど。良いことです。
site-start.el is now loaded before the user's early init file.
Previously, the order was early-init.el, site-start.el and then the
user's regular init file, but now site-start.el comes first. This
allows site administrators to customize things that can normally only be
done from early-init.el, such as adding to 'package-directory-list'.
ラップトップやホームコンピューターのようなシングルユーザーシステムにいる場合、これはあなたにとってあまり関係ないでしょう。
New User Lisp directory feature.
If you have a subdirectory "user-lisp/" in your Emacs configuration
directory, then Lisp files in it and any subdirectories are now
recursively byte-compiled, scraped for autoload cookies and added to
'load-path'.
You can disable the feature by setting 'user-lisp-auto-scrape' to nil,
and you can customize the option 'user-lisp-directory' to process some
other directory instead. There is also a new command
'prepare-user-lisp' that you can invoke at any time. See the Info node
"(emacs) User Lisp Directory" for more details.
これは非常に便利です。私は 23 年間、自分のコードをロードするための同じコードスニペットをカーゴカルトしてきましたが、use-package は役立ちますが、それでもかなりの手作業が必要です。もう十分です!
The first client frame now shows warnings from daemon startup.
When there are warnings emitted during Emacs startup, usually due to
problems in your initialization file, these are shown in a "*Warnings*"
buffer. Until now such warnings were not made visible in the case that
Emacs was started as a daemon. Now the first frame after daemon startup
will show the "*Warnings*" buffer. So for example, starting Emacs with
a command like 'emacsclient -a "" -c' will now show "*Warnings*" just
like a plain invocation of 'emacs' would.
悪いニュースです。Emacs がランダムなパッケージのマイナーなつまずきについてすべてを教えてくれるというこだわりは、デーモンとして Emacs を実行している場合でもあなたを悩ませるでしょう。そのような呪われた機能です。誰も気にしません。重要であればエラーになります。
Emacs 31.1 の変更点
'line-spacing' now supports specifying spacing above the line.
Previously, only spacing below the line could be specified. The user
option can now be set to a cons cell to specify spacing both above and
below the line, which allows you to vertically center text.
これは Emacs 全体へのグローバル値であり、フェイス設定ではないため、M-x customize-face を使用して変更することはできません。setopt で設定するか、UI をカスタマイズしてください。
New face 'margin' for the window margin display.
A new basic face 'margin' is used by default for text displayed in the
left and right margin areas, which are used by various packages for
per-line annotations. Its background defaults to the frame default
background, so existing behavior is unchanged for users who do not
customize this new face.
Display strings shown in the margins now inherit unspecified face
attributes from the 'margin' face, if the string itself does not fully
specify its face. If your code relied on the face of the underlying
buffer text to serve as a default for any unspecified face attributes of
strings displayed in the margin, you must now apply those face
attributes to the margin string itself using 'propertize'.
'prettify-symbols-mode' attempts to ignore undisplayable characters.
Previously, such characters would be rendered as, e.g., white boxes.
'standard-display-table' now has more extra slots.
'standard-display-table' has been extended to allow specifying glyphs
that are used for borders around child frames and menu separators on TTY
frames.
Call the command 'standard-display-unicode-special-glyphs' to set up the
'standard-display-table's extra slots with Unicode characters. See the
documentation of that command to see which slots of the display table it
changes.
Child frames are now supported on TTY frames.
This supports use-cases like Posframe, Corfu, and child frames acting
like tooltips. To enable tooltips on TTY frames, call 'tty-tip-mode'.
The presence of child frame support on TTY frames can be checked with
'(featurep 'tty-child-frames)'.
Recent versions of Posframe and Corfu are known to use child frames on
TTYs if they are supported.
これはターミナルユーザーにとって歓迎すべき変更です。ターミナルでのフレームは GUI でのフレームとは異なり、tmux/screen の「ウィンドウ」のような動作をします。ここでは、子フレームは GUI Emacs で見られるようなインセットポップアップにすぎません。
Several font-lock face variables are now obsolete.
The following variables are now obsolete: 'font-lock-builtin-face',
'font-lock-comment-delimiter-face', 'font-lock-comment-face',
'font-lock-constant-face', 'font-lock-doc-face',
'font-lock-doc-markup-face', 'font-lock-function-name-face',
'font-lock-keyword-face', 'font-lock-negation-char-face',
'font-lock-preprocessor-face', 'font-lock-string-face',
'font-lock-type-face', 'font-lock-variable-name-face', and
'font-lock-warning-face'.
These variables contributed both to confusion about the relation between
faces and variables, and to inconsistency when major mode authors used
one or the other (sometimes interchangeably). We always recommended
using faces directly, and not creating variables going by the same name.
If you have customized these variables, you should now customize the
corresponding faces instead, using something like:
M-x customize-face RET font-lock-string-face RET
If you have been using these variables in Lisp code (for example, in
font-lock rules), simply quote the symbol, to use the face directly
instead of its now-obsolete variable.
これはフェイスではなく、フェイスと同じ名前の変数に関するものです。はい、それは混乱します。Emacs には font-lock-string-face のようなフェイスがあり、おそらくすでにカスタマイズしているでしょう。しかし、フェイスと同じ名前の変数もあります。変数は非推奨です。
M-x customize-face(そうすべきです!)でフェイスをカスタマイズした場合、心配する必要はありません。
New char-table 'special-mirror-table' for mirroring special glyphs.
This char-table is used to mirror special glyphs (truncation and
continuation) when the user has defined an alternative representation
for those characters via display tables.
find-func.el commands now have history enabled.
The 'find-function', 'find-library', 'find-face-definition', and
'find-variable' commands now allow retrieving previous input using the
usual minibuffer history commands. Each command has a separate history.
へえ。彼らが独自の履歴を持っていなかったことに気づきませんでした。今では持っています。知っておくと良いことですが、私にはあまり影響しないでしょう。
New minor mode 'find-function-mode' replaces 'find-function-setup-keys'.
The new minor mode defines the keys at a higher precedence level than
the old function, one more usual for a minor mode. To restore the old
behavior, customize 'find-function-mode-lower-precedence' to non-nil.
これをカスタマイズする必要はほとんどないでしょう。
'find-function' can now find 'cl-defmethod' invocations inside macros.
New minor mode 'prettify-special-glyphs-mode'.
The new minor mode prettifies the special character glyphs (truncation
and continuation) on TTY frames (and GUI frames without fringes). You
can customize the associated new face 'special-glyphs'.
ミニバッファと補完
Support for immediate display of the "*Completions*" buffer.
Whenever a minibuffer with completion is opened, then if the completion
table sets the 'eager-display' completion property to non-nil, the
"*Completions*" buffer will now be displayed immediately. This property
can be overridden for different completion categories by customizing
'completion-category-overrides'. Alternatively, the new user option
'completion-eager-display' can be set to t to force eager display of
"*Completions*" for all minibuffers, or nil to suppress this for all
minibuffers.
Support for updating "*Completions*" as you type.
If the "*Completions*" buffer is displayed and the completion table sets
the completion property 'eager-update' to non-nil, then the
"*Completions*" buffer will be updated as you type. This property can
be overridden for different completion categories by customizing
'completion-category-overrides'. Alternatively, the new user option
'completion-eager-update' can be set to t to make "*Completions*" always
be updated as you type, or nil to suppress this always. Note that for
large or inefficient completion tables, this can slow down typing.
'RET' chooses the completion selected with 'M-<UP>/M-<DOWN>'.
If a completion candidate is selected with 'M-<UP>' or 'M-<DOWN>',
typing 'RET' will exit completion with that candidate as the result.
This works both in minibuffer completion and for in-buffer completion.
This feature supersedes 'minibuffer-completion-auto-choose', which
previously provided similar behavior; that variable is now nil by
default.
これは、Emacs のミニバッファ補完システムを、より従来の company/corfu スタイルの補完のように動作させるための、Emacs 30.1 の変更と連動しています。
これらの新しい組み込み機能は非常に高く評価していますが、邪魔にならないように動作させるには、かなりのカスタマイズが必要であると警告します。
Support for completion category inheritance.
You can now define completion categories that inherit properties from
existing categories, using the new function 'define-completion-category'.
New optional value of 'minibuffer-visible-completions'.
If the value of this option is 'up-down', only the '<UP>' and '<DOWN>'
arrow keys move point between candidates shown in the "*Completions*"
buffer display, while '<RIGHT>' and '<LEFT>' arrows move point in the
minibuffer.
New user option 'completion-pcm-leading-wildcard'.
This option configures how the partial-completion style does completion.
It defaults to nil, which preserves the existing behavior. When it is
set to t, the partial-completion style behaves more like the substring
style, in that the input can match a candidate anywhere in the candidate
string.
補完スタイルへのもう一つのマイナーな調整で、以前の動作により似たように動作するようにしました。Emacs には多様な補完スタイルがあります。デフォルトは長年にわたって大きく変化しており、時には廃止されたデフォルトスタイルの奇妙さに慣れていた人々を不快にさせることもあります。例えば、completion-styles-alist には emacs21 と emacs22 の両方の補完スタイルがあります。しかし、詳細についてはミニバッファ補完の理解を参照してください。
'completion-styles' now can contain lists of bindings.
In addition to a symbol naming a completion style, an element of
'completion-styles' can now be a list of the form '(STYLE ((VARIABLE
VALUE) ...))' where STYLE is a symbol naming a completion style.
VARIABLE will be bound to VALUE (without evaluating it) while the style
is executing. This allows multiple references to the same style with
different values for completion-affecting variables like
'completion-pcm-leading-wildcard' or 'completion-ignore-case'. This
also applies to the styles configuration in
'completion-category-overrides' and 'completion-category-defaults'.
おお、すごい。それはニッチです。completion-styles は、ミニバッファの補完などのもので Emacs がどのように一致させるかのショッピングリストです。これで、initials は大文字小文字を無視するようにできますが、substring はそうしないようにできます。
Navigating "*Completions*" now accommodates 'completions-format'.
When 'completions-format' is set to 'vertical', typing 'n', 'TAB' or
'M-<DOWN>' in the "*Completions*" buffer (the latter also in the
minibuffer) now moves point to the completion candidate in the next line
in the current column, and wraps to the next column after the last
completion candidate of the current column. Likewise, typing 'p',
'S-TAB' or 'M-<UP>' moves point to the completion candidate in the
previous line or wraps to the previous column. Previously, these keys
ignored the vertical format, i.e., they moved point only to the item in
the same line of the next or previous column, in accordance with the
default horizontal format. In the vertical format, typing '<LEFT>' and
'<RIGHT>' in the "*Completions*" buffer (and when
'minibuffer-visible-completions' is non-nil, also in the minibuffer)
moves point only within the current line, analogously to how, in the
horizontal format, '<DOWN>' and '<UP>' move point only within the
current column.
補完バッファとウィンドウをインバッファ補完に使用することを意図している場合は、これを確実に設定したいでしょう。私は常に補完の表形式構造間のナビゲーションを少し奇妙で不快だと感じていました。確かにスペースの有効活用ですが、一致のフラットリストは理解しやすいです。
Selected completion candidate is preserved across "*Completions*" updates.
When the window point is on a completion candidate in the
"*Completions*" buffer (because of 'minibuffer-next-completion' or for
any other reason), it will remain on that candidate after the
"*Completions*" is updated with a new list of completions. The
candidate is deselected when the "*Completions*" buffer is hidden.
"*Completions*" is now displayed faster when there are many candidates.
As before, if there are more completion candidates than can be displayed
in the current frame, only a subset of the candidates is displayed.
This process is now faster: only that subset of the candidates is
actually inserted into "*Completions*" until you run a command which
interacts with the text of the "*Completions*" buffer. This
optimization only applies when 'completions-format' is 'horizontal' or
'one-column'.
New user option 'crm-prompt' for 'completing-read-multiple'.
This option configures the prompt format of 'completing-read-multiple'.
By default, the prompt indicates to the user that the completion command
accepts a comma-separated list. The prompt format can include the
separator description and the separator string, which are both stored as
text properties of the 'crm-separator' regular expression.
それはかなりまれな機能です。ミニバッファから複数のマッチを「トグル選択」できます。正直なところ、ほとんど何も使用しません。補完パッケージであっても、ユーザーエクスペリエンスはかなり悪いと思います。Helm はそれをうまくやっている数少ないツールの 1 つです。
マルチセレクトの実用的な例については、fzf の代わりに Emacs でファジー検索を参照してください。
New user option 'completion-preview-sort-function'.
This option controls how Completion Preview mode sorts completion
candidates. If you use this mode together with an in-buffer completion
popup interface, such as the interfaces that the GNU ELPA packages Corfu
and Company provide, you can set this option to the same sort function
that your popup interface uses for a more integrated experience.
('completion-preview-sort-function' was already present in Emacs 30.1,
but as a plain Lisp variable, not a user option.)
New user option 'completion-preview-inhibit-functions'.
This option provides fine-grained control over Completion Preview mode
activation. You can use it to specify arbitrary conditions in which to
inhibit the mode's operation.
これもカスタマイズしたいものです。paredit や combobulate コマンドで使用される一部の移動コマンドが補完ウィンドウをトリガーしないようにしたい場合があります。
New mode 'minibuffer-nonselected-mode'.
This mode, enabled by default, directs attention to the active
minibuffer window in the case the minibuffer window is no longer
selected, but still waiting for input. This uses the new
'minibuffer-nonselected' face.
これは気に入っています。デフォルトで有効になっているのは良いことです。選択されている/選択されていない状態がないと、少し混乱することがあります。
'read-multiple-choice' now uses the minibuffer to read a character.
It still can use 'read-key' when the variable
'read-char-choice-use-read-key' is non-nil.
'map-y-or-n-p' now uses the minibuffer to read a character.
It still can use 'read-key' when the variable
'y-or-n-p-use-read-key' is non-nil.
うーん。数年前に彼らがこれをやったとき、それは私を驚かせ、追跡するのが大変でした。もしあなたが私と同じように「はい」か「いいえ」のプロンプトに答える方法について同じ考えを持っているなら、これに注意してください。
'flex' completion style rewritten to be faster and more accurate.
Completion and highlighting use a new, superior algorithm. For example,
pattern "scope" now ranks 'elisp-scope-*' functions well above
'dos-codepage' and 'test-completion'. Pattern "botwin" finds
'menu-bar-bottom-window-divider' before 'ibuffer-other-window'.
Flex マッチは ido-mode の機能であり、これは厳密には「新しい」ミニバッファ補完システムに基づいた fido-mode 補完機能の再実装だと考えられます。Ido Mode の紹介 を Ido mode について、そしてミニバッファ補完の理解 を後者について参照してください。
マウス
New mode 'mouse-shift-adjust-mode' extends selection with 'S-<mouse-1>'.
When enabled, you can use the left mouse button with the '<Shift>' modifier
to extend the boundaries of the active region by dragging the mouse pointer.
クール。Emacs でドラッグ選択することはめったにありませんが、細かい作業の場合は、それが一度きりの作業であればキーボードよりも実際には速いです。
'context-menu-mode' now includes a "Send to..." menu item.
The menu item enables sending current file(s) or region text to external
(non-Emacs) applications or services. See send-to.el for customizations.
おお、これは素晴らしいです。M-x context-menu-mode 自体は比較的最近の機能です(Emacs 28)が、デフォルトではオンになっていません。これは、ものにコンテキスト右クリックメニューを追加します。カスタムコマンドが追加されたすべての場所を把握していませんが、デフォルトは少し…最小限なので、ほとんどの人がすぐに離れてしまったと想像できます。
コンテキストメニューモード(マイナーモードがアクティブかどうかにかかわらず)は M-x context-menu-open で手動でトリガーできます。
The mouse now drags lines in character increments again.
Dragging a horizontal or vertical line like the mode line or the lines
dividing side-by-side windows now happens in increments of the
corresponding frame's character size again. This is the behavior
described in the manual and was the default behavior before
'window-resize-pixelwise' was added for Emacs 24.1. To drag in pixel
increments, as with Emacs 24 through Emacs 30, customize
'window-resize-pixelwise' to t.
ウィンドウ
New commands to modify window layouts of frames.
'window-layout-rotate-clockwise' ('C-x w r <RIGHT>') and its counterpart
'window-layout-rotate-anticlockwise' ('C-x w r <LEFT>') rotate an entire
window layout.
'window-layout-flip-topdown' ('C-x w f <DOWN>', 'C-x w f <UP>') and
'window-layout-flip-leftright' ('C-x w f <LEFT>', 'C-x w f <RIGHT>')
flip the window layout vertically and horizontally.
'window-layout-transpose' ('C-x w t') reorganizes windows such that
every horizontal split becomes a vertical split and vice versa.
'rotate-windows' ('C-x w o <RIGHT>') and its counterpart
'rotate-windows-back' ('C-x w o <LEFT>') rotate windows in cyclic
ordering.
おお、これは素晴らしいです。しかし、おそらく私は一方の方向、時計回りか何かを選び、それを簡単にアクセスできるキーにバインドし、数回タップする屈辱に耐えるでしょう。このようなことをしたいと思うことはめったにありません。好奇心がありますが、実装はおそらくすべてのノード(Emacs のウィンドウタイリングウィンドウ分割はツリー構造として表されます)を循環するだろうと推測しています — M-: (window-tree) を実行して内部表現を確認してください。
New user option 'rotate-windows-change-selected'.
This controls whether 'rotate-windows' and 'rotate-windows-back' change
the selected window. If nil, the selected window does not change.
The default is t, which means the new selected window will be the one
that winds up at the location of the previously-selected window.
ウィンドウを回転させるが、それに伴って移動しない?いいえ、結構です。
New user option 'transpose-dedicated-windows'.
This controls how functions transposing or rotating windows handle
dedicated windows. The default is nil, which causes these function to
signal an error if they encounter a dedicated window.
はい、これは nil に設定したいでしょう。専用ウィンドウは固定ウィンドウです。それらを回転させることはおそらく意図したものではありません — あるいは、奇妙なワークフローを持っている場合はそうかもしれません。
Windmove commands now move to skipped windows if invoked twice in a row.
The new user option 'windmove-allow-repeated-command-override' controls
this behavior: if it is non-nil, invoking the same windmove command twice
overrides the 'no-other-window' property, allowing navigation to windows
that would normally be skipped. The default is t; customize it to nil
if you want the old behavior.
ご存知のように、C-x o はウィンドウをタップします。しかし、ウィンドウを no-other-window としてフラグ付けして、そのコマンドから除外することができます(Emacs のウィンドウマネージャーの解明を参照)。Windmove はもちろん、矢印キーを使ってウィンドウ間を移動できます。
New hook 'window-deletable-functions'.
This abnormal hook gives its client a way to save a window from being
deleted implicitly by functions like 'kill-buffer', 'bury-buffer' and
'quit-restore-window'.
Emacs は常にバッファとウィンドウの間で奇妙で断絶した関係を持っていました。ウィンドウマネージャーを飼いならそうとしたことがある人なら誰でも(前述の記事を参照)わかるように、これは pretty irreconcilable problem に重ねられたもう一つのパッチのように感じられます。ユーザー/パッケージが望まないものを操作するものを、簡単に交換できる 2 つのものからどのようにロックダウンできますか?さらに多くのフックで、そうなるようです…
Buffer-local window change functions now run in their buffers.
Running the buffer-local version of each of the abnormal hooks
'window-buffer-change-functions', 'window-size-change-functions',
'window-selection-change-functions' and 'window-state-change-functions'
will make the respective buffer temporarily current while running the
hook.
'window-buffer-change-functions' is run for removed buffers too.
The buffer-local version of 'window-buffer-change-functions' may now be
run twice: once for the buffer removed from the window and once for the
buffer now shown in that window.
New user option 'quit-window-kill-buffer'.
This option specifies whether 'quit-window' should preferably kill or
bury the buffer shown by the window to quit. The default is nil.
Customize it to t to always kill the buffer; customize to a list of
major modes to kill if the buffer's major mode is one of those.
New user option 'kill-buffer-quit-windows'.
This option has 'kill-buffer' call 'quit-restore-window' to handle the
further destiny of any window showing the buffer to be killed.
'split-window' can optionally resurrect deleted windows.
A new optional argument REFER of 'split-window' makes it possible to, instead
of making a new window object, reuse an existing, deleted one.
This can be used to preserve the identity of windows when swapping or
transposing them.
New window parameter 'quit-restore-prev'.
This parameter is set up by 'display-buffer' when it detects that the
window used already has a 'quit-restore' parameter. Its presence gives
'quit-restore-window' a way to undo a sequence of buffer display
operations more intuitively.
'quit-restore-window' handles new values for BURY-OR-KILL argument.
The values 'killing' and 'burying' are like 'kill' and 'bury' but assume
that the actual killing or burying of the buffer is done by the caller.
New user option 'quit-restore-window-no-switch'.
With this option set, 'quit-restore-window' will delete its window more
aggressively rather than switching to some other buffer in it.
ええと、上記のとおりです。これらのすべては、Emacs に解決不可能な問題に対処するための軟膏を塗るようなものです。ウィンドウに何かをホストさせ、バッファがどこにでも(機械的にまたはユーザーの気まぐれで)ジャンプして開くことができる場合… IDE のようなものを望むなら、それを適切にロックダウンするにはどうすればよいでしょうか?
これらのアイデアは好きです。そして、パッケージでさえ、実際に使用する人はほとんどいないと予測しています。
The user option 'display-comint-buffer-action' has been removed.
It has been obsolete since Emacs 30.1. Use '(category . comint)'
instead. Another user option 'display-tex-shell-buffer-action' has been
removed too, for which you can use '(category . tex-shell)'.
心配するようなことはあまりありません。
New user option 'split-window-preferred-direction'.
Functions called by 'display-buffer' split the selected window when they
need to create a new window. A window can be split either vertically
(one below the other) or horizontally (side by side). This new option
determines which direction will be tried first in the case that both
directions are possible according to the values of
'split-width-threshold' and 'split-height-threshold'. The default value
is 'longest', which means to prefer to split horizontally if the
window's frame is a "landscape" frame, and vertically if it is a
"portrait" frame. (A frame is considered to be portrait if its vertical
dimension in pixels is greater or equal to its horizontal dimension,
otherwise it is considered to be landscape.) Previous versions of Emacs
always tried to split vertically first, so to get the previous behavior,
you can customize this option to 'vertical'. The value 'horizontal'
always prefers the horizontal split.
ウィンドウ分割のランダム性にうんざりしていたなら朗報です。これで、少なくともどちらの方向に分割するかについて、少し制御できるようになります。これをメモしておき、分割方法が気に入らない場合は設定することをお勧めします。
The default value of 'split-width-threshold' is reduced from 160 to 150.
We believe that, after splitting, text filled to 75 columns remains
comfortable to read.
ここには異論はありません。
New optional argument INDIRECT for 'get-buffer-window-list'.
With this argument non-nil, 'get-buffer-window-list' will include in the
return value windows whose buffers share their text with BUFFER-OR-NAME.
New 'display-buffer' action alist entry 'reuse-indirect'.
With such an entry, 'display-buffer-reuse-window' may also choose a
window whose buffer shares text with the buffer to display.
間接バッファはパワーユーザー機能です。同じバッファで別々のことをしたい場合、分割して別のウィンドウで既に訪問したバッファを指すことができますが、共有メジャーモード、ポイントが正しい場所を覚えていないなど、厄介な問題に遭遇するでしょう。間接バッファは、クローン元となるベースバッファを指します。それは同じ基になるテキストですが、それ以外のすべて(メジャーモードなど)は別々です。
New variable 'window-state-normalize-buffer-name'.
When bound to non-nil, 'window-state-get' will normalize 'uniquify'
managed buffer names by removing 'uniquify' prefixes and suffixes. This
helps to restore window buffers across Emacs sessions.
New action alist entry 'this-command' for 'display-buffer'.
You can use this in 'display-buffer-alist' to match buffers displayed
during the execution of particular commands.
それは本当にクールですが、magit の厄介なディスパッチャーや org のようなものを介してトリガーされた場合にうまく機能するでしょうか?
New command 'other-window-backward' ('C-x O').
This moves in the opposite direction of 'other-window' and is for its
default keybinding consistent with 'repeat-mode'.
後方に移動するために負のプレフィックス引数を使用する必要はなくなりました。
New functions 'combine-windows' and 'uncombine-window'.
'combine-windows' is useful to make a new parent window for several
adjacent windows and subsequently operate on that parent.
'uncombine-window' can then be used to restore the window configuration
to the state it had before running 'combine-windows'.
これがアトミックウィンドウとどのように適合するか疑問に思います。アトミックウィンドウはウィンドウを「結合」する別の方法です。おそらく大きな違いがあるでしょう。なぜなら、これは display-buffer-alist に全く結びついていないからです。
New function 'window-cursor-info'.
This function returns a vector of pixel-level information about the
physical cursor in a given window, including its type, coordinates,
dimensions, and ascent.
フレーム
New function 'frame-deletable-p'.
If this function returns nil, the following call to 'delete-frame' might
fail to delete its argument FRAME or might signal an error. It is
therefore advisable to use this function as part of a condition that
determines whether to call 'delete-frame'.
New function 'frame-use-time'.
This function is the frame equivalent of the function 'window-use-time'
for a window. The result is the 'window-use-time' of the frame's most
recently used window.
New functions 'get-mru-frames' and 'get-mru-frame'.
'get-mru-frames' returns a list of frames sorted by their most recent
use time, among all frames, or among those visible or iconified on the
same terminal as the selected frame. Child frames can be excluded. A
single frame can be excluded (e.g. the selected frame). 'get-mru-frame'
returns the single most recently used frame.
After deleting, 'delete-frame' now selects the most recently used frame.
Previously, after deleting a specified frame, 'delete-frame' would
select the oldest visible frame on the same terminal. To revert to the
old behavior, set the new user option 'delete-frame-choose-selected'
to nil.
私はフレームユーザーではありません。なぜなら、それがうまく機能するようにカスタマイズすることが、それだけの価値があるとは見つけられなかったからです。タイリング WM も使用していますが。しかし、最後に見たフレームに戻ることは、今になって追加されたのは奇妙なことのように思えます。これは間違いなく、フレームのみのアプローチを好む人々の評判を回復するでしょう。
New value 'force' for user option 'frame-inhibit-implied-resize'.
This will inhibit implied resizing while a new frame is made. It can be
useful on tiling window managers where the initial frame size should be
specified by external means.
New user option 'alter-fullscreen-frames'.
This option is useful to maintain a consistent state when attempting to
resize fullscreen frames. It defaults to 'inhibit' on NS builds which
means that a fullscreen frame will not change size. It defaults to nil
everywhere else, which means that the window manager is supposed to
either resize the frame and change the fullscreen status accordingly, or
keep the frame size unchanged. The value t means to first reset the
fullscreen status and then resize the frame.
New functions to set frame size and position in one compound step.
'set-frame-size-and-position' sets the new size and position of a frame
in one compound step. Both size and position can be specified as with
the corresponding frame parameters 'width', 'height', 'left' and 'top'.
'set-frame-size-and-position-pixelwise' is similar but has a more
restricted set of values for specifying size and position.
New commands 'split-frame' and 'merge-frames'.
'split-frame' moves a specified number of windows from an existing frame
to a newly-created frame. 'merge-frames' merges all windows from two
frames into one of these frames and deletes the other one.
Frames can now be renamed to "F<number>" on text terminals.
Unlike with other frame names, an attempt to rename to "F<number>"
signals an error when a frame of that name already exists.
前述したように、ターミナル Emacs のフレームは、ウィンドウ構成/画面スタイルの「ウィンドウペイン」を行う別の方法にすぎません。
New frame parameters 'cloned-from' and 'undeleted'.
The frame parameter 'cloned-from' is set to the frame from which the new
frame is cloned using the command 'clone-frame'.
The frame parameter 'undeleted' is set to t when a frame is undeleted
using the command 'undelete-frame'.
These are useful if you need to detect a cloned or undeleted frame in
hooks like 'after-make-frame-functions' and
'server-after-make-frame-hook'.
Frames now have unique ids and the new function 'frame-id'.
Each non-tooltip frame is assigned a unique integer id. This allows you
to unambiguously identify frames even if they share the same name or
title. When 'undelete-frame-mode' is enabled, each deleted frame's id
is stored for resurrection. The function 'frame-id' returns a frame's
id (in C, use the frame struct member 'id').
New commands 'select-frame-by-id', 'undelete-frame-by-id'.
The command 'select-frame-by-id' selects a frame by ID and undeletes it
if deleted. The command 'undelete-frame-by-id' undeletes a frame by its
ID. When called interactively, both functions prompt for an ID.
モードライン
New definitions for mode line faces on dark backgrounds.
The faces 'mode-line' and 'mode-line-highlight' now have separate
definitions for dark backgrounds. Previously, these two faces looked
the same with both light and dark background modes. To get the previous
visuals for these two faces, customize them to have the colors "grey75"
and "grey40", respectively, regardless of the background mode.
New user option 'mode-line-collapse-minor-modes'.
This is a new, built-in facility to hide minor mode lighters. If
non-nil, minor mode lighters on the mode line are collapsed into a
single button. The value can also be a list to specify minor mode
lighters to hide or show. The default value is nil, which retains the
previous behavior of showing all minor mode lighters.
私の初期の記事の 1 つはモードライン文字列の非表示と置換(clean-mode-line を使用)でした。モードラインライターの音量をどのくらい大きくするかについて、モード作成者が発言権を持つようになって以来、それは問題でした。
ついに組み込まれたのは嬉しいです。:delight / :diminish が use-package にプラグインするかどうかについての言及はありません。
New user option 'mode-line-modes-delimiters'.
This option allows changing or removing the delimiters shown around
the major mode and list of minor modes in the mode line. The default
retains the existing behavior of using parentheses.
New minor mode 'mode-line-invisible-mode'.
This minor mode makes the mode line of the current buffer invisible.
The command 'mode-line-invisible-mode' toggles the visibility of the
current-buffer's mode line. The default is to show the mode line of
every buffer.
人々はこれを常に求めているので、以前のハックなトリックの代わりにこれを行うための組み込み機能があるのを見るのは良いことです。
The standard mode line no longer specifies minimum widths.
The default values for the 'mode-line-position' variable and
'mode-line-format' user option no longer specify any minimum widths. If
you use a proportional font for your mode line, you may need to
customize the values of these variables to include minimum widths again.
タブバーとタブライン
タブバーは切り替えるウィンドウ構成です。タブラインはブラウザのタブのようにウィンドウ内のバッファを指します。
New commands 'split-tab' and 'merge-tabs'.
'split-tab' moves a specified number of windows from an existing tab to
a newly created tab. 'merge-tabs' merges all windows from two tabs into
one of these tabs, and closes the other.
New abnormal hook 'tab-bar-auto-width-functions'.
This hook allows you to control which tab-bar tabs are auto-resized.
'mouse-face' properties are now supported on the 'tab-bar'.
'tab-bar' tab buttons are now highlighted when the mouse pointer
hovers over them. You can customize the new face
'tab-bar-tab-highlight'.
New abnormal hook 'tab-bar-post-undo-close-tab-functions'.
This hook allows you to operate on a reopened tab.
This is useful when you define custom tab parameters that may need
adjustment when a tab is restored, without resorting to advice.
私は実際にタブバーのタブを誤って閉じてしまうことがよくあります。そして、それには長年、誤操作を修正するための元に戻す機能 (C-x t u) がありました。
Tabs are now closed upon releasing the middle mouse button.
Previously, closing the tab-bar's tabs occurred upon pressing the
button.
New user option 'tab-bar-define-keys'.
This controls which key bindings tab-bar creates. Values are t, the
default, which defines all keys and is backwards compatible, 'numeric'
for tab number selection only, 'tab' for the 'TAB' and 'S-TAB' keys
only, and nil for none.
This is useful to avoid key binding conflicts, such as when folding in
outline mode using 'TAB' keys, or when a user wants to define her own
tab-bar keys without first having to remove the defaults.
New variable 'tab-bar-format-tab-help-text-function'.
This variable may be overridden with a user-provided function to
customize the help text for tabs displayed on the tab-bar. Help text is
normally shown in the echo area or via tooltips. See the variable's
docstring for the arguments passed to a help-text function.
New variable 'tab-bar-truncate'.
When non-nil, it truncates the tab bar, and therefore prevents
wrapping and resizing the tab bar to more than one line.
New user option 'tab-line-define-keys'.
When t, the default, it redefines window buffer switching keys
such as 'C-x <LEFT>' and 'C-x <RIGHT>' to tab-line specific variants
for switching tabs.
New command 'tab-line-move-tab-forward' ('C-x M-<RIGHT>').
Together with the new command 'tab-line-move-tab-backward'
('C-x M-<LEFT>'), it can be used to move the current tab
on the tab line to a different position.
New command 'tab-line-close-other-tabs'.
It is bound to the tab's context menu item "Close other tabs".
New user option 'tab-line-exclude-buffers'.
This user option controls where 'tab-line-mode' should not be enabled in
a buffer. The value must be a condition which is passed to
'buffer-match-p'.
New user option 'tab-line-close-modified-button-show'.
With this user option, if non-nil (the default), the tab close button
will change its appearance if the tab's selected buffer has been
modified.
New user option 'tab-line-tabs-window-buffers-filter-function'.
This user option controls which buffers should appear in the tab line.
By default, this is set so as to not filter out any buffers.
これは便利です。タブラインの 1 つの問題は、非常に無差別に機能することです。デフォルトでは非表示バッファを表示しません(それらは空白で始まります)が、それでも少し強引です。これで、少なくとも表示するものを制限できます。
New faces 'tab-line-active' and 'tab-line-inactive'.
These inherit from the 'tab-line' face, but the faces actually used on
the tab lines are now these two: the selected window uses
'tab-line-active', and non-selected windows use 'tab-line-inactive'.
ヘルプ
New binding 'C-h u' for 'apropos-user-option'.
IDLWAVE has moved to GNU ELPA.
The version included with Emacs is out-of-date, and is now marked as
obsolete. Use 'list-packages' to install the 'idlwave' package from GNU
ELPA instead.
New faces 'header-line-active' and 'header-line-inactive'.
These inherit from the 'header-line' face, but the faces actually used on
the header lines are now these two: the selected window uses
'header-line-active', and non-selected windows use 'header-line-inactive'.
便利です。ヘッダーラインは、ウィンドウの上部に表示される移動不可能なヘッダーです。テーブルの列ヘッダーなどによく使用されます。M-x list-packages で見られます。
In 'customize-face', the "Font family" attribute now supports completion.
まさに天の恵みです。私は長年、この複雑な .Xresources、フレーム設定フェイス、およびデフォルトフォントを設定するあらゆる種類の複雑な方法をいじることは悪い習慣であり、M-x customize-face RET default RET が代替手段と比較して最もシンプルで効果的であると主張してきました。さて、フォントの名前を推測する必要はなくなりました!Emacs はついにそれらを自動補完できるようになりました。素晴らしい変更です。
'process-adaptive-read-buffering' is now nil by default.
Setting this variable to a non-nil value reduces performance and leads
to wrong results in some cases. We believe that it is no longer useful;
please contact us if you still need it for some reason.
Emacs を少しでも速くする可能性のある魔法の機能トグルリストの一部である、Emacs を少し速くするかもしれないトグルスイッチ。私の Emacs をチェックしたところ、nil に設定されていました。なぜ nil に設定したのか、いつ設定したのか覚えていません。
'byte-compile-cond-use-jump-table' is now obsolete.
Modified settings for an enabled theme now apply immediately.
Evaluating a 'custom-theme-set-faces' or 'custom-theme-set-variables'
call for an enabled theme causes the settings to apply immediately,
without a need to re-load the theme.
'describe-variable' now automatically says if 'setopt' is needed.
If a user option has a defcustom ':set' function, users will normally
need to set it with 'setopt' for it to take an effect. If the docstring
doesn't already mention 'setopt', the 'describe-variable' command will
now add a note about this automatically.
Emacs で最も大きな課題の 1 つは、人々(私自身を含む)に、グローバル/カスタマイズ可能な変数に値をバインドするために setq を使用するのをやめるように説得することです。Emacs のカスタマイズシステム(M-x customize で編集できるものすべて)は、エッジトリガーをサポートしています。これは、かつては珍しすぎて誰も気にする必要がなかったものです。Emacs の多くのものがこのシステムに依存するようになっています。
人々が setq を使用する主な理由は、それが(エッジトリガーを無視すれば)うまく機能するからですが、カスタマイズの仕組みを通じて変数を設定する正しい方法は custom-set-variables であり、それは厄介なユーティリティ関数であり、悪いプレフィックス名前空間 custom vs customize を持っているだけでなく、タイプするのが非常に長いです。
だから誰もそれを使用しませんでした。Emacs 29.1 は setopt を追加し、それはすべての重労働を自動的に行い、setq のドロップイン代替となります。
New user option 'eldoc-help-at-pt' to show help at point via ElDoc.
When enabled, display the 'help-at-pt-kbd-string' via ElDoc. This
setting is an alternative to 'help-at-pt-display-when-idle'.
Eldoc は Emacs のヘルプ/ドキュメント/コード引数ルックアップシステムで、ポイントを移動するとアクティブになります。トリガーヘルプのために複雑なタイミング機構に依存しています。ポイントで表示させること(ほとんどの場合現在のポイントですが)は、素晴らしいユーティリティ機能です。タイマーなしで eldoc を持つことができるようになりました。必要に応じてキーにバインドし、それが実行されます。
New user option 'native-comp-async-on-battery-power'.
Customize this to nil to disable starting new asynchronous native
compilations while AC power is not connected.
どこかのラップトップが Zildjian シンバルのようにボコボコになった人が、ネイティブコンパイルで最後の 5% のバッテリーを失い、この問題を一度解決することを熱狂的に決定しました。
New user option 'show-paren-not-in-comments-or-strings'.
If this option is non-nil, it tells 'show-paren-mode' not to highlight
parens inside comments and strings. If set to 'all', 'show-paren-mode'
will never highlight parens that are inside comments or strings. If set
to 'on-mismatch', mismatched parens inside comments and strings will not
be highlighted. If set to nil (the default), highlight parens wherever
they are.
Show paren はもちろん Emacs の括弧ハイライターですが、その名前は今日ではそれを不当に扱っています。なぜなら、それは括弧、文字列引用符、または begin や end のような用語をハイライトするように設計されているからです。
New user option 'view-lossage-auto-refresh'.
If this option is non-nil, the lossage buffer of 'view-lossage' will be
refreshed automatically for each new input keystroke and command
invoked.
Lossage は C-h l で、Emacs で入力された最後の N キー数を反映します。自動リフレッシュが有効になっていると、ストリーミングビデオで使用される「キーストロークオーバーレイ」の基本的なバージョンのシミュレーションができます。GIF にも便利です!
Change in SVG foreground color handling.
SVG images no longer have the 'fill' attribute set to the value of
':foreground' or the current text foreground color. The 'currentcolor'
CSS attribute is still set, as before.
This change should result in more consistent display of SVG images.
To use the ':foreground' or current text color ensure the 'fill' attribute
in the SVG is set to 'currentcolor', or set the image spec's ':css'
value to 'svg {fill: currentcolor;}'.
Errors signaled by 'emacsclient' connections can now enter the debugger.
If 'debug-on-error' is non-nil, errors signaled by Lisp programs
executed by 'emacsclient' connections will now enter the Lisp debugger
and show a backtrace. If 'debug-on-error' is nil, these errors will be
sent to 'emacsclient', as before, and will be displayed on the terminal
from which 'emacsclient' was invoked.
Empty string arguments to emacsclient are no longer ignored.
Emacs previously discarded arguments to emacsclient of zero length, such
as in 'emacsclient --eval "(length (pop server-eval-args-left))" ""'.
These are no longer discarded.
へえ。これは、長年 emacsclient に eval を呼び出す際に遭遇したいくつかの奇妙な問題の原因だったかもしれません。私はいつも自分が何か間違ったことをしたと思い込んでいました!
Emacs now uses the 'setrgbf' and 'setrgbb' terminfo capabilities.
Emacs now uses 24-bit colors on terminals that support the 'setrgbf' and
'setrgbb' user-defined terminfo capabilities. These are supported by
more terminals and applications than the old capabilities, 'setf24',
and 'setb24', which are now obsolete.
私はターミナルキャップの専門家ではないので、これらのキャップが人々に何を提供するのかはわかりませんが、Emacs はすでに 24 ビットをサポートしています。実際、環境変数 COLORTERM=truecolor を設定するだけで、Emacs にターミナルを 24 ビット対応として扱うように強制できます。
New user option 'xterm-update-cursor' to update cursor display on TTYs.
When enabled, Emacs sends Xterm escape sequences on Xterm-compatible
terminals to update the cursor's appearance. Emacs can update the
cursor's shape and color. For example, if you use a purple bar cursor
on graphical displays then when this option is enabled Emacs will use a
purple bar cursor on compatible terminals as well. See the Info node
"(emacs) Cursor Display" for more information.
素敵です。ハイライトはもちろん、Emacs には複数のカーソルスタイルがあることです。M-x customize-option cursor-type を参照してください。
New command 'copy-theme-options'.
You can use this command to copy options from a theme into your user
configuration.
New user option 'multiple-terminals-merge-keyboards'.
Customizing this option to non-nil disables entering single-keyboard
mode in most cases in which Emacs would by default enter that mode.
This can make things work better for some cases of X forwarding; see the
Info node "(emacs) Multiple Displays".
Emacs now comes with Org v9.8.
See the file "etc/ORG-NEWS" for user-visible changes in Org.
New user option 'compilation-search-extra-path'.
compile.el will now use paths specified in both
'compilation-search-extra-path' and 'compilation-search-path' when
searching. 'compilation-search-extra-path' is consulted first. One
possible use case for this option is to add new search paths on a
per-project basis with directory-local variables.
Emacs 31.1 の編集変更
Commands for keyboard translation.
'key-translate' is now interactive. It prompts for a key to translate
from, and another to translate to, and sets 'keyboard-translate-table'.
The new command 'key-translate-remove' prompts for a key/translation
pair, with 'completing-read', and removes the translation from the
translation table.
Emacs でキーバインディングをマスターする に関する私の記事は、キーバインディングの開始点として適しています。
しかし、キーボード翻訳を理解するには良い記事ではありません。私自身も、それを説明する記事を書こうとするほど狂ってはいません。私はCombobulate の中で、一部のターミナル、一部のキーバインディング、そして Combobulate の複雑な「カルーセルインターフェイス」でのみ発生する奇妙なキーボード翻訳の問題を追跡するために、ほぼ丸一日を費やしました。
翻訳システム — そしてそれが OS、tty などにどのように接続されるか — を完全に理解しようとすると、気が狂います。
国際化
Emacs now supports Unicode Standard version 17.0.
New input method 'greek-polytonic'.
This input method has support for polytonic and archaic Greek
characters.
New language environment and input method for Tifinagh.
The Tifinagh script is used to write the Berber languages.
New input methods for Northern Iroquoian languages.
Input methods are now implemented for Haudenosaunee languages in the
Northern Iroquoian language family: 'mohawk-postfix' (Mohawk
[Kanien’kéha / Kanyen’kéha / Onkwehonwehnéha]), 'oneida-postfix' (Oneida
[Onʌyote’a·ká· / Onyota’a:ká: / Ukwehuwehnéha]), 'cayuga-postfix'
(Cayuga [Gayogo̱ho:nǫhnéha:ˀ]), 'onondaga-postfix' (Onondaga
[Onųdaʔgegáʔ]), 'seneca-postfix' (Seneca [Onödowá’ga:’]), and
'tuscarora-postfix' (Tuscarora [Skarù·ręʔ]). Additionally, there is a
general-purpose 'haudenosaunee-postfix' input method to facilitate
writing in the orthographies of the six languages simultaneously.
New input methods for languages based on Burmese.
These include: Burmese, Burmese (visual order), Shan, and Mon.
New language environment and input methods for Syriac languages.
A new language environment for languages that use the Syriac script:
Classical Syriac, Aramaic, and others. There are two new input methods
for these languages: Syriac and Syriac (phonetic).
'visual-wrap-prefix-mode' now supports variable-pitch fonts.
When using 'visual-wrap-prefix-mode' in buffers with variable-pitch
fonts, the wrapped text will now be lined up correctly so that it is
exactly below the text after the prefix on the first line.
Visual wrap prefix modeは、長い行を切り詰めること(M-x toggle-truncate-lines)や視覚的な行モード(M-x visual-line-mode)と混同しないようにしてください。これは、1行を超えるテキストが折り返され、どのように折り返されるかに関係しています。どちらが何をするかはここでは説明しません。それぞれ試して、どれが最もよく機能するか確認してください。
New commands 'unix-word-rubout' and 'unix-filename-rubout'.
Unix-words are words separated by whitespace regardless of the buffer's
syntax table. In a Unix terminal or shell, 'C-w' kills by Unix-word.
The new commands 'unix-word-rubout' and 'unix-filename-rubout' allow
you to bind keys to operate more similarly to such a terminal.
Emacs はすべてを持っているのに、特にそのルーツを考えると、これを行うための方法のパノプティコンがすでにあったはずです。
正直なところ、この方法で削除することを熱狂的に支持している人でも、その習慣を忘れることをお勧めします。Emacs の単語による移動・編集・削除などの統合システムは、はるかに優れています。
New user option 'kill-region-dwim'.
This option, if non-nil, modifies the fall-back behavior of
'kill-region' ('C-w') if no region is active, and will kill the last
word instead of raising an error. If you have disabled Transient Mark
mode you might prefer to bind 'unix-word-rubout' to a key instead.
いいえ、これは正しい方向ではありません。C-w と M-w は、リージョンがない場合、現在の行を削除し、それぞれコピーするべきです。これは、Emacs 31 より前のダミーの非 TMM 動作にフォールバックするよりもはるかに合理的なアプローチです。
これを行うために 20 年以上前に Emacswiki から盗んだコードを次に示します。私のお気に入りの Emacs ライフハックの 1 つです。
(defadvice kill-ring-save (before slick-copy activate compile)
"When called interactively with no active region, copy a single line instead."
(interactive
(if mark-active (list (region-beginning) (region-end))
(list (line-beginning-position)
(line-beginning-position 2)))))
(defadvice kill-region (before slick-cut activate compile)
"When called interactively with no active region, kill a single line instead."
(interactive
(if mark-active (list (region-beginning) (region-end))
(list (line-beginning-position)
(line-beginning-position 2)))))
New user option 'delete-pair-push-mark'.
This option, if non-nil, makes 'delete-pair' push a mark at the end of
the region enclosed by the deleted delimiters. This makes it easy to
act on that region. For example, you can highlight it using 'C-x C-x'.
これは便利です。M-x delete-pair(通常は何もバインドされていません)は、デフォルトでバインドされていない、役立つ編集コマンドの長いリストです。一般的な問題は、少しずつ削除することの 1 つは、Emacs が変更が行われた範囲を簡単にキャプチャできないことです。マークをプッシュすること(Emacs の小さなポイントビーコンシステム)は、明らかな選択肢です。
Electric Pair モード
Electric Pair mode can now pair multiple delimiters at once.
You can now insert or wrap text with multiple sets of parentheses and
other matching delimiters at once with Electric Pair mode, by providing
a prefix argument when inserting one of the delimiters.
クールですが、これを覚えることはないでしょう。私は「考える前にタイプする」という学校には通っていません。ステップを数えてから正しい数値引数を使用します。
Electric Pair mode now supports multi-character paired delimiters.
'electric-pair-pairs' and 'electric-pair-text-pairs' now allow using
strings for multi-character paired delimiters.
To use this, add a list to both electric pair user options: '("/*" . "*/")'.
You can also specify that an extra space should be inserted after the
first string, like this: '("/*" " */" t)'.
Electric pair は、Emacs が長年標準になった前に多くの人が使用していたハックなスケルトンテンプレートシステムよりもはるかに優れているため、神の恵みです。しかし、再びこれは、Emacs のコア自体が C で書かれており、/* */ がコメントとして常に使用されていることを考えると、期待できる機能です。
New user option 'electric-indent-actions'.
This user option specifies a list of actions to reindent. The possible
elements for this list are: 'yank' to reindent the yanked text, and
'before-save' to indent the whole buffer before saving it.
いつものように、これがホワイトスペースに敏感な言語でどの程度うまく機能するかはまだわかりません。インデントエンジンをうまく処理するように調整するのがいかに難しいかは経験から知っています。したがって、Python のようなものにとっては、固定インデント以上のことはできません。
You can now use 'M-~' during 'C-x s' ('save-some-buffers').
Typing 'M-~' while saving some buffers means not to save the buffer and
also to mark it as unmodified. This is an alternative way to mark a
buffer as unmodified which doesn't require switching to that buffer.
M-~ は一般的に、バッファが Emacs で変更されているかどうかを示すフラグのキーバインディングです。ほとんどの人はこのあいまいなコマンドについて知りません。
New minor mode 'delete-selection-local-mode'.
This mode sets 'delete-selection-mode' buffer-locally. This can be
useful for enabling or disabling the features of 'delete-selection-mode'
based on the state of the buffer, such as for the different states of
modal editing packages.
Delete selection mode は、ほとんどのエディタが動作する方法です。テキストを選択し、入力を開始すると、削除されて入力したもので置き換えられます。Emacs では、この機能を取得するためにモードを有効にする必要があります。
New user option 'exchange-point-and-mark-highlight-region'.
When set to nil, this modifies 'exchange-point-and-mark' so that it doesn't
activate the mark if it is not already active.
The default value is t, which retains the old behavior.
This variable has no effect when Transient Mark mode is off.
私は 15 年近く、この正確な誤動作のためにアドバイスをカーゴカルトしてきました。transient mark mode のマークコマンドの修正を参照してください。
C-x C-x は Emacs のもう 1 つの隠された宝石です。Emacs にはポイント(カーソル)とマーク(バッファ内のどこかのビーコン)があり、昔は Emacs はデフォルトでテキストを選択してもハイライトしませんでした。視覚的な補助なしでスラムする必要がありました。マークとポイントしかありませんでした。悪く聞こえますが…実際にはそれほど大きな問題ではありません。通常、どこからマークを開始したかはわかっており、ポイントまで実行されます。
Transient-mark-mode(明らかに…最近はデフォルトで有効…)により、リージョン選択を確認できるようになりました。しかし…それはいくつかの便利な機能を奇妙な方法で壊しました。M-< などを実行してバッファの先頭または末尾に移動したり、C-s を実行して isearch を開始すると、Emacs はマークを設定します。これは、リージョンが「どこにあるか」の開始を設定することを意味します。
パワーユーザーは場所を選び、検索またはジャンプして必要な場所に移動し、「リージョン」コマンドを実行していました。これは、C-s で選択した一致など、C-s を最初に呼び出した場所からどこにでもポイントが着地した場所から機能していました。バム — それがリージョンに作用する方法でした。
したがって、C-x C-x は当時、本当に、本当に重要な目的を持っていました。マークとポイントの位置を交換することで、それらを切り替えることができました。確認したいリージョンを確認したいだけの場合、または場所を切り替えたい場合などに最適です。
次にコマンド(kill-region など)を実行すると、Emacs のコードは — 忠実に、骨の折れるように、私は付け加えたい — 常にポイントとマークが内部で正しい順序であることを確認し、その範囲に作用していました。
ハイライトをミックスに追加すると、C-x C-x はリージョンマーカー(C-SPC)もアクティブにするため、どこにでもあなたを追跡する愚かな長方形になります。非常に愚かです。キーボードマクロやその他のすべてを台無しにするからです。ぶー。
だから 15 年前に私はそれをしないようにしました。そして、あなたもそうすべきです。
You can now use 'M-s t' to swap FROM and TO during 'query-replace'.
Likewise during 'query-replace-regexp'. The original binding of 'M-s'
('next-matching-history-element') is now available on 'M-s M-s' or 'M-s
s' for query replace minibuffer input.
ハッ。クール。数バージョン前、さまざまなクエリ置換関数が、から/へのを示す特別な -> シジルを発行するようにしました。文字列全体を編集して移動でき、今ではそれをさらに簡単にするための便利なショートカットが追加されました。
New commands for filling text using semantic linefeeds.
The new command 'fill-paragraph-semlf' fills a paragraph of text using
"semantic linefeeds", where a newline is inserted after every sentence.
The new command 'fill-region-as-paragraph-semlf' fills a region of text
using semantic linefeeds, as if the region were a single paragraph. You
can set the variable 'fill-region-as-paragraph-function' to the value
'fill-region-as-paragraph-semlf' to make commands like 'fill-paragraph'
and 'fill-region' fill text using semantic linefeeds.
Temporary files are named differently when 'file-precious-flag' is set.
When the user option 'file-precious-flag' is set to a non-nil value,
Emacs now names the temporary file it creates while saving buffers using
the original file name with ".tmp" appended. Thus, if saving the buffer
fails for some reason, and the temporary file is not renamed back to the
original file's name, and you can easily identify which file's saving
failed.
'C-u C-x .' clears the fill prefix.
You can now use 'C-u C-x .' to clear the fill prefix, similarly to how
you could already use 'C-u C-x C-n' to clear the goal column.
Fill prefix C-x . は、行上のポイントがどこにあるかを見て、ポイントから行の先頭までのすべてをフィルプレフィックスとして指定します。M-q を長い段落に入力すると、段落が再フォーマットされ、新しい行ごとにフィルプレフィックスが挿入されます。ユースケースには、メールの段落に > などを付けることが含まれます。
これで、bol にポイントを移動することなくリセットできます。
New prefix argument for 'C-/' in Dired and Proced modes.
The Dired and Proced major modes bind mode-specific undo commands to the
same keys to which 'undo' is globally bound, 'C-/', 'C-_' and 'C-x u'.
These commands did not previously accept a prefix argument.
Now a numeric prefix argument specifies a repeat count, just like it
already did for 'undo'.
New minor mode 'center-line-mode'.
This mode keeps modified lines centered horizontally according to the
value of 'fill-column', by calling 'center-line' on each non-empty line
of the modified region.
New command 'unfill-paragraph'.
This is the inverse of 'M-q' ('fill-paragraph').
org mode か何かが何年も前からコードベースのどこかにこれを隠していたと確信しています。しかし、まあ、便利でしょう。
Emacs 31.1 の特殊モードおよびパッケージの変更点
Project
Project は、Emacs に付属する一連のプロジェクト管理スイートの最新版です。良いものなので、ぜひ使用してください。
New command 'project-root-find-file'.
It is equivalent to running 'project-any-command' with 'find-file'.
New command 'project-customize-dirlocals'.
It is equivalent to running 'project-any-command' with
'customize-dirlocals'.
Improved prompt for 'project-switch-project'.
The prompt now displays the project on which to invoke a command.
'project-prompter' values may be called with up to three arguments.
These allow callers of the value of 'project-prompter' to specify a
prompt string; prompt the user to choose between a subset of all the
known projects; and disallow returning arbitrary directories.
See the docstring of 'project-prompter' for a full specification of
these new optional arguments.
'project-current' has a new optional argument, MAYBE-PROMPT.
If 'project-current' is called with this argument non-nil, then it is
passed to the 'project-prompter' to use as a prompt string.
Callers can use this to indicate the reason for which or context in
which Emacs should ask the user to select a project.
New command 'project-find-matching-buffer'.
It can be used when switching between projects with similar file trees
(such as Git worktrees of the same repository). It supports being
invoked standalone or from the 'project-switch-commands' dispatch menu.
See also the 'C-x v w w' ('vc-switch-working-tree') command, below.
それは良い対称性です。私は通常、magit で % g を使ってワークツリーを切り替えますが、プロジェクトがこれの一般的なサポートを得たのを見るのは嬉しいです。
New variable 'project-find-matching-buffer-function'.
Major modes can set this to major mode-specific functions to control how
'project-find-matching-buffer' finds matching buffers.
New user option 'project-list-exclude'.
This user option describes projects that should always be skipped by
'project-remember-project'.
New user option 'project-prune-zombie-projects'.
This user option controls the automatic deletion of projects from
'project-list-file', when prompting for a project, that cannot be
accessed. The value must be an alist where each element is of the
form:
(WHEN . PREDICATE)
where WHEN specifies where the deletion will be performed, and PREDICATE
is a function which takes one argument, and must return non-nil if the
project should be removed.
New command 'project-save-some-buffers' bound to 'C-x p C-x s'.
This is like 'C-x s', but only for this project's buffers.
'project-remember-project' is now interactive.
'project-shell' and 'project-eshell' support numeric prefix buffer naming.
They now accept numeric prefix arguments to select or create numbered
shell sessions. For example, 'C-2 C-x p s' switches to or creates a
buffer named "*name-of-project-shell<2>*". By comparison, a plain
universal argument as in 'C-u C-x p s' always creates a new session.
'project-switch-to-buffer' re-uniquifies buffer names while prompting.
When 'uniquify-buffer-name-style' is non-nil, 'project-switch-to-buffer'
changes the buffer names to only make them unique within the given
project, during completion. That makes some items shorter.
'project-switch-to-buffer' uses 'project-buffer' as completion category.
The category defaults are the same as for 'buffer', but any user
customizations need to be re-added.
'project-mode-line' can now show the project name only for local files.
If the value of 'project-mode-line' is 'non-remote', project name and
the Project menu will be shown on the mode line only for projects with
local files.
人々がカスタマイズした Emacs 設定でパフォーマンスの問題を引き起こす一般的な原因の 1 つは、驚くべきことにモードラインです。あなたが思うよりも頻繁に再レンダリングされ、多くの人が高価なジャンクを詰め込んでいます。ファイルシステムへのラウンドトリップが必要です。MacBook でファイルを見ているだけなら問題ありません。しかし、TRAMP を介して?パフォーマンスが低下します。
The VC-aware project backend caches the current project and its name.
The duration for which the values are cached depends on whether it is
called from a 'non-essential' context, and is determined by the variables
'project-vc-cache-timeout' and 'project-vc-non-essential-cache-timeout'.
Network Security Manager (NSM)
NSM warns about TLS 1.1 by default.
It has been deprecated by RFC 8996, published in 2021.
NSM warns about DHE and RSA key exchange by default.
Emacs now warns about ephemeral Diffie-Hellman key exchange, and static
RSA key exchange, also when 'network-security-level' is customized to
its default 'medium' value.
Etags
Ctags、Etags などはすべてソースコードインデクサーのファミリーであり、関数名とその正確な場所のような意味的に重要なものを抽出します。
New command-line options for handling unrecognized programming languages.
The new command-line option '--no-fallback-lang' disables attempts to
parse as Fortran or C/C++ files whose programming language 'etags' could
not determine. This allows avoiding false positives and reduces the
time required to scan directories with many such files. Another new
option '--no-empty-file-entries' disables generation of file entries in
tags tables for files in which no tags were found.
Delete Selection モード
New face 'delete-selection-replacement' for the replacement text.
This comes with a change to how we track what is considered "the
replacement text", which should be more robust, and is made more clear
by the highlighting.
Editorconfig
'editorconfig-apply' is declared obsolete.
You can now use 'editorconfig-display-current-properties' without having
to call 'editorconfig-apply'.
Auth Source
Auth source は Emacs の宣言的な秘密ストアラッパーです。それについて書きました。GnuPG と Auth Sources を使用して Emacs で秘密を管理する
Non-existing or empty files in 'auth-sources' are ignored.
File-based data stores are ignored in 'auth-sources' if the underlying
data file does not exist. This is relevant if a new secret is stored in
such a file; the first usable entry of 'auth-sources' is selected as the
target file. If you want files that do not exist to also be selected,
customize the user option 'auth-source-ignore-non-existing-file' to nil.
'auth-sources' set to nil means use only the password cache.
Autoinsert
Autoinsert は、Skeleton、Abbrev、Tempo などとは異なり、特定のファイルパターンに一致する新しいファイルを作成したときにテキストテンプレートを挿入するために使用されます。
New condition for 'auto-insert-alist'.
'auto-insert-alist' can now contain predicates taking no argument as
conditions. These types of conditions should be declared with
'(predicate FUNCTION)'. This allows triggering 'auto-insert' with
finer-grained control.
Register
レジスタは、テキストスニペット、ウィンドウ/フレーム構成、ポイント位置などの一時的なストアです。これらは高速なキーボードアクセス用に設計されており、私は特にキーボードマクロでそれらを常に使用しています。
New commands 'buffer-to-register' and 'file-to-register'.
These allow users to interactively store files and buffers in registers.
Killed buffers stored in a register using 'buffer-to-register' are
automatically converted to a file-query value if the buffer was visiting
a file.
だから、ブックマークのようなものだと思います。ブックマークは、ファイル、情報マニュアルの場所などへの参照の永続的なストアです。
The "*Register Preview*" buffer shows only suitable registers.
That was already the case for the "fancy" UI but is now also true in
the default UI you get, i.e., when 'register-use-preview' is 'traditional'.
The "*Register Preview*" buffer shows sorted items.
Tree-sitter
Tree-sitter は、コード、マークダウンなどの構造化テキスト用の派手な解析スイートです。Tree-sitter について、そして Tree-sitter と対話するコードについても、途方もない量の記事を書いてきました。
Tree-Sitter の始め方、Combobulate: Tree-Sitter による構造化された移動と編集などを参照してください。
New user option 'treesit-enabled-modes'.
You can customize it either to t to enable all available
tree-sitter-based modes, or to select a list of tree-sitter-based modes
to enable. Depending on your customization, it modifies the variable
'major-mode-remap-alist' from the corresponding variable
'treesit-major-mode-remap-alist' prepared by tree-sitter-based mode
packages.
私は長年、リマップシステムと、Tree-sitter モードがしばしばそれらに取って代わろうとしている元の、TS 非対応の親玉の単なる薄っぺらな再実装であることが多いという事実について不平を言っていました。しかし、リマップ alist の設定は初心者には手間がかかったので、簡略化に向けた動きが見られて嬉しいです。
New user option 'treesit-auto-install-grammar'.
It controls the automatic installation of tree-sitter grammar libraries
needed for tree-sitter-based modes, if these grammar libraries are not
available when such modes are turned on.
やっとです。Tree-sitter ライブラリと各メジャーモードが必要とする Tree-sitter ライブラリの正しい、魔法のようなバージョンの数十の複雑な git ref を持ち運ぶ必要があったことは、すべての人にとってまったくひどい UX でした。
Tree-sitter の採用は、各メジャーモードが動作するために必要なものと正確に一致する GitHub リリースタグにテキスト文字列を保持することを拒否するという決定のために、本来あるべき姿のほんの一部です。
ご覧のとおり、Tree-sitter ライブラリと文法を構築したポインデクスターは、常に互換性を壊します。したがって、新しいバージョンをプルしても機能するとは限りません — そうはなりません。
これは良いことです。しかし、この変更が行われるまでに数年かかり、おそらく多数のユーザーバグが報告されたと想像できます。
'treesit-extra-load-path' is now a customizable user option.
The first directory in the list is used as the default directory
to install the language grammar when 'treesit-auto-install-grammar'
is 'ask', 'ask-dir' or 'always'.
'treesit-language-source-alist' supports keywords.
The language and URL are mandatory, but remaining data can use keywords like
(json "https://github.com/tree-sitter/tree-sitter-json" :commit "4d770d3")
The file treesit-x.el defines a number of simple tree-sitter modes.
Using the new macro 'define-treesit-generic-mode', generic modes are
defined including, but not limited to, 'gitattributes-generic-ts-mode'.
Visiting a file in such mode asks for confirmation before installing
its tree-sitter grammar. Then it highlights the visited file
according to the syntax defined by the grammar.
素晴らしい。すでに generic.el に define-generic-mode があり、簡単なファイル形式のメジャーモードをすばやく作成できます。ここでは、TS 文法がしばしばバンドルされている .scm ファイルを活用して、構文ハイライトのすぐに使える提案を提供できます。正直なところ、私たちの Emacs システムははるかに優れていますが…誰かが最初に正しくTree-Sitter メジャーモードを作成する必要があります。だからこれは良い妥協案です。
Indirect buffers can have their own parser list.
Before, indirect buffers share their base buffer's parser list and
parsers. Now they can have their own parser list.
便利です。しかし、私は長年、バッファ内の複数のパーサーの複雑で不十分な扱いについて不平を言っていました。いいえ、範囲システムは複雑なケースには十分ではありません。クエリに依存するためです。これはそれを助けませんが、バッファ外レンダリングには役立ちます。それは何かです。
New variable 'treesit-language-remap-alist'.
This variable allows a user to remap one language into another, such
that creating a parser for language A actually creates a parser for
language B. By extension, any font-lock rules or indentation rules for
language A will be applied to language B instead.
This is useful for reusing font-lock rules and indentation rules of
language A for language B when language B is a strict superset of
language A.
New accessor functions for each setting in 'treesit-font-lock-settings'.
Now you can access a setting's query, feature, enable flag, and override
flag by 'treesit-font-lock-setting-query',
'treesit-font-lock-setting-feature', 'treesit-font-lock-setting-enable',
and 'treesit-font-lock-setting-override'.
New tree-sitter thing 'list'.
Unlike the existing thing 'sexp' that includes both lists and atoms, 'list'
only makes lists be navigated by 'forward-sexp'.
The new command 'treesit-forward-sexp-list' uses 'list' to move across
lists. But to move across atoms inside the list it uses
'forward-sexp-default-function'.
New tree-sitter based functions for moving by lists.
If a major mode defines 'list' in 'treesit-thing-settings', tree-sitter
setup for these modes sets 'forward-list-function' to 'treesit-forward-list',
'up-list-function' to 'treesit-up-list', and 'down-list-function' to
'treesit-down-list'. This enables the 'forward-list', 'up-list', and
'down-list' motion commands for those modes.
New command 'treesit-cycle-sexp-thing'.
It cycles the type of navigation for commands that move across sexp's
and lists, such as 'treesit-forward-sexp', 'treesit-forward-list',
'treesit-down-list', and 'treesit-up-list'. The type can be either
'list', the default, or 'sexp'.
With the default 'list' type, these commands move using syntax tables for
symbols and using the thing 'list' for lists.
With the 'sexp' type, these commands move across nodes defined by
the tree-sitter thing 'sexp' in 'treesit-thing-settings'.
したがって、これらの変更は、以前の状況からの大幅な改善であるという意味で良いものです。基本的に、TS 対応モードでのすべての -sexp 移動および編集コマンドは、基本的な Emacs で -sexp コマンドがどのように機能するかについての非常に単純な理解を持っていたため、TS 対応メジャーモードで期待どおりに機能しませんでした。
完璧ではありません(ヒューリスティックでは決して完璧にはなりません)が、改善されています。Combobulate: Tree-Sitter による構造化された移動と編集 を参照してください。
Tree-sitter enabled modes now properly support 'show-paren-mode'.
They do that by letting 'show-paren-mode' use the results of parsing by
the tree-sitter library. The new function 'treesit-show-paren-data' is
used to communicate the tree-sitter parsing results to 'show-paren-mode'.
素晴らしい。
Tree-sitter enabled modes now properly support 'hs-minor-mode'.
All commands from hideshow.el can selectively display blocks
defined by the new tree-sitter thing 'list'.
New tree-sitter thing 'comment'.
The new variable 'forward-comment-function' is set to the new function
'treesit-forward-comment' if a major mode defines the thing 'comment'.
New function 'treesit-query-eagerly-compiled-p'.
This function returns non-nil if a query was eagerly compiled.
New function 'treesit-query-source'.
This function returns the string or sexp source query of a compiled query.
New function 'treesit-language-display-name'.
This new function returns the display name of a language given the
language symbol. For example, 'cpp' is translated to "C++". A new
variable 'treesit-language-display-name-alist' holds the translations of
language symbols where that translation is not trivial.
New function 'treesit-merge-font-lock-feature-list'.
This function merges two tree-sitter font-lock feature lists. It
returns a new font-lock feature list with no duplicates at the same
level. It can be used to merge font-lock feature lists in a
multi-language major mode.
私のもう 1 つの不満は、モード作成者が Tree-sitter フォントロッククエリ(ファイルをフォントロックするために使用する)をホードしていたことでした。これは、メジャーモード作成者が「しかし、このファイルに CSS と Ruby を含めることができる」と言えないことを意味します。そして、それぞれの MM のフォントロッククエリをロードされたバッファを内省することなく取得することはできませんでした。それは…あまり良くありませんでした。
このマージ機能は根本的な問題を解決しませんが、少なくとも複数の Tree-sitter 文法を使用する派生モードを構築している人がいることを認識しています。つまり、それが TS のポイントです!
New function 'treesit-replace-font-lock-feature-settings'.
Given two tree-sitter font-lock settings, it replaces the feature in the
second font-lock settings with the same feature in the first font-lock
settings. In a multi-language major mode it is sometimes necessary to
replace features from one of the major modes with others that are
better suited to the new multilingual context.
はい、そのとおりです。
New variable 'treesit-aggregated-simple-imenu-settings'.
This variable allows major modes to setup Imenu for multiple languages.
New variable 'treesit-aggregated-outline-predicate'.
This variable allows major modes to setup 'outline-minor-mode'
for multiple languages.
New function 'treesit-simple-indent-add-rules'.
This new function makes it easier to customize indent rules for
tree-sitter modes.
これは、TS メジャーモードがデフォルトで使用する Stefan Monnier の優れた SMIE(Simple-Minded Indentation Engine)にすでに存在する機能のラッパーにすぎないはずです。
New function 'treesit-simple-indent-modify-rules'.
Given two tree-sitter indent rules, it replaces, adds, or prepends rules
in the old rules with new ones, then returns the modified rules. In a
multi-language major mode it is sometimes necessary to modify rules from
one of the major modes to better suit the new multilingual context.
New variable 'treesit-simple-indent-override-rules'.
Users can customize this variable to add simple custom indentation rules
for tree-sitter major modes.
New variable 'treesit-languages-require-line-column-tracking'.
Now Emacs can optionally track line and column numbers for buffer edits
and send that information to tree-sitter parsers. Parsers of languages
in this list will receive line and column information. This is only
needed for very few languages. So far only Haskell is known to need it.
New function 'treesit-tracking-line-column-p'.
New function to check if a buffer is tracking line and column for buffer
edits.
New function 'treesit-parser-tracking-line-column-p'.
New function to check if a parser is receiving line and column
information.
'treesit-language-at-point-function' is now optional.
Multi-language major modes can rely on the default return value from
'treesit-language-at' that uses the new function 'treesit-parsers-at'.
New function 'treesit-query-with-optional'.
When used in 'treesit-font-lock-rules', 'treesit-query-with-optional'
returns a default query plus the valid queries from a list of optional
queries.
New function 'treesit-query-with-fallback'.
When used in 'treesit-font-lock-rules', 'treesit-query-with-fallback'
selects the first valid query from a list.
Tree-sitter thing functions now work better with multiple parsers.
The following functions now better handle the case when there are
multiple parsers at point: 'treesit-thing-prev', 'treesit-thing-next',
'treesit-navigate-thing', 'treesit-thing-at'. When there are multiple
parsers at point, instead of using whatever 'treesit-node-at' returns at
point, these functions now try every relevant parser in descending order
of relevance. (Deeper-embedded parsers have higher relevance.) These
functions now also take an additional optional argument, PARSER, that
allows the caller to specify a parser or language to use. That also
means 'treesit-beginning/end-of-defun' can now move across parsers.
良い。バッファ内の多言語解析はまだ良好ではありませんが、ゆっくりと進んでいます。
New command 'treesit-explore'.
This command replaces 'treesit-explore-mode'. It turns on
'treesit-explore-mode' if it is not on, and pops up the explorer buffer
if it is already on.
'treesit-explore-mode' now supports local parsers.
Now 'treesit-explore-mode' (or 'treesit-explore') prompts for a parser
rather than a language, and it is now possible to select a local parser
at point to explore.
これらのものがうまく動作するように設定できませんでした。呼び出しバッファに変なマイナーモードの残骸を残し、デスクトップファイルが起動時に読み込まれたときに再アクティブ化されて残っていました。それも修正されたことを願っています。
Tree-sitter query predicates ':equal', ':match', and ':pred' are deprecated.
Use ':eq?', ':match?', and ':pred?' instead. The change is because
newer tree-sitter libraries mandate query predicates to end with a
question mark. Emacs will transparently convert ':equal', ':match', and
':pred' to ':eq?', ':match?', and ':pred?', respectively, so existing
queries still work fine with the latest tree-sitter library. The
predicate ':equal' is changed to ':eq?' to better follow tree-sitter's
convention. Also, the ':match?' predicate can now take the regexp as
either the first or second argument, so it works with both tree-sitter
convention (regexp arg second) and Emacs convention (regexp arg first).
なぜこの変更がバックエンドで完全に処理されなかったのか理解できません。Tree-sitter ライブラリ自体と通信することはできません。それは treesit.el と Emacs コアによってゲートされています。なぜ非推奨にするのか理解できません。
変更履歴の追跡
New variable 'track-changes-undo-only' to distinguish undo changes.
Hideshow
Hideshow は Emacs のコード/構造化テキスト非表示システムです。
New command 'hs-cycle'.
This command cycles the visibility state of the current block between
hiding the parent block, hiding only the nested blocks and showing all
the blocks.
New user option 'hs-cycle-filter' for visibility-cycling with 'TAB'.
This user option controls the positions on the headline of hideable blocks
where the 'TAB' key cycles the blocks' visibility.
New command 'hs-toggle-all'.
This command hides or shows all the blocks in the current buffer.
'hs-hide-level' no longer hides all the blocks in the current buffer.
If 'hs-hide-level' was not inside a code block, it would hide all the
blocks in the buffer like 'hs-hide-all'. Now it only hides all the
second level blocks.
New user option 'hs-display-lines-hidden'.
If this option is non-nil, Hideshow displays the number of hidden lines
next to the ellipsis. By default this is disabled.
New user option 'hs-show-indicators'.
This user option determines if Hideshow should display indicators to
show and toggle the block hiding. If non-nil, the indicators are enabled.
By default this is disabled.
New user option 'hs-indicator-maximum-buffer-size'.
This user option limits the display of Hideshow indicators to buffers
that are not too large. By default, buffers larger than 2MB have the
indicators disabled; a value of nil will activate the indicators
regardless of the buffer size.
New user option 'hs-indicator-type'.
This user option determines which indicator type should be used for the
block indicators.
The possible values are: 'fringe' to display the indicators in the
fringe (the default); 'margin' to display the indicators in the margin; and
nil, to display the indicators at end-of-line.
The new icons 'hs-indicator-show' and 'hs-indicator-hide' can be used to
customize the indicators appearance, but apply only if
'hs-indicator-type' is set to 'margin' or nil.
The hiding behavior of some hideshow commands has changed.
'hs-hide-block', 'hs-hide-level', 'hs-cycle' and 'hs-toggle-hiding' now
hide the innermost block to which the current line belongs instead of
the block after point. To restore the old behavior, set the new user
option 'hs-hide-block-behavior' to 'after-point'.
The variable 'hs-special-modes-alist' is now obsolete.
Instead of customizing Hideshow for a mode by setting the elements of
'hs-special-modes-alist', such as START, COMMENT-START,
FORWARD-SEXP-FUNC, etc., major mode authors should set the corresponding
buffer-local variables 'hs-block-start-regexp', 'hs-c-start-regexp',
'hs-forward-sexp-function', etc.
'hs-hide-level' can now hide comments too.
This is controlled by 'hs-hide-comments-when-hiding-all'.
New minor mode 'hs-indentation-mode'.
This buffer-local minor mode configures 'hs-indentation-mode' to detect
blocks based on indentation.
The new user option 'hs-indentation-respect-end-block' can be used to
adjust the hiding range for this minor mode.
これは本当に便利です。特に YAML には。
C-ts モード
このモードと、将来の -ts で終わるモードは、Tree-sitter 風のメジャーモード専用です。例外はいくつかありますが、TS メジャーモードは通常、置き換えようとしているメジャーモードよりも機能がはるかに少ないことに注意してください。
New user option 'c-ts-mode-enable-doxygen'.
By default, this is nil, and the Doxygen comment blocks in C/C++ sources
are highlighted like other comments. When non-nil, Doxygen comment
blocks are font locked if the Doxygen grammar library is available.
Csharp-ts モード
Renamed feature in 'treesit-font-lock-feature-list'.
The feature 'property' has been renamed to 'attribute', since this is
what it is generally called among C# programmers.
Go-ts モード
New unit test commands.
Three new commands are now available to run unit tests.
The 'go-ts-mode-test-function-at-point' command runs the unit test at
point. If a region is active, it runs all the unit tests under the
region. It is bound to 'C-c C-t t' in 'go-ts-mode'.
The 'go-ts-mode-test-this-file' command runs all unit tests in the current
file. It is bound to 'C-c C-t f' in 'go-ts-mode'.
The 'go-ts-mode-test-this-package' command runs all unit tests under the
package of the current buffer. It is bound to 'C-c C-t p' in 'go-ts-mode'.
The 'go-ts-mode-build-tags' user option is available to set a list of
build tags for the test commands.
The 'go-ts-mode-test-flags' user option is available to set a list of
additional flags to pass to the go test command line.
Lua-ts モード
New user option 'lua-ts-auto-close-block-comments'.
When non-nil, inserting a block comment "--[[" will close it by
inserting its respective "]]'. By default, this is disabled.
Java-ts モード
New user option 'java-ts-mode-enable-doxygen'.
By default, this is nil, and the Doxygen comment blocks in Java sources
are highlighted like other comments. When non-nil, Doxygen comment
blocks are font locked if the Doxygen grammar library is available.
New user option 'java-ts-method-chaining-indent-offset'.
Now method chaining is indented by 8 spaces rather than 4, and this
option controls how much is indented for method chaining.
JSON-ts モード
New command 'json-ts-jq-path-at-point'.
This command copies the path of the JSON element at point to the
kill-ring, but formatted for use with the 'jq' utility.
これは便利ですね。Tree-sitter の具体的な構文ツリーの実際の利点の 1 つです。
PHP-ts モード
'php-ts-mode' now depends on 'mhtml-ts-mode'.
The direct dependency on 'js-ts-mode', 'css-ts-mode' and 'html-ts-mode' has
now been replaced by 'mhtml-ts-mode'. Navigation, Outline and Imenu
work for all languages, and code maintenance is easier.
'php-ts-mode-run-php-webserver' can now accept a custom "php.ini" file.
You can use the new optional argument CONFIG when calling
'php-ts-mode-run-php-webserver' to pass an alternative "php.ini" file to
the built-in Web server. Interactively, when invoked with a prefix
argument, 'php-ts-mode-run-php-webserver' prompts for the config file as
well as for other connection parameters.
The user option 'php-ts-mode-css-fontify-colors' has been removed.
'mhtml-ts-mode-css-fontify-colors' replaces this option.
New user option 'php-ts-mode-html-relative-indent'.
In buffers containing both PHP and HTML, this option allows you to
define how the PHP code should be indented relative to the position of
the HTML tags.
New user option 'php-ts-mode-html-indent-offset'.
Offset of PHP code block relative to HTML tags.
New user option 'php-ts-mode-find-sibling-rules'.
Rules for finding siblings of a PHP file.
New user option 'php-ts-mode-phpdoc-highlight-errors'.
When non-nil, it highlights unknown PHPDOC tags using
'font-lock-warning-face' so that the user can identify them more easily.
New command 'php-ts-mode-show-ini'.
Show the location of the PHP ini files. If the current buffer is
associated to a remote PHP file, show the remote PHP ini files.
Rust-ts モード
New user option 'rust-ts-mode-fontify-number-suffix-as-type'.
Rust number literals may have an optional type suffix. When this option
is non-nil, this suffix is fontified using 'font-lock-type-face'.
YAML-ts モード
New user option 'yaml-ts-mode-yamllint-options'.
Additional options for 'yamllint', the command used for Flymake's YAML
support.
EIEIO
EIEIO は Emacs の CLOS スタイルのオブジェクト指向プログラミングシステムです。童謡「Old McDonald had a farm… EIEIO」にちなんで名付けられました。
良き古き Ludlam が書いたものは、農場関連の名前付けにこだわりがありました。彼の 2000 年代の Tree-sitter 前身である「Semantic Bovinator」も参照してください。
New value 'warn' for 'eieio-backward-compatibility'.
This is the new default value and causes warnings to be emitted
at run-time for the use of the associated deprecated features.
'(setq eieio-backward-compatibility t)' can be used to recover
the previous silence.
Text モード
New commands to convert between ASCII and full-width characters.
New commands 'fullwidth-region' and 'fullwidth-word' convert ASCII
characters in region or in the word at point to the corresponding
full-width characters, which are customarily used instead of ASCII
characters in CJK texts. For example, 'A' is converted to 'A', '1' is
converted to '1', etc. Companion commands 'halfwidth-region' and
'halfwidth-word' perform the opposite conversion.
Texinfo モード
Texinfo mode now can auto-close the ``'' pairs.
Now inserting `` in 'texinfo-mode' will close it by inserting its
respective '', if 'electric-pair-mode' is enabled.
ASM モード
'asm-mode-set-comment-hook' is obsolete.
You can now set 'asm-comment-char' from 'asm-mode-hook' instead.
Ibuffer
IBuffer は Emacs の素晴らしい、そして優れたバッファリストマネージャーです。ぜひ試してみて、オンラインでクールな設定を探してみてください。
New column 'recency' in Ibuffer display.
The user option 'ibuffer-formats' configures the Ibuffer formats. Add
'recency' to the format to display the column.
New value 'title' for the user option 'ibuffer-use-header-line'.
Display column titles in the header line if 'ibuffer-use-header-line' is
set to 'title'.
New user option 'ibuffer-human-readable-size'.
When non-nil, buffer sizes are shown in human readable format.
'define-ibuffer-op' prompts can now be functions.
The prompts 'opstring' and 'active-opstring' can now either be strings
or functions. This is useful when your prompts can benefit from dynamic
content.
New Ibuffer-dedicated faces.
New faces 'ibuffer-marked', 'ibuffer-deletion', 'ibuffer-title', and
'ibuffer-filter-group-name'. By default, they inherit from the
general-purpose faces Ibuffer previously used, to preserve previous
behavior.
ElDoc
Eldoc は Emacs のインタラクティブな、ポイント駆動のドキュメントおよびコードルックアップツールです。複数のドキュメントソースを ElDoc でシームレスにマージする を参照してください。
New ElDoc function 'elisp-eldoc-funcall-with-docstring'.
This function includes the current function's docstring in the ElDoc
echo area and can be used as a more detailed alternative to
'elisp-eldoc-funcall'.
New user option 'elisp-eldoc-funcall-with-docstring-length'.
This user option specifies how long function docstrings must be
displayed in 'elisp-eldoc-funcall-with-docstring'. If set to 'short'
(the default), only display the first sentence of the docstring.
Otherwise, if set to 'full', display the full docstring.
New user option 'elisp-eldoc-docstring-length-limit'.
This user option controls the maximum length of docstrings in character
units that 'elisp-eldoc-funcall-with-docstring' and
'elisp-eldoc-var-docstring-with-value' will show. By default, it is set
to 1000 characters.
デフォルトのバッファリストマネージャーは C-x C-b にバインドされています。M-x ibuffer に置き換えてください。
New user option 'Buffer-menu-human-readable-sizes'.
When non-nil, buffer sizes are shown in human readable format. The
default is nil, which retains the old format.
Term
Emacs のターミナルエミュレーター。Emacs でシェルとターミナルエミュレーターを実行する を参照してください。
The terminal emulator now supports auto-margins control.
Term mode now handles DECAWM escape sequences that control whether text
automatically wraps at the right margin:
- \e[?7h enables auto-margins (default)
- \e[?7l disables auto-margins
When auto-margins is disabled, characters that would go beyond the right
margin are discarded, which matches the behavior of physical terminals
and other terminal emulators. Control sequences and escape sequences
are still processed correctly regardless of margin position.
SMerge モード
SMerge は、Emacs でマージコンフリクトを処理するための複数の方法の 1 つです(言葉遊びです)。気に入っています。
New 'repeat-map' for SMerge conflict resolution commands.
With 'repeat-mode' enabled, after invoking an SMerge command (for
example, 'C-c ^ n'), you can repeat further SMerge commands by typing
just the final key (for example, 'n', 'p', 'u', 'l').
おお、そうです。SMerge は好きですが、C-c ^ n(およびそれに類するもの)は、Emacs ユーザーではない人々がキーバインディングを見たときに強く反発するまさにその理由です。
New command 'smerge-extend' extends a conflict over surrounding lines.
New command 'smerge-refine-exchange-point' to jump to the other side.
When used inside a refined chunk, it jumps to the matching position in
the other side of the refinement: if you are in the new text, it jumps
to the corresponding position in the old text and vice versa.
New user option 'smerge-refine-shadow-cursor'.
When 'smerge-refine' shows the conflict diffs at word granularity, a
shadow cursor is now displayed in the lower version when point is in the
upper version, and vice versa. The shadow cursor is just the character
corresponding to the position where 'smerge-refine-exchange-point'
would jump, shown in a new distinct face 'smerge-refine-shadow-cursor', by
default a box face.
'smerge-refine-regions' can compare regions in different buffers.
Cursor Sensor モード
これは非常にマイナーなモードです。それと不可視カーソルという概念は、基本的に文字の塊を取り、Emacs に、それを、すべての意図のために、単一の包括的な単位として扱うように伝える方法です。私は不可視カーソルプロパティを一度しか使用したことがなく、それは Combobulate のエンベロープシステムでした。
New direction 'moved' used when the cursor moved within the active area.
Image Dired
はい、Emacs の dired にはサムネイル画像ビューアシステムがあります。
'image-dired-show-all-from-dir' takes the same first argument as 'dired'.
This allows passing a string with wildcards, or a cons cell where the
first element is a list and the rest is a list of files.
New single-letter bindings in 'image-dired-thumbnail-mode-map'.
The keys 'f', 'b', 'n', 'p', 'a' and 'e' are now bound to the same
commands as their 'C-' counterparts.
Browse URL
Browse URL は、Emacs が URL 関連情報を入力および出力する方法を管理する、内部関数、ユーザー向けコマンド、および変数の広範なセットです。URL をクリックしたときにブラウザを開くなどのことです。
New user option 'browse-url-transform-alist'.
This user option is an alist that allows transforming URLs before asking
a web browser to load them. For example, it could be used like this:
(add-to-list 'browse-url-transform-alist
'("vim\.org/.*" . "gnu.org/software/emacs/"))
New command 'browse-url-qutebrowser' for Qutebrowser.
For better integration with Qutebrowser, set
'browse-url(-secondary)-browser-function' to 'browse-url-qutebrowser'.
New GTK-native launch mode.
For better Wayland support, the pgtk toolkit exposes a new
'x-gtk-launch-uri' browse-url handler and uses it by default when URLs
are browsed from a PGTK frame. For other frames, we fall back to the
default URL launch function. This change allows us to properly raise
browser windows under Wayland using the xdg_activation_v1 protocol.
'RET' can visit URLs in read-only buffers.
In some keymaps such as 'ansi-osc-hyperlink-map',
'browse-url-button-map', 'goto-address-highlight-keymap', and
'bug-reference-map', it is now possible to visit URLs by typing just
'RET' instead of 'C-c RET' in read-only buffers.
Removed support for some obsolete web browsers.
Conkeror (obsolete since Emacs 28.1), gnome-moz-remote (obsolete since
Emacs 25.1), and gnudoit (obsolete since Emacs 25.1).
'browse-url-firefox-program' now supports LibreWolf and Zen Browser.
LibreWolf, Floorp and Zen Browser, three popular Firefox forks, have been
added to the programs that are automatically recognizable as Firefox
workalikes. Emacs will set 'browse-url-firefox-program' to the first
one of these found on your system.
Floorp?
CL-Lib
Derived types (i.e. 'cl-deftype') can now be used as method specializers.
Some cl-lib functions and macros are now built-in.
These functions or macros have been added to Emacs Lisp, and the old
names are now aliases for the built-in equivalents:
- 'cl-incf' renamed to 'incf'
- 'cl-decf' renamed to 'decf'
- 'cl-oddp' renamed to 'oddp'
- 'cl-evenp' renamed to 'evenp'
- 'cl-plusp' renamed to 'plusp'
- 'cl-minusp' renamed to 'minusp'
- 'cl-member-if' renamed to 'member-if'
'cl-member-if' is marked obsolete. The other names are deprecated too,
and will be marked as obsolete in a future release.
Common Lisp のイディオムは、一部の人々を不快にさせながらも、後方から Emacs に進出し続けています。
'cl-labels' now also accepts '(FUNC EXP)' bindings, like 'cl-flet'.
Such bindings make it possible to compute the function to bind to FUNC.
'cl-block' names are now lexically scoped, as documented.
'cl-locally' is now obsolete.
It is an alias for the 'progn' special-form.
'cl-declare' is now obsolete; use 'defvar' instead.
'cl-gensym' is now obsolete; use 'gensym' instead.
New macro 'cl-with-accessors'.
This macro is similar to 'with-slots', but uses accessor functions
instead of slot names. It is useful when some slot accessor functions
are used repeatedly, such as reading from a slot and then writing to
that slot. Symbol macros are created for the accessor functions using
'cl-symbol-macrolet', so they can be used with 'setq' and 'setf'.
私が間違っていなければ、with-slots はすでに setf を使用してスロットを設定できますか?テキストを誤って読んでいるに違いありません。
Whitespace
余分な空白、タブなどを見つけるために、M-x whitespace-mode とその仲間を眠らせないでください。頻繁には必要ありませんが、必要なときは…
'whitespace-cleanup' now adds a missing newline at end of file.
If 'whitespace-style' includes 'missing-newline-at-eof' (which is the
default), the 'whitespace-cleanup' function will now add the newline.
'whitespace-mode' can now prettify page delimiter characters ('^L').
If 'page-delimiters' is set in 'whitespace-style', or the new minor mode
'whitespace-page-delimiters-mode' is on, the page delimiter character
('^L') is displayed as a pretty horizontal line that spans the entire
width of the window. The new 'whitespace-page-delimiter' face can be
used to customize the appearance.
New user option 'whitespace-global-mode-buffers'.
Normally, 'global-whitespace-mode' skips special buffers whose name
starts with an asterisk "*". This user option provides an override: it
contains a list of regular expressions used to match the names of
special buffers in which 'global-whitespace-mode' should turn on. The
default value preserves the existing exception for the "*scratch*"
buffer.
Bookmark
Emacs の最も偉大な機能の 1 つ。ブックマークシステム。さまざまなものをブックマークでき、Emacs はその正確な場所を情報マニュアルで喜んで開いてくれます。控えめに言って素晴らしい機能です。
Bookmark history now saves each bookmark only once.
Previously, the variable 'bookmark-history' accumulated duplicate
bookmark names when bookmark features were used interactively. This
made their history larger than necessary for frequent bookmark users.
Bookmark names are now saved uniquely.
New user option 'bookmark-bmenu-type-column-width'.
This user option controls the width of the type column on the bookmark
menu 'bookmark-bmenu-list'. The default value is 8 which is backwards
compatible.
New hook 'bookmark-after-load-file-hook'.
This hook is run by 'bookmark-load' after loading a bookmark file. This
hook can be used, for example, to reconcile 'bookmark-alist' against
bookmark state that you, or a package that you use, maintains.
Recentf
最近開いたファイルのストア。昔は補完メカニズムの働き方のために使用するのが少し大変でしたが、最近のファイルパッケージでファイルをより速く見つける という記事を書きました。最近では、あなたの派手な補完パッケージと M-x recentf がすべて必要です。
You can now regularly auto-save recently opened files.
Customize user option 'recentf-autosave-interval' to the number of
seconds between auto saving recently opened files. For example,
customize this variable to 300 to save recently opened files every 5
minutes. From Lisp, use 'setopt', not 'setq'. If
'recentf-autosave-interval' is nil, auto saving is disabled; this is the
default.
New user option 'recentf-show-messages'.
'recentf-save-list' can print a message when saving the recentf list.
The new option, if customized to nil, suppresses this message.
New user option 'recentf-suppress-open-file-help'.
By default, invoking 'recentf-open-files' displays a message saying what
action clicking or typing 'RET' on the item at point executes, and tabbing
between items in the "*Open Recent*" buffer likewise displays such
messages. To suppress these messages, customize the user option
'recentf-suppress-open-file-help' to non-nil. The default value of this
option is nil.
New user option 'recentf-exclude-ignored-extensions'.
Add the new predicate function 'recentf-exclude-file-by-extension-p' to
the list that is the value of the user option 'recentf-exclude' to
ignore files with certain extensions. By default, adding this function
to 'recentf-exclude' ignores files whose extensions are listed in
'completion-ignored-extensions'; you can specify a different list of
extensions by customizing the new user option
'recentf-exclude-ignored-extensions'.
Saveplace
M-x save-place-mode は、ファイルを再度開いたときに、そのファイル内の正確な場所を保存します。
You can now regularly auto-save places.
Customize user option 'save-place-autosave-interval' to the number of
seconds between auto-saving places. For example, customize this
variable to 300 to save places every 5 minutes. From Lisp, use 'setopt',
not 'setq'. If 'save-place-autosave-interval' is nil, auto saving is
disabled; this is the default.
Savehist
さまざまな補完プロンプトで履歴を失うことにうんざりしていませんか?M-x savehist-mode を有効にして、何をどこに保存するかを選択できます。
The history file can be modified by external tools.
Emacs can now handle this case gracefully by merging the external and
internal history information. This feature is activated only when
'savehist-additional-variables' is nil.
Savehist no longer saves additional variables more than once.
If you configured 'savehist-additional-variables' with variables that
were also dynamically accumulated in minibuffer history during
minibuffer use, they are now saved only once in the file specified by
'savehist-file'. Previously, they were saved twice.
Rectangle Mark
CUA-mode から借用したもので、なぜか特別な矩形選択がありましたが、他の非 CUA ユーザーはそれを得られませんでした。数年前に移動され、現在は C-x SPC がそれをアクティブにします。
New user option to control whether empty rectangle selections are shown.
The new user option 'rectangle-indicate-zero-width-rectangle' can be
used to disable the default display of empty rectangular selections.
The default is t; set it to nil to disable the indication. (It causes a
horizontal shift of text on display, which could be distracting.)
Message
Emacs で RFC 準拠の電子メールを作成するいくつかの方法の 1 つ。
"In-Reply-To" header contains only a message id.
The "In-Reply-To" header created when replying to a message now contains
only the originating message's id, conforming to RFC 5322. The previous
behavior included additional information about the originating message.
The new user option 'message-header-use-obsolete-in-reply-to', nil by
default, can be set to a non-nil value to restore the previous behavior.
それとも、準拠したと言った方がいいでしょうか?
'message-subject-re-regexp' default value is derived from 'mail-re-regexps'.
'mail-re-regexps' is a new user option that is easier to customize than
'message-subject-re-regexp'. 'message-subject-re-regexp' is still
honored if it was already set.
'message-strip-subject-re' now matches case-insensitively.
'message-change-subject' inserts the current subject into future history.
Hashcash support has been removed.
It is believed to no longer be useful as a method to fight spam. The
'message-generate-hashcash' option is now obsolete and has no effect.
Gnus
数十年にわたるロールアップ新聞での殴打の後、ニュースグループリーダーとして始まったワンマンマーチングバンドは、メール、reddit チャット、RSS フィードなどを処理できるようになり、おそらくそれ以上のものも処理できるようになりました。
Replying to icalendar events now supports specifying a comment.
When called with a prefix argument, accepting, declining, or tentatively
accepting an icalendar event will prompt for a comment to add to the
response.
Hashcash support has been removed.
It is believed to no longer be useful as a method to fight spam. The
'spam-use-hashcash' hook is now obsolete and has no effect.
Add 'M-i' keybinding as the symbolic prefix in the group keymap.
The symbolic prefix is another kind of universal prefix that is used in
Gnus; see "(gnus) Symbolic Prefixes" in the Gnus manual.
Sorting selected groups is now possible with 'gnus-topic-mode'.
gnus-dbus.el is now obsolete.
System sleep integration is now independent of D-Bus.
The system sleep integration previously provided by customizing the
variable 'gnus-dbus-close-on-sleep' is now deprecated. A new system
using the builtin system-sleep.el library is now available by customizing
'gnus-close-on-sleep'. This will work on all systems that the
'system-sleep' library supports.
Sieve
サーバーサイド IMAP sieve フィルター用のメジャーモード。
New keybinding to refresh buffer in 'sieve-manage-mode'.
'sieve-refresh-scriptlist' is now bound to 'g' to refresh the contents
of the current sieve buffer.
Button
Emacs のウィジェットシステム(カスタマイズが使用するもの)は、ここで #29382 のようなバグ参照表記を小さなインタラクティブなボタンに変換するために使用されます。
このパラダイムが好きなら、Bob Weiner の Hyperbole パッケージを使用してください。はるかに優れています。
New function 'unbuttonize-region'.
It removes all the buttons in the specified region.
Disabling 'button-mode' now removes all buttons in the current buffer.
Shell
私の好きなシェルとの対話方法。単なる、調理されたターミナル出力を提供する、リッチな Emacs バッファにすぎません。Emacs でシェルとターミナルエミュレーターを実行する を参照してください。
Shell buffers now support bookmarks.
You can now bookmark local and remote shell buffers using the bookmark
menu 'bookmark-bmenu-list', or by using the command 'bookmark-set'.
Shell bookmarks can be loaded via the menu and by using the command
'bookmark-jump', which opens a bookmarked shell, restores its buffer name,
its current directory, and creates a remote connection, if necessary.
You can customize 'shell-bookmark-name-function'.
ブックマークは素晴らしいです。これは確かに試してみる必要があります。
New command to complete the shell history.
'comint-complete-input-ring' ('C-x <UP>') is like 'minibuffer-complete-history'
but completes on comint inputs.
私のシェルと Comint の秘密:履歴コマンド を参照してください。
'ansi-osc-directory-tracker' now respects remote directories.
Remote directories are now retained when changes to 'default-directory' are
detected by this filter. For example, "/ssh:hostname:/home/username"
would have been stripped to just "/home/username" before.
OSC ディレクトリ追跡は、シェルモードでは特に重要です。なぜなら、通常は「補完」のために基盤となるシェルに問い合わせないからです。
Eshell
Emacs 独自のシェルで、Elisp で書かれています。クールなパッケージ。Eshell のマスター を参照してください。