Emacs Flashcards

(12 cards)

1
Q

What is a buffer ?

A

In Emacs, a buffer is an object that holds text which can be edited.

Buffers are similar to what other systems might call a file, document, workspace or editor.

Buffers are the basic editing unit in Emacs and one buffer corresponds to one piece of text being edited.

Multiple buffers can be open at once but only one can be edited at a time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Emacs ?

A

Emacs is a family of text editors characterized by their extensibility. It is designed for POSIX operating systems and available on Linux, BSD, macOS, Windows, and more.

Emacs features an interpreter for Emacs Lisp, a dialect of the Lisp programming language, and is well known for its versatility.

It offers powerful capabilities with easy-to-install language support and can help users navigate faster in macOS with the same keybindings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Who is Richard Stallman ?

A

Richard Matthew Stallman (born March 16, 1953) is an American free software movement activist and programmer.

He leads the Free Software Movement, which shows how non-free software subjects users to the unjust power of its developers.

He is the founder of the Free Software Foundation and the GNU project.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to open Emacs ?

A

Type “emacs” in the CLI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Here is a summary of simple cursor-moving operations, including the word and sentence moving commands:

A

C-f Move forward a character
C-b Move backward a character

    M-f     Move forward a word                                                                                                                           
    M-b     Move backward a word                                                                                                                          
                                                                                                                                                          
    C-n     Move to next line                                                                                                                             
    C-p     Move to previous line                                                                                                                         
                                                                                                                                                          
    C-a     Move to beginning of line                                                                                                                     
    C-e     Move to end of line                                                                                                                           
                                                                                                                                                          
    M-a     Move back to beginning of sentence                                                                                                            
    M-e     Move forward to end of sentence
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The following commands are useful for viewing screenfuls:

A

C-v Move forward one screenful

    M-v    Move backward one screenful                 
                                                                                              
    C-l      Clear screen and redisplay all the text,                                                                                                      
              moving the text around the cursor                                                                                                            
              to the center of the screen.                                                                                                                 
              (That's CONTROL-L, not CONTROL-1.)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The way you give a command a repeat count is by typing C-u and then the digits before you type the command.

A

For instance, C-u 8 C-f moves forward eight characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

IF EMACS STOPS RESPONDING.

A

If Emacs stops responding to your commands, you can stop it safely by typing C-g.

You can use C-g to stop a command which is taking too long to execute.

You can also use C-g to discard a numeric argument or the beginning of a command that you do not want to finish.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

WINDOWS

A

Emacs can have several “windows”, each displaying its own text. We will explain later on how to use multiple windows.
Right now we want to explain how to get rid of extra windows and go back to basic one-window editing. It is simple:

    C-x 1   One window (i.e., kill all other windows).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Here is a summary of the delete operations:

A

<del> Delete the character just before the cursor
C-d Delete the next character after the cursor</del>

   M-<DEL>      Kill the word immediately before the cursor                                                                                              
   M-d               Kill the next word after the cursor                                                                                                      
                                                                                                                                                          
   C-k                Kill from the cursor position to end of line                                                                                             
   M-k               Kill to the end of the current sentence
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

kill a segment

A

You can also kill a segment of text with one uniform method. Move to one end of that part, and type C-<SPC>.
(<SPC> is the Space bar.)
Next, move the cursor to the other end of the text you intend to kill.
As you do this, Emacs highlights the text between the cursor and the position where you typed C-<SPC>. Finally, type C-w. This kills all the text between the two positions.</SPC></SPC></SPC>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Now to retrieve what killed text:

A

Type C-y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly