ほんとのこと知りたいだけなのに。

夏休みはもうおわり。

Emacs Lisp のテキスト関連のオペレータ

メジャーモードでバッファに文字列を出力する方法がわからなくてテキスト関連のオペレータを一覧にします。

31 Text

31.1 Examining Text Near Point

type statement
Function char-after &optional position
Function char-before &optional position
Function following-char
Function preceding-char
Function bobp
Function eobp
Function bolp
Function eolp

31.2 Examining Buffer Contents

type statement
Function buffer-substring start end
Function buffer-substring-no-properties start end
Function buffer-string
Function filter-buffer-substring start end &optional delete
Variable filter-buffer-substring-function
Variable filter-buffer-substring-functions
Variable buffer-substring-filters
Function current-word &optional strict really-word
Function thing-at-point thing &optional no-properties

31.3 Comparing Text

type statement
Function compare-buffer-substrings buffer1 start1 end1 buffer2 start2 end2

31.4 Inserting Text

type statement
Function insert &rest args
Function insert-before-markers &rest args
Command insert-char character &optional count inherit
Function insert-buffer-substring from-buffer-or-name &optional start end
Function insert-buffer-substring-no-properties from-buffer-or-name &optional start end

31.5 User-Level Insertion Commands

type statement
Command insert-buffer from-buffer-or-name
Command self-insert-command count
Command newline &optional number-of-newlines
Variable overwrite-mode

31.6 Deleting Text

type statement
Command erase-buffer
Command delete-region start end
Function delete-and-extract-region start end
Command delete-char count &optional killp
Command delete-backward-char count &optional killp
Command backward-delete-char-untabify count &optional killp
User Option backward-delete-char-untabify-method

31.7 User-Level Deletion Commands

type statement
Command delete-horizontal-space &optional backward-only
Command delete-indentation &optional join-following-p
Command fixup-whitespace
Command just-one-space &optional n
Command delete-blank-lines
Command delete-trailing-whitespace &optional start end

31.8 The Kill Ring

31.8.1 Kill Ring Concepts

31.8.2 Functions for Killing

type statement
Command kill-region start end &optional region
User Option kill-read-only-ok
Command copy-region-as-kill start end &optional region

31.8.3 Yanking

type statement
Function insert-for-yank string
Function insert-buffer-substring-as-yank buf &optional start end
User Option yank-handled-properties
User Option yank-excluded-properties

31.8.4 Functions for Yanking

type statement
Command yank &optional arg
Command yank-pop &optional arg
Variable yank-undo-function

31.8.5 Low-Level Kill Ring

type statement
Function current-kill n &optional do-not-move
Function kill-new string &optional replace
Function kill-append string before-p
Variable interprogram-paste-function
Variable interprogram-cut-function

31.8.6 Internals of the Kill Ring

type statement
Variable kill-ring
Variable kill-ring-yank-pointer
User Option kill-ring-max

31.9 Undo

type statement
Variable buffer-undo-list
Function undo-boundary
Function undo-auto-amalgamate
Variable undo-auto-current-boundary-timer
Variable undo-in-progress
Function primitive-undo count list

31.10 Maintaining Undo Lists

type statement
Command buffer-enable-undo &optional buffer-or-name
Command buffer-disable-undo &optional buffer-or-name
User Option undo-limit
User Option undo-strong-limit
User Option undo-outer-limit
User Option undo-ask-before-discard

31.11 Filling

type statement
Command fill-paragraph &optional justify region
Command fill-region start end &optional justify nosqueeze to-eo
Command fill-individual-paragraphs start end &optional justify citation-regexp
User Option fill-individual-varying-indent
Command fill-region-as-paragraph start end &optional justify nosqueeze squeeze-after
Command justify-current-line &optional how eop nosqueeze
User Option default-justification
Function current-justification
User Option sentence-end-double-space
User Option sentence-end-without-period
User Option sentence-end-without-space
Variable fill-paragraph-function
Variable fill-forward-paragraph-function
Variable use-hard-newlines

31.12 Margins for Filling

type statement
User Option fill-column
Command set-left-margin from to margin
Command set-right-margin from to margin
Function current-left-margin
Function current-fill-column
Command move-to-left-margin &optional n force
Function delete-to-left-margin &optional from to
Function indent-to-left-margin
User Option left-margin
User Option fill-nobreak-predicate

31.13 Adaptive Fill Mode

type statement
User Option adaptive-fill-mode
Function fill-context-prefix from to
User Option adaptive-fill-regexp
User Option adaptive-fill-first-line-regexp
User Option adaptive-fill-function

31.14 Auto Filling

type statement
Variable auto-fill-function
Variable normal-auto-fill-function
Variable auto-fill-chars

31.15 Sorting Text

type statement
Function sort-subr reverse nextrecfun endrecfun &optional startkeyfun endkeyfun predicate
User Option sort-fold-case
Command sort-regexp-fields reverse record-regexp key-regexp start end
Command sort-lines reverse start end
Command sort-paragraphs reverse start end
Command sort-pages reverse start end
Command sort-fields field start end
Command sort-numeric-fields field start end
User Option sort-numeric-base
Command sort-columns reverse &optional beg end

31.16 Counting Columns

type statement
Function current-column
Command move-to-column column &optional force

31.17 Indentation

31.17.1 Indentation Primitives

type statement
Function current-indentation
Command indent-to column &optional minimum
User Option indent-tabs-mode

31.17.2 Indentation Controlled by Major Mode

type statement
Command indent-for-tab-command &optional rigid
Variable indent-line-function
Command indent-according-to-mode
Command newline-and-indent
Command reindent-then-newline-and-indent
User Option tab-always-indent

31.17.3 Indenting an Entire Region

type statement
Command indent-region start end &optional to-column
Variable indent-region-function
Command indent-rigidly start end count
Command indent-code-rigidly start end columns &optional nochange-regexp

31.17.4 Indentation Relative to Previous Lines

type statement
Command indent-relative &optional unindented-ok
Command indent-relative-maybe

31.17.5 Adjustable Tab Stops

type statement
Command tab-to-tab-stop
User Option tab-stop-list

31.17.6 Indentation-Based Motion Commands

type statement
Command back-to-indentation
Command backward-to-indentation &optional arg
Command forward-to-indentation &optional arg

31.18 Case Changes

type statement
Command capitalize-region start end
Command downcase-region start end
Command upcase-region start end
Command capitalize-word count
Command downcase-word count
Command upcase-word count

31.19 Text Properties

31.19.1 Examining Text Properties

type statement
Function get-text-property pos prop &optional object
Function get-char-property position prop &optional object
Function get-pos-property position prop &optional object
Function get-char-property-and-overlay position prop &optional object
Variable char-property-alias-alist
Function text-properties-at position &optional object
Variable default-text-properties

31.19.2 Changing Text Properties

type statement
Function put-text-property start end prop value &optional object
Function add-text-properties start end props &optional object
Function remove-text-properties start end props &optional object
Function remove-list-of-text-properties start end list-of-properties &optional object
Function set-text-properties start end props &optional object
Function add-face-text-property start end face &optional appendp object
Function propertize string &rest properties

31.19.3 Text Property Search Functions

type statement
Function next-property-change pos &optional object limit
Function previous-property-change pos &optional object limit
Function next-single-property-change pos prop &optional object limit
Function previous-single-property-change pos prop &optional object limit
Function next-char-property-change pos &optional limit
Function previous-char-property-change pos &optional limit
Function next-single-char-property-change pos prop &optional object limit
Function previous-single-char-property-change pos prop &optional object limit
Function text-property-any start end prop value &optional object
Function text-property-not-all start end prop value &optional object

31.19.4 Properties with Special Meanings

type statement
Variable inhibit-point-motion-hooks
Variable show-help-function

31.19.5 Formatted Text Properties

31.19.6 Stickiness of Text Properties

type statement
Variable text-property-default-nonsticky
Function insert-and-inherit &rest strings
Function insert-before-markers-and-inherit &rest strings

31.19.7 Lazy Computation of Text Properties

type statement
Variable buffer-access-fontify-functions
Variable buffer-access-fontified-property

31.19.8 Defining Clickable Text

type statement
Function mouse-on-link-p pos

31.19.9 Defining and Using Fields

type statement
Function field-beginning &optional pos escape-from-edge limit
Function field-end &optional pos escape-from-edge limit
Function field-string &optional pos
Function field-string-no-properties &optional pos
Function delete-field &optional pos
Function constrain-to-field new-pos old-pos &optional escape-from-edge only-in-line inhibit-capture-property

31.19.10 Why Text Properties are not Intervals

31.20 Substituting for a Character Code

type statement
Function subst-char-in-region start end old-char new-char &optional noundo
Command translate-region start end table

31.21 Registers

type statement
Variable register-alist
Function get-register reg
Function set-register reg value
Command view-register reg
Command insert-register reg &optional beforep
Function register-read-with-preview prompt

31.22 Transposition of Text

type statement
Function transpose-regions start1 end1 start2 end2 &optional leave-markers

31.23 Dealing With Compressed Data

type statement
Function zlib-available-p
Function zlib-decompress-region start end

31.24 Base 64 Encoding

type statement
Command base64-encode-region beg end &optional no-line-break
Function base64-encode-string string &optional no-line-break
Command base64-decode-region beg end
Function base64-decode-string string

31.25 Checksum/Hash

type statement
Function secure-hash algorithm object &optional start end binary
Function md5 object &optional start end coding-system noerror

31.26 Parsing HTML and XML

type statement
Function libxml-parse-html-region start end &optional base-url discard-comments
Function shr-insert-document dom
Function libxml-parse-xml-region start end &optional base-url discard-comments

31.27 Atomic Change Groups

type statement
Function prepare-change-group &optional buffer
Function activate-change-group handle
Function accept-change-group handle
Function cancel-change-group handle

31.28 Change Hooks

type statement
Variable before-change-functions
Variable after-change-functions
Macro combine-after-change-calls body...
Variable first-change-hook
Variable inhibit-modification-hooks

おわり

ざっと眺めてみたけど答はなかったみたい。 ナローイングと併せて insert するんかな。

しかし、、、、沢山あるな。

Emacs Lisp の非ASCII文字関連のオペレータ

バッファをファイルに保存するところで眺めたくなったので一覧にする。

32 Non-ASCII Characters

32.1 Text Representations

Type Statement
Variable enable-multibyte-characters
Function position-bytes position
Function byte-to-position byte-position
Function bufferpos-to-filepos position &optional quality coding-system
Function filepos-to-bufferpos byte &optional quality coding-system
Function multibyte-string-p string
Function string-bytes string
Function unibyte-string &rest bytes

32.2 Disabling Multibyte Characters

なし

32.3 Converting Text Representations

Type Statement
Function string-to-multibyte string
Function string-to-unibyte string
Function byte-to-string byte
Function multibyte-char-to-unibyte char
Function unibyte-char-to-multibyte char

32.4 Selecting a Representation

Type Statement
Function set-buffer-multibyte multibyte
Function string-as-unibyte string
Function string-as-multibyte string

32.5 Character Codes

Type Statement
Function characterp charcode
Function max-char
Function get-byte &optional pos string

32.6 Character Properties

Type Statement
Function get-char-code-property char propname
Function char-code-property-description prop value
Function put-char-code-property char propname value
Variable unicode-category-table
Variable char-script-table
Variable char-width-table
Variable printable-chars

32.7 Character Sets

Type Statement
Function charsetp object
Variable charset-list
Function charset-priority-list &optional highestp
Function set-charset-priority &rest charsets
Function char-charset character &optional restriction
Function charset-plist charset
Function put-charset-property charset propname value
Function get-charset-property charset propname
Command list-charset-chars charset
Function decode-char charset code-point
Function encode-char char charset
Function map-charset-chars function charset &optional arg from-code to-code

32.8 Scanning for Character Sets

Type Statement
Function charset-after &optional pos
Function find-charset-region beg end &optional translation
Function find-charset-string string &optional translation

32.9 Translation of Characters

Type Statement
Function make-translation-table &rest translations
Variable standard-translation-table-for-decode
Variable standard-translation-table-for-encode
Variable translation-table-for-input
Function make-translation-table-from-vector vec
Function make-translation-table-from-alist alist

32.10 Coding Systems

32.10.1 Basic Concepts of Coding Systems

Type Statement
Function coding-system-get coding-system property
Function coding-system-aliases coding-system

32.10.2 Encoding and I/O

Type Statement
Variable buffer-file-coding-system
Variable save-buffer-coding-system
Variable last-coding-system-used
Variable file-name-coding-system

32.10.3 Coding Systems in Lisp

Type Statement
Function coding-system-list &optional base-only
Function coding-system-p object
Function check-coding-system coding-system
Function coding-system-eol-type coding-system
Function coding-system-change-eol-conversion coding-system eol-type
Function coding-system-change-text-conversion eol-coding text-coding
Function find-coding-systems-region from to
Function find-coding-systems-string string
Function find-coding-systems-for-charsets charsets
Function check-coding-systems-region start end coding-system-list
Function detect-coding-region start end &optional highest
Function detect-coding-string string &optional highest
Variable inhibit-null-byte-detection
Variable inhibit-iso-escape-detection
Function coding-system-charset-list coding-system

32.10.4 User-Chosen Coding Systems

Type Statement
Function select-safe-coding-system from to &optional default-coding-system accept-default-p file
Variable select-safe-coding-system-function
Function read-coding-system prompt &optional default
Function read-non-nil-coding-system prompt

32.10.5 Default Coding Systems

Type Statement
User Option auto-coding-regexp-alist
User Option file-coding-system-alist
User Option auto-coding-alist
Variable process-coding-system-alist
Variable network-coding-system-alist
Variable default-process-coding-system
User Option auto-coding-functions
Function find-auto-coding filename size
Function set-auto-coding filename size
Function find-operation-coding-system operation &rest arguments

32.10.6 Specifying a Coding System for One Operation

Type Statement
Variable coding-system-for-read
Variable coding-system-for-write
Variable coding-system-require-warning
User Option inhibit-eol-conversion
Function coding-system-priority-list &optional highestp
Function set-coding-system-priority &rest coding-systems
Macro with-coding-priority coding-systems &rest body...

32.10.7 Explicit Encoding and Decoding

Type Statement
Command encode-coding-region start end coding-system &optional destination
Function encode-coding-string string coding-system &optional nocopy buffer
Command decode-coding-region start end coding-system &optional destination
Function decode-coding-string string coding-system &optional nocopy buffer
Function decode-coding-inserted-region from to filename &optional visit beg end replace

32.10.8 Terminal I/O Encoding

Type Statement
Function keyboard-coding-system &optional terminal
Command set-keyboard-coding-system coding-system &optional terminal
Function terminal-coding-system &optional terminal
Command set-terminal-coding-system coding-system &optional terminal

32.11 Input Methods

Type Statement
Variable current-input-method
User Option default-input-method
Command set-input-method input-method
Function read-input-method-name prompt &optional default inhibit-null
Variable input-method-alist

32.12 Locales

Type Statement
Variable locale-coding-system
Variable system-messages-locale
Variable system-time-locale
Function locale-info item

おわり

しかし要素が多い。
関数以外も入れているからかもだけど。

Emacs Lisp する上で、ここが最後の山のような気がする。

Emacs Lisp のバッファ関連のオペレータ

Emacs Lisp をするのにバッファの壁を越える必要があるので、バッファに関するオペレータを一覧にしてみました。

26 Buffers

26.1 Buffer Basics

type syntax
Function bufferp object

26.2 The Current Buffer

type syntax
Function current-buffer
Function set-buffer buffer-or-name
Special Form save-current-buffer body...
Macro with-current-buffer buffer-or-name body...
Macro with-temp-buffer body...

26.3 Buffer Names

type syntax
Function buffer-name &optional buffer
Command rename-buffer newname &optional unique
Function get-buffer buffer-or-name
Function generate-new-buffer-name starting-name &optional ignore

26.4 Buffer File Name

type syntax
Function buffer-file-name &optional buffer
Variable buffer-file-name
Variable buffer-file-number
Function get-file-buffer filename
Function find-buffer-visiting filename &optional predicate
Command set-visited-file-name filename &optional no-query along-with-file
Variable list-buffers-directory

26.5 Buffer Modification

type syntax
Function buffer-modified-p &optional buffer
Function set-buffer-modified-p flag
Function restore-buffer-modified-p flag
Command not-modified &optional arg
Function buffer-modified-tick &optional buffer
Function buffer-chars-modified-tick &optional buffer

26.6 Buffer Modification Time

type syntax
Function verify-visited-file-modtime &optional buffer
Function clear-visited-file-modtime
Function visited-file-modtime
Function set-visited-file-modtime &optional time
Function ask-user-about-supersession-threat filename

26.7 Read-Only Buffers

type syntax
Variable buffer-read-only
Variable inhibit-read-only
Command read-only-mode &optional arg
Function barf-if-buffer-read-only &optional position

26.8 The Buffer List

type syntax
Function buffer-list &optional frame
Function other-buffer &optional buffer visible-ok frame
Function last-buffer &optional buffer visible-ok frame
Command bury-buffer &optional buffer-or-name
Command unbury-buffer
Variable buffer-list-update-hook

26.9 Creating Buffers

type syntax
Function get-buffer-create buffer-or-name
Function generate-new-buffer name

26.10 Killing Buffers

type syntax
Command kill-buffer &optional buffer-or-name
Variable kill-buffer-query-functions
Variable kill-buffer-hook
User Option buffer-offer-save
Variable buffer-save-without-query
Function buffer-live-p object

26.11 Indirect Buffers

type syntax
Command make-indirect-buffer base-buffer name &optional clone
Command clone-indirect-buffer newname display-flag &optional norecord
Function buffer-base-buffer &optional buffer

26.12 Swapping Text Between Two Buffers

type syntax
Function buffer-swap-text buffer

26.13 The Buffer Gap

type syntax
Function gap-position
Function gap-size

おわり。

バッファを知るにはもう少しっぽいですね。

バッファが何者かを理解するには Buffer-Local Variables も見る必要がありそう。