Emacs uses notes

xiaoxiao2021-03-06  41

Emacs uses notes

Author: Wang Chunyu

File: $ ID: NOTES-EMACS, V 1.143 2004/12/24 15:34:05 SPR EXP $

URL: & DTML-ABSOLUTE_URL;

----

GREP-Find Search the substrings included in the current directory and subdirectory files

M-x grep-find

It is very convenient to use grep, find, grep mode (from compile mode), which can be arbitrary.

Buffer can be positioned with C-X `or in * Grep * buffer with C-C C-C!

----

FOOBAR2000 playing MP3 in Windows

It should not be Emacs's things, but use the function of W32-shell-execute, but fell

It is a function of playing the entire directory without leaving Emacs, just like the mouse in Windows.

Right-click. The code is simple:

(Require 'Dired)

(Define-Key Dired-Mode-Map "H" 'chunyu-red-foobar2000-play)

(Defun chunyu-red-foobar2000-play ()

(Interactive)

(LET (File-Name (Dired-get-filename 'no-dir)))

(IF (file-exists-p file-name)

(ProgN)

(Message "Playing ...% s" file-name)

(W32-Shell-Execute

NIL "C: / Program files / foobar2000 / foobar2000.exe"

(Format "/"% s / "" file-name) 1)))))))))))))))

You can play the entire directory on a directory of your music. At present

Some judgments, for example, do not perform, etc. when it is not a music file.

----

Indent-Relative & Indent-Relative-Maybe

...

----

Gnus agent file coding system

gnus-agent-file-coding-system

----

Open file directly with file name

The FileCache package provides a method of opening a file directly with a file name, do not have to care for the file in that directory

surface. When opening a file, press C-Tab in Minibuffer, open the corresponding file directly.

(Eval-a-loading "filecache"

PROGN (file-cache-add-directory-using-find "~ / projects)

(file-cache-add-directory-list "(" ~ / Work "" ~ / work / proj2 ")))

(file-cache-add-file-list (List "~ / foo / bar" "~ / baz / bar")))))))))

(Define-key minibuffer-local-faction-map [c-tab] 'file-cache-minibufffer-complete

(Define-key minibuffer-local-map [c-tab] 'file-cache-minibuffer-complete)

(Define-key minibuffer-local-must-match-map [c-tab] 'file-cache-minibuffer-complete) ----

Modify the file name to complete the full suffix

(setq completion-ignored-extensions

(Append '(".bin" ".ext" ".free")

Completion-ignored-extensions))

(delete ".log" completion-ignored-extensions)

----

Fonts used on Windows XP

Create-FontSet-from-fontset-Spec

(Concat)

"- * - Courier new-normal-r - * - * - 13 - * - * - * - c - * - fontset-Chinese,"

"CHINESE-GB2312: - * - MS SONG-NORMAL-R - * - * - 14 - * - * - * - C - * - GB2312 * - *"))

Create-FontSet-from-fontset-Spec

(Concat)

"- * - Courier new-bold-r - * - * - 13- * - * - * - c - * - fontset-chinesebold,"

"Chinese-GB2312: - * - MS SONG-BOLD-R - * - * - 14 - * - * - * - C - * - GB2312 * - *"))

(setq default-frame-alist

((Font. "fontset-chinese")))))))))

(set-face-font 'bold "fontset-chinesebold")

----

POP Up Marks

(GLOBAL-SET-key "/ c-z" 'set-mark-command)

(GLOBAL-SET-Key "/ C-X / C-P" 'POP-GLOBAL-MARK)

C-U C-Z CYCLE IN LOCAL BUFFER MARK RING.

C-X C-P CYCLE IN GLOBAL MARK RING.

----

Toolbar Add the chapter index of the LaTex document

When using AuCtex and Reftex to edit the Latex file, if you like to use the mouse, try this,

You can add an "index" menu to the toolbar and jump directly between your chapters.

M-x IMenu-add-menubar-index or

(setq reftex-load-hook (quote (IMenu-add-menubar-index))))

(setq reftex-mode-hook (quote (ife (iMenu-add-menubar-index)))

----

Exiting Picture Mode can use C-C C-C

It is said to be a key without a document.

----

Find tags

M-. Find-tag

C-m-. Find-tag-regexp

C-X 4. Find-tag-other-window

C-X 5. Find-Tag-Other-Frame

----

SEXP Operate

Backward-Kill-SEXP M-C-Backspace

Backward-SEXP C-M-B

EVAL-LAST-SEXP C-X C-E

EVAL-PRINT-Last-SEXP M-X EVAL-PRINT-LAST-SEXP RET

Forward-SEXP C-M-FINDENT-PP-SEXP M-X Indent-PP-SEXP RET

Indent-SEXP M-X Indent-Sexp Ret

KILL-SEXP C-M-K

Last-sexp-Toggle-Display M-X Last-Sexp-Toggle-Display Ret

Mark-SEXP C-M-SPC, C-M- @

PP-EVAL-Last-SEXP M-X PP-EVAL-Last-Sexp Ret

Raise-sexp m-x raise-sexp Ret

TRANSPOSE-SEXPS C-M-T

----

Abbrev Misc

M- 'Abbrev-Prefix-Mark

C-x 'Expand-Abbrev

C-M- / DABBREV-COMPLETION

----

Section editing

C-x 6 2C-Command

C-X 6 S 2C-SPLIT

C-X 6 B 2c-Associate-buffer

C-X 6 2 2C-TWO-Column

----

Adjust window

C-X Balance-Windows

C-X - Shrink-Window-if-lar-tour-than-buffer

----

Not very common, but more useful keys

C-x Tab Indent-Rigidly

M- ^ delete-indentation

C-X C-N set-goal-color

C-X; Comment-set-column

C-x

C-X> Scroll-Right

C-x [Backward-Page

C-x] Forward-Page

C-x l Count-line-page

C-x = What-cursor-position

C-M-S-V scroll-other-window-down

Register & Bookmark:

C-X r l Bookmark-Bmenu-List

C-X R r copy-rectangle-to-register

C-X / Point-to-register-compatibility-binding

C-x g insert-register-compatibility-binding

C-X j jump-to-register-compatibility-binding

C-X x Copy-to-register-compatibility-binding

M-R Move-to-Window-Line

----

Not very common, but nothing used

C-X C-D List-Directory

C-X C-R Find-file-read-only

C-X i INSERT-FILE

C-X Left Prev-buffer

C-X Right Next-Buffer

M-G FaceMenu-Keymap

----

Reload file with a certain encoding

C-X C-M r ... RET (Revert-Buffer-with-Coding-System) ----

Keyboard Macro of GNU Emacs (CVS) (KEYBOARD MACRO)

Emacs in CVS add a KMACRO package to extend the function of the original keyboard macros, increased

The counter, keyboard macro single step execution tool, saves multiple macros with kmacro-ring.

C-X C-K SPC "debug" is very convenient.

C-X C-K {C-P, C-N, C-V} After selecting the macro to be executed, press {c-k} to execute, can also

Press {C-P, C-N} to select, then execute; {C-D} deletes the selected macro.

C-X C-K {C-M, RET, C-E} is equivalent to the original C-X C-K, and directly edits the last defined macro.

When defining the keyboard macro, use C-X Q to prompt whether to continue, use C-U C-X Q to enter any content

(C-M-C exiting recursive editing).

C-X C-K B can directly draw a macro just defined to a key, the default [0-9A-Z] is used to bind the phase

C-X C-K [0-9A-Z].

C-X C-K r Performs macro in Region.

C-X C-k n Named the last defined macro. After name, you can use M-X INSERT-KBD-MACRO

Save to the file for later use.

F3 can be inserted into a built-in insertion of C-X C-K C-i like C-X (the definition of the keyboard macro is the same.

The value of the counter. F4 can end the macro as a definition of the macro, or like C-X E.

Keyboard macro built-in counter:

C-X C-K {C-I, Tab} Insert the value of the counter, each insertion increases 1 or the prefix parameter size;

C-X C-K C-A increases the value of the counter, prompts the input or prefix parameter size;

C-X C-K C-C Sets the value of the counter, prompts the input or prefix parameter size;

C-X C-K C-F Sets the format of the insertion counter value.

From emacswiki:

If you want to define the macro, you don't need C-X (... C-X), you only need to do your macro, then use C-X

C-K L, remove unnecessary content, add a name and binding key, and finally C-C C-C.

----

Add your own keyword

Font-Lock-Add-Keywords

(Font-Lock-Add-Keywords' C-Mode

'("//

("// " Font-Lock-Keyword-Face)))))))

----

Have a choice view: Selective-display

For example, this file, use

M-1 C-X $

Only the theme of each article is displayed, omitted

, ---- [M-1 C-X $]

| ------

| Modify EMACS error tone

| ...

| ------

| Generate Emacs dialog

| ...

| ------

| This movement buffer is also good

| ...

| ------

KEYWIZ game

| ...

`----

In fact, through the amount of reducing, the "line" is selected. Only the line is in one column

M-2 C-X $ set in the top 2

M-4 C-X $ set in the top 4

C-X $ cancel

----

Modify Emacs's error tone

(Set-Message-Beep 'Silent)

System: 'Asterisk,' Exclamation, 'HAND,' Question, 'OK Silent:' Silent

Machine speaker: NIL

----

Generate Emacs dialog

(IF (Yes-or-NO-P "Are you feeling well?")

(Message "You Appear to Be Feeling Well.")

(Message "Hope You Will Get Better Soon!"))

(IF (x-popup-dialog t '("yes". T) ("NO". nil))))

(Message "You Appear to Be Feeling Well.")

(Message "Hope You Will Get Better Soon!"))

----

This movement is not bad.

Move at any time, don't need View Mode, but unfortunately you need to go up and down:

(global-set-key [m-down] '(interactive) (scroll-up 1))))

(Global-set-key [m-up] '(interactive) (Scroll-Down 1))))

----

Keywiz game

KBD-Macro-Query

Query User During KBD Macro Execution.

Nope. The Correct Answer IS: C-X Q

REPEAT-Complex-Command

Edit and Re-Evaluate Last Complex Command, or Argth from Last.

INCORRECT. The Correct Answer IS:

,

, C-X m-: C-X M-ESC

----

CDLATEX * CDLATEX HELP * Question

C-C? Opened * CDLATEX HELP * buffer, the default opens view mode, and later "'",

The prompt of the "` "command is used and modified this buffer content, but the view mode cannot be modified, even

An error occurred.

In the CDLATEX-TURN-ON-HELP function modified, this problem is temporarily solved:

"Erase-buffer" before adding "(view-mode -1)".

[URL: http://zon.astro.uva.nl/~dominik/tools/cdlatex/]

----

Replace the environment variable in the file name

(Substitution-in-file-name "$ home / .emacs.d / .emacs.el")

----

Highlight possible errors in C / C (CWARN Mode)

Configuration: (Global-CWarn-Mode 1)

Manual: M-X CWARN-MODE

Reference: C-H V CWARN-Configuration

----

Autoarg Mode directly as a prefix parameter

Configuration: (Autoarg-mode 1)

Manual: m-x autoarg-mod & autoarg-kp-mode

Reference: Commentary in Emacs / Lisp / AutoArg.el

Numbers in any mode are prefix parameters, M-2 C-N only 2 c-n; but when you want to enter a number, you have to use C-2 C-3 or 23 SPC.

----

Maximize Emacs on Windows

Add (not Toolbar) in the Windows registry:

HKEY_LOCAL_MACHINE / SOFTWARE / GNU / Emacs / Emacs.toolbar = 0 (Reg_SZ)

In. Permacs.el:

(W32-Send-Sys-Command # xf030)

----

BIBTEX automatically generated Key method

Reference: C-H f Bibtex-Generate-AutoKey Ret

----

YAP, GNSERV, EMACS reverse lookup

YAP: View-> Options-> Inverse Search-> Command Line:

"gnuclientw.exe" "-q" " % L" "% f"

GNUSERV SETUP:

(gnuserv-start)

(SetQ gnuserv-frame (selected-frame))

(STENV "gnuserv_show_emacs" 1 ")

----

Calendar shows the lunar calendar

(setq local-holidays

'((Holiday-Chinese 1 15 "Lantern Festival (15th)")

(Holiday-Chinese 5 5 "Dragon Boat Festival (May 5)")

(Holiday-Chinese 9 9 "Double Ninth Festival (September Nine)")

(Holiday-Chinese 8 15 "Mid-Autumn Festival (August 15)"))))))

(AutoLoad 'Chinese-Year "Cal-China" "Chinese Year Data" T)

(Defun Holiday-Chinese (cmonth cday string)

"Chinese Calendar Holiday, Month and Day in Chinese Calendar (Cmonth, CDAY).

IF CORRESPONDING MONTH AND Day in Gregorian Calendar is Visible,

The value returned is the list / ((Month Day Year) String).

Returns nil if it is invisible in the capital calendar window. "

(Let * (m Displayed-Month)

(Y Displayed-Year)

(GDATE (Calendar-Gregorian-from-Absolute

( (CADR (Assoc Cmonth (Chinese-Year Y))))))))))))))))

(Increment-Calendar-Month M Y (- 11 (car gdate))))))

(if (> m 9))))))))))))))))))

----

View frame parameters

Frame-Parameter Nil 'Width

Frame-Parameter Nil 'Height

Frame-parameter nil 'left

Frame-Parameter Nil 'TOP)

Four parameters in Default-Frame-Alist, first adjust, view, and modify

Or more direct:

Frame-parameters nil ----------------------------------

Set the c Source directory

(SetQ Find-Function-C-Source-Directory "~ / Work / Emacs / SRC")

----

Do not display labels in HTML

HTML-MODE:

C-X C-I (SGML-Tags-Invisible)

----

Reverse a piece of text

M-X Reverse-Region is reversed in a behavior unit

----

BIBTEX Management BIB file

Adding, modifications are very convenient. From o8o @ SMTH:

1. One template can be inserted (refer to C-C C-E C-H) as needed;

2. It can be easily cleared from the items that are not needed in the template (C-C C-C);

3. After inserting, you can generate a key (automatic or manual) that you need;

4. Can be sorted insertion of references according to Key, do not worry about repeating the same literature

(C-H v Bibtex-maintain-sorted-entries);

5. Move in each item is convenient (Tab & C-J).

----

RefTex Management / Browse / Adjust TEX files, labels, reference, indexing, etc.

Can be used with AUCTEX.

(SetQ Reftex-Plug-Into-AuCtex T)

(Add-hook 'tex-mode-hook' Turn-on-RefTex)

You can also create an index, label, reference, etc. in TEX BUFFER.

----

Insert - * - MODENAME - * - Tag

(Defun chunyu-insert-file-variable ()

"INSERT FILE VARIABLE STRING /" - * - Major-Mode-Name - * - / "with

Comment char "

(Interactive)

(Insert)

(Concat Comment-Start "- * -"

(Substring)

(Symbol-value (symbol-value 'major-mod)) 0 -5)

"- * -" Comment-end)))))))))

----

CVS AuCtex has context mode

You don't need to install it yourself, and binding and LaTex-mode is almost.

Export CVS_RSH = "SSH"

CVS -Z3 -D: EXT: Anoncvs@savannah.gnu.org: / cvsroot / AuCtex Co AuCtex

CD AuCtex && ./AUTOGEN.SH && ./configure

(If you edit makefile, doc / makefile, edit Makefile, Doc / Makefile,

Prefix directory)

Make && make Install

----

Feedmail INSTEAD OF FAKEMAIL

Feedmail Package seems to be able to replace Fakemail.exe, but it is not clear how configured.

Unfortunately, if you are on Windows, you need Sh.exe and Rmail.exe et al. (.

----

Remove. It is no longer needed in Emacs (now very little use)

(Define-Prefix-Command 'CTL-X-M-MAP)

(GLOBAL-SET-Key "/ C-XM" 'CTL-X-M-MAP)

(Define-Key CTL-X-M-MAP "E" 'CVS-Examine)

(Define-Key CTL-X-MAP "M" 'man-xiM (define-key CTL-X-M-MAP "G"' Run-Scheme)

(Define-Key CTL-X-M-MAP "B" 'List-Bookmarks)

(Define-Key CTL-X-M-MAP "L" 'browse-kill-ring)

(Define-Key CTL-X-M-MAP "a" 'align-current)

----

Commentary Of Emacs-CVS / LISP / IIMAGE.EL

Should Be:

(AutoLoad 'iimage-mode "iimage" "inline image." t)

(Autoload 'Turn-on-Iimage-Mode "iimage" "INLINE Image". "T)

; `` I'nfo-mode-hook

(Add-hook 'info-mode-hook' Turn-on-iimage-mode)

----

Use gnuserv.exe less than a parameter:

(gnuserv-start)

(SetQ gnuserv-frame (selected-frame))

(STENV "gnuserv_show_emacs" 1 ")

----

Current terminals can display supported fonts (a method of judging the graphics terminal)

(Display-Multi-font-P)

Return Non-Nil if Display is a graphic display.

(Display-Multi-Font-P & Optional Display)

----

Send Net Message for Windows Box on Linux Box via SMBClient

Linux -> Windows (Net-Message) in Emacs:

M- | SMBCLIENT -M machine name

Or directly:

Cat "Hello!" | SMBCLIENT -M machine name

----

Outline Minor Mode's key prefix

Default:

C-C @

Or yourself modified:

(SetQ OUTLINE-MINOR-MODE-Prefix "/ C-C / C-O")

----

Open files with associated programs on Windows

(Eval-after-load "dired"

'(ProgN)

;; Dired original "o" is basically useless to me.

(Define-Key Dired-Mode-Map "O" 'chunyu-red-open-explorer)))))))))

(Defun Chunyu-Dired-Open-Explorer ()

(Interactive)

(LET (File-Name (Dired-Get-File-for-Visit))

(IF (file-exists-p file-name)

(W32-shell-execute "open" file-name nil 1)))))))))))))))))))

It turns out that cmd.exe's start command, but there is no space in the path. This one

W32-shell-execute is no problem, it is not bad.

In addition, from another person's. EMACS, you can open all files that are tagged at the same time:

(& Optional Arg) (Interactive "P")

(Mapcar # '(Lambda (File) (W32-Shell-Execute "Open" file))

(Dired-get-marked-files nil arg))))

And you can be bound to the mouse, open with mouse bile (mouse-2) or double click (double-mouse-1):

(Define-Key Dired-Mode-Map [mouse-2] 'Dired-Mouse-Execute-File

(Defun Dired-Mouse-Execute-file (Event)

"In Dired, Execute the File or Goto Directory Name You Click ON."

(Interactive "E")

(SET-BUFFER (POSN-Window (Event-end Event)))))

(goto-char (POSN-POINT (Event-end Event)))

(Dired-Execute-file))

----

Use the left and right WIN keys on Windows

(SetQ W32-pass-rwindow-to-system nil)

(Setq W32-rwindow-modifier 'hyper)

(SetQ W32-Pass-Lwindow-to-System NIL)

(SetQ W32-LWindow-Modifier 'Hyper)

E.g:

(GLOBAL-SET-key [(Hyper? z)] 'compile

----

DUMPING Emacs parameters

#! / bin / sh

Myemacs = $ 1

. / * $EMACS --BATCH --LOAD ~ / .EMACS.D / .EMACS.EL /

--execute "(dump-emacs /" mymacs / "/" $ myemacs / ")"

----

Several list commands list some variables

M-X List-Colors-Display Ret

M-X LIST-Faces-Display Ret

(SetQ List-Faces-Sample-Text

"Zhao Qian Sun Li Zhou Wu Zheng Wang Abcdefg..z Abcdefg..z")

M-x list-charset-chars

M-X list-character-sets

M-x list-load-path-shadows

M-X list-options

M-X LIST-color-display

M-x list-registers

M-x list-command-history

M-x list-processes

M-x list-input-method

----

CVS Emacs View UTF-8

M-X UTF-TRANSLATE-CJK-MODE

(UTF-Translate-CJK-Mode 1)

----

Perform cmd.exe's start command

(START-Process "Dir" nil "cmd.exe" "/ c" "start" "C:")

Of course, it is better to use W32-Shell-Execute.

----

Beginning-of-buffer prefix parameters

M-2 m-x beginning-of-buffer return (m-2 m- <) buffer 20%

M-5 m-x beginning-of-buffer return (m-5 m- <) buffered by 50% ----

Definition of the ELISP function near display site

M-X Eldoc-Mode Ret

When writing ELISP, it should be more useful, and the real-time prompt function is defined.

----

View the current characters Face

M-X Describe-Text-Properties Ret

Find Which face is being usned at the point.

M-X Describe-Face Ret

----

Let Search-Ring called buffer-local

Such Search's history is different depending on the buffer.

(Make-Variable-Buffer-Local 'Search-Ring)

(Make-Variable-Buffer-Local 'ISearch-String)

Make C-S C-S ... Search with strings in buffer limited.

----

Historical commands ELISP list

M-X command-history ret

----

Clean up Current Emacs Session

M-X Clean-Buffer-List Ret

M-X Kill-Some-Buffers Ret

or kill-all-buffers:

(Defun Kill-all-buffers ()

(Interactive)

(Map 'NIL #' KILL-BUFFER (Buffer-List)))

----

View the EL file covered by load-pat

M-x list-load-path-shadows

----

FF-FIND-OTHER-FILE:

Daniel> Hello, I Would Like A Script That I Can Bind to Ctrl-Shift-H

Daniel> That Will Switch from a .cpp file to the associated .h file,

Daniel> if there is one. For example, if i Have Hash.cpp Opened and

Daniel> Press the selected keys, emacs switches to haveh.h. if there is

Daniel> no hash.h Nothing is done. Any Help appreciated. Thanks!

Daniel> - Daniel

In addition: FF-FIND-RELATED-FILE

----

Hideshow Minor Mode

HS-minor-mode

----

Repeat the previous complex command

C-X ESC ESC

C-X m-:

----

Set the default tags file in .emacs

(visit-tags-table "/ path / to / Table")

----

M-; flexible notes (C-H k M-;)

If Transient-Mark-Mode is turned on and region is valid: Comment-Region

But if only comments: UNComment-Region

Otherwise, if the current behavior is blank, insert a comment and indent: ...

Otherwise, if a given prefix parameter: comment-kill

Otherwise: comment-indent

----

M-X Toggle-Debug-on-Quit

When you have stopped, C-Q can generally see what is going on. ----

Converting the current Buffer modification tag (Modification-Flag)

M- ~ / C-U m- ~ not-modified

----

C-x @: Event-Apply - * - Modifier

C-X @ c Event-Apply-Control-Modifier

C-X @ s Event-Apply-Shift-Modifier

C-X @ a Event-Apply-Alt-Modifier

C-X @ m Event-Apply-Meta-Modifier

C-X @ s Event-Apply-Super-Modifier

C-X @ h Event-Apply-Hyper-Modifier

----

Several keys provided by FIND-FUNCTION-SETUP-Keys directly find the definition of functions or variables in the LISP

Find-function-setup-keys "Which Sets Up Some Shortcuts.

C-x [4,5] f Find-function

C-X [4,5] v Find-Variable

C-X K FIND-FUNCTION-ON-KEY

----

Eliminate error tones (Ring-Bell)

Method 1: Flash with the screen instead of Ring Bell

(SetQ Visible-Bell 1)

Method 2: Modify the Ring Bell function

SetQ Ring-Bell-Function 'ignore

Method 3: Modify Message Sound

(Set-Message-Beep 'Silent)

----

Use C-X RET C encoded, save, change file DOS / UNIX format

(First change the file first, or use the C-U M- ~ set the file to changed)

C-X RET C Chinese-ISO-8bit-DOS RET C-X C-S

No matter what it is, it is saved as a DOS format;

(Change the file)

C-X RET C Chinese-ISO-8bit-Unix Ret C-X C-S

No matter what it is, it is saved as UNIX format.

This command can also be used to open files in some coding ...

----

Edit the Submitted CVS log.

>>>>> "LUC" == LUC TEIRLINCK

Writes: is there

> a REASONABLY EASY WAY TO CORRECT The Per File CVS log entry for ann

> ALREADY COMMITTED CHANGE? I INADVERTENTLY Forgot a per file

Use PCL-CVS'S `L 'Command To Get The Log and The Hit` E'

(or m-x cvs-mode-edit-log) on ​​the log entry you want to change.

Stefan

> The only way to change a cvs log entry is to edit the repository. The repository.

> cvs frontend does not allow..

CVS Admin -M

:

Stefan ---- Several Sets Mark MC-SPC Mark-SEXP Mark an Expression M- @ Mark-Word Marking One Word MH Mark-Paragram Mark A Whole CMH Mark-Defun Marks One Function Definition These commands are repeated When it is pressed, Region will expand each time. For example, M-H m-h is equivalent to M-2 m-H. Open a C-SPC C-SPC before it is clearer. TRANSIENT-MARK-mode ---- Temporary Trend-Mark-Mode two methods: C-SPC C-SPC Two set-mark-command CU CX CX swaps Mark and Point When using the CU prefix ---- Emacs Add a line number, use Setnu.el http://www.zipworld.com.au/~peterm/download/setnu.el ---- Info Path (add-to-list 'info-default-directory-list "D: / mingw / info ") ---- align: (Document in Emacs / Lisp / Align.el) will be below the format: int a = 1; short foo = 2; double black = 4; automatic change to format: int a = 1; Short foo = 2; Double Blah = 4; (Require 'align) MX Align-Current Ret MX Align-Entire RET ---- EMACS LISP Interactive Environment MX IELM RET Provides A Nice Interface to Evaluating Emacs Lisp Expressions. Input Is Handled by The Comint Package, And Output IS Passed Through The Pretty-Printer. ---- Judging the number of colors of Emacs: Display-color-cells (by (> (> (> (> ") ...) --- (Hi-Lock-Mode 1) Highlight Mode CX WB HI-LOCK-WRETE-INTERACTIVE-PATTERNS CX WR Unhanghlight-Regexp CX WPHHIGHLIGHT-REGEXP CX WP Highlight-Phrase CX WL Highlight-Lines-Matching-Regexp CX Wi Hi-Lock-Find-Patterns ;; Sample File Patterns:; Hi-Lock: (("^ ;;;. *" (0 (Quote Hi-Black-HB))))))))))))))))); HI-LOCK: ("Make-Variable-Buffer - // (0 font-lock-keyword-face) (1 'Italic APPEND)))))))))))))))))))))))))))); Hi-Lock: End - The use of some of the programs of Emacs converts the mail file from the RMAIL format into UNIX Mbox format. EbrowSe allows Emacs to call the hierarchical structure of C classes. EmacsClient launches an EMACS process on the Emacs server. Etags is also a program that generates source code to refer to the label file. GREP-CHANGELOG Change Change Log (Changelogs) in line with different conditions. RCS-Checkin A script that adds a file to the RCS (Modify Management System).

Cvtmail converts the old-fashioned Goslings Emacs mail catalog into a GNU-RMAIL format. DiGest-DOC Create a NROFF output for MAN Page. EmacServer allows other programs or shells to read and write a running Emacs and share buffers. Fakemail is a similar interface similar to Sendmail to / Bin / Mail. HEXL converts binary into the format that Emacs hexadecimal mode can be used. MoveMail can read POP3 mailboxes. Profile generates a periodic event for the Profiling of the LISP code for Emacs. Rcs2log generates a prefix that modifies the log by the RCS file. Sorted-Doc Create a TexInfo file to take care of the mirror VCDIFF comparison SCCS file. ---- Chinese Tian dry land from smth to add the following code in ~ / .emacs ("A" "B" "B" "B" "Ding" "Ding" "" "" "" "" " Xin "" "" "]) (setQ chinese-calendar-terrestrial-branch [" "" 寅 "" "" Chen "" "" noon "" not "" Shen "" " "" "Hai"]) Then press P c in Calendar, you can see the Chinese days --- CX CN (MX Set-Goal-Column) Set Next-Line or Previous-Line command to Columns, it is useful to move when a column is moved. It is possible to prevent the inconvenience caused by SETQ TRACK-EOL T). Add a non-empty parameter to cancel, such as C-U C-X C-N. ---- TYPE CU 1 0 0 Cu 1 To INSERT 100 1'S. ---- CU 0 CX CS Never Makes A Backup File. ---- Dired marked file name and tag containing some rows of files *. Mark the same Extended file% g Marks files with rows that match Regexp ---- (Partial-Completion-Mode 1) MX TTL for MX Toggle-Truncate-Lines OR (MX T SPC T SPC L RET) CX CF

For Opening "/usr/include/sys/time.h" ---- Turn off the buffer - (Global-set-key "/ c-xk" 'kill-buffer-directly) (global-set-key " / C-xk "'Kill-this-buffer" Kill-this-buffer can close the buffer directly. Or below, don't delete * scratch * buffer. (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, (,,,,,,,,,,,,,, (Kill-Buffer))) ---- IMenu moves the cursor according to the function defined in the buffer - (Define-Key CTL-XM-MAP "I" 'Box Qote-Insert-file) ( Define-Key CTL-XM-MAP "I" 'Imenu); Boxquote-Insert-File ---- (Which-Func-Mode 1) Displays the current row in that function in Mode-Line ---- (iComplete -Mode 1) When performing a command with MX, give an optional command name at the same time. ---- EMERGE EMERGE is very easy to use MX Emerge-Files Ret So Cool. --- Modify Dired Dired uses LS to get buffer content, the default parameter is "-al", can pass (setq Dired-Listing -Switches "-avl") Modify in .emacs, "V" of the parameter can make the uppercase file name at the top. You can also use the command in the Dired buffer: C-U s temporarily modified. ---- Does not display the start screen of Emacs (setQ inhibit-startup-message t) ---- EMACS does not find the appropriate mode, use text-mode (setq default-major-mode 'Text-mode) ---- When the storage is required, there are some files when the last character is required, and such a format, such as / etc / fstab file, there is no error in the end of the file. (SetQ Require-final-newline T) ---- Mini Buffer Do not automatically adjust the size (setq resize-limited "---- the cursor moved up and down at the end, always staying at the end (SetQ TRACK-EOL) T) ---- Let the Man Page Buffer in Emacs use the current window and become the way the current buffer MX Man-Follow or MX Man pops up BUFFER.

(SetQ man-notify-method 'pushy) ---- When there are two file names, use the prefixed directory name to make a buffer name default is Foobar <1>, FOOBAR <2> ...... Form (SETQ UNIQUIFY-BUFFER-NAME-STYLE 'Forward ---- Time of the key bound to the command is used when using MX Command, the key (SetQ Suggest-Key-Bindings 1) is displayed in 1 second. --- When the number of rows exceeds a certain value, the number of line numbers (setQ line-number-display-limited 1000000) ---- reserves the number of Kill-Ring of the deleted text (SetQ Kill-Ring-Max 200) ---- When the symbolic connection of the file in the CVS, there is no need to ask (setQ VC-FOLLOW-SYMLINKS T) ---- MX Apropos more query, but require more CPU (SetQ Apropos-Do-All NIL) ---- Save the bookmark file whenever you set the bookmark, otherwise save only when you quit Emacs (SetQ Bookmark-Save-Flag 1) ---- Display-Time "on Mode-Line (Display-Time" SETQ Display-Time-24hr-Format T) (Setq Display-Time-Use-Mail-Icon T) (Setq Display-Time-Interval 10) --- When the first CK is the first CK, the setQ-default kill-means-line t) is deleted - set the timestamp to identify the time of the last saved file (SetQ Time-Stamp-Active T) (SETQ Time-Stamp-Active T) Setq time-stamp-warn-inactive t) (setq time-stamp-format "%: Y-% 02M-% 02D% 3A% 02H:% 02m:% 02s chunyu") ---- EMACS backup (SetQ Kept -OLD-VERSIONS 2) (SetQ Kept-New-Versions 5) (S ETQ DELETE-OLD-VERSIONS T) (SetQ backup-directory-alist ") (setq backup-by-copying t) Emacs, when changing the file, the default will Generate a backup file (with ~ ended file). It can be completely removed (not for it), or the way backup can be developed. It is used here that all file backups are placed in a fixed place ("~ / var / tmp"). For each backup file, keep the most original two versions and the latest five versions. And backup, the backup file is a copy, not the original.

---- Change Emacs stubborn to answer Yes behavior, press Y or Spacebar to represent Yes, N represents NO (Fset 'Yes-OR-NO-P' Y-OR-NP) ---- Hippie-Expand The completion function used and the order of use (set-expand-line try-expand-line-all-buffers try-expand-list try-expand-list-all- buffers try-expand-dabbrev try-expand-dabbrev-visible try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-file-name try-complete-file-name-partially try-complete -lisp-symbol try-comple-expand-symbol-partially try-expand-whole-kill) --- TRAMP and Ange-ftp settings for editing remote files (SetQ TRAMP-UNIFIED-FileNames T) (SetQ TRAMP-Auto-Save-Directory "~ / var / tramp") (setq anonymous-password "user@cyber.net") (setq ange-ftp-default-user t) ---. Setting Register Register in Emacs is a resource that can be used to save text, a bit (Mark), filename or directory, value, and so on. All cases of cases and numbers can be used as Register. CX JE opens the .emacs.el file (Set-Register? E '(file. "~ / .Emacs.d / .emacs.el")) CX JG (SET-Register? G' (File. "~ /. Emacs.d / .gnus.el ") ---- Adjust the line spacing nil of Emacs --- Set the Display variable to my Windwos machine, the X-Win32 is installed above, used to Display the X program on the Linux machine (STENV "Display" "Chunyu: 0") ---- Minibuffer Default Enter (Minibuffer-Electric-Default-Mode 1) ---- Minibuffer Enter some commands can be used For example: MX TTL RET can perform MX Toggle-Truncate-Lines. The "-" is just pressed by space.

(Partial-Completion-Mode 1) ---- Auto-Compression-Mode 1 when turned on the compressed file ------------------------------------------------- BLINK-CURSOR-MODE-1) ---- Highlight Show-Paren-Mode 1) ---- Don't Menu-Bar and Tool-Bar (Menu-Bar-Mode -1) (Tool- BAR-MODE-1) or, on Windows, via registry: hkey_local_machine / software / gnu / emacs / emacs.toolbar = 0 (REG_SZ) --- gives a prompt to enter commands with mx foo-bar-command ( ICOMPLETE-MODE 1) ---- Easy to open files and convert Buffer mode (IDO-MODE 1) IDO mode, use Tramp's complement mode (SETQ IDO-Enable-Completion T) IDO mode does not save the directory List (SetQ IDO-Save-Directory-List-File NIL) ---- your own name and email address are used in many places, such as the Changelog file in VC (SetQ User-Full-Name "Chunyu Wang" (SetQ User-Mail-Address "DDDKK (AT) SINA (DOT) COM") ---- About Mail's Simple Setup (SetQ Mail-Signature-File "~ / .sig / default") (SetQ Mail-User -Agent 'gnus-user-agent (setq mail-alias-file "~ / .mailrc") --- Setting GNUS initialization file (setq gnus-init-file " "~ / .emacs.d / .gnus.el") ---- Dired Removable Delete, Copy Sub Directory (Setq Dired-Recurs) Ive-copies t) ---- When the CVS directory in Dired enters the PCL-CVS interface in a Dired Buffer of a CVS local copy directory, if you enter the CVS directory, automatically enter the PCL-CVS interface: (setq cvs-red- Use-hook 'always ---- Emacs Calendar Emacs have calendars, and it can be called a system, because in addition to the most common calendar, there are other nearly ten calendar, including diary, date Reminder, commemorative suggestions, and holiday tips, etc. The calendar includes China's lunar calendar, Hebrew calendar, Islamic, French revolutionary calendar, Chinese and American Maya calendar, etc.

---- Save diary file (setq Diary-file "~ / .Emacs.d / .diary") ---- View the latitude and place name where the sunrise sunset time sets the location, call to S, Calendar, can be based on this Tell you daily sunrise and sunset: (SetQ Calendar-Latitude 45.75) (SetQ Calendar-Longitude 126.63) ("HARBIN") ---- Confucius on the calendar (setq Calendar- REMOVE-FRAME-BY-SELETING T) (SetQ Calendar-Week-Start-Day 1); the first day of week is Monday (SetQ Mark-Diary-Entries-In-Calendar T); marked with recorded days (SetQ Mark -holidays-in-calendar nil); SETQ View-Calendar-Holidays-Initially NIL; does not show a list of holidays --- setQ Christian-Holidays NIL (SetQ Hebrew-Holidays NIL) (setq islamic-holidays nil) (setq general-holidays "((Holiday-fixed 1 1" New Year's-Fixed 4 1 "April Fool's Day) (Holiday-Float 5 0 2 "Mother's Day") (Holiday-Float 6 0 3 "Father's Day"))) ---- Calendar P c You can see our lunar calendar with Chinese Tong dry land (STEM [" "" B "" "" Ding "" Heng "" Heng "" Geng "" Xin "" "" "]) (SETQ Chinese-Calendar-Terrestrial-Branch" "" "" " "" Chen "" "" "" no "" Shen "" "" "" Hai "]) ---- Global-font-lock-mode 1) syntax highlight, Except for shell-mode Sync-Lock-Maximum-Decoration T) (SetQ Font-Lock) in a pattern other than TEXT-MODE (SetQ Font-Lock) (SetQ Font-Lock) Verbose T) (SetQ Font-Lock-Maximum-Size "(VM-MODE. 5250000))) --- Chinese Setting Default Language Environment: (Set-Language-Environment 'Chinese-GB) The encoding of the keyboard input is used for input method: (set-keyboard-coding-system 'chinese-ISO-8bit) The encoding displayed by the terminal: (Set-Terminal-Coding-System' CHINESE-ISO-8BIT) Cutting Board, used Copy content between and other programs:

转载请注明原文地址:https://www.9cbs.com/read-75977.html

New Post(0)