<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikemacs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TychoBrailleur</id>
	<title>WikEmacs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wikemacs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TychoBrailleur"/>
	<link rel="alternate" type="text/html" href="https://wikemacs.org/wiki/Special:Contributions/TychoBrailleur"/>
	<updated>2026-04-19T06:43:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5529</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5529"/>
		<updated>2013-10-23T09:42:43Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5528 by 176.31.235.120 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5527</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5527"/>
		<updated>2013-10-22T22:03:55Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5526 by 176.31.235.120 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5525</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5525"/>
		<updated>2013-10-22T18:51:10Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5520</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5520"/>
		<updated>2013-10-22T15:59:38Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5516</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5516"/>
		<updated>2013-10-22T13:17:26Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5515 by 176.31.235.120 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5514</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5514"/>
		<updated>2013-10-22T10:06:58Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5513 by 176.31.235.120 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5512</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5512"/>
		<updated>2013-10-22T08:51:19Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5501</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5501"/>
		<updated>2013-10-21T12:58:06Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5498</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5498"/>
		<updated>2013-10-21T12:45:23Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5497 by 176.31.235.120 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5494</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5494"/>
		<updated>2013-10-21T08:41:07Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5485</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5485"/>
		<updated>2013-10-20T14:23:23Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5472</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5472"/>
		<updated>2013-10-20T06:55:48Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5467</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5467"/>
		<updated>2013-10-19T21:10:42Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5466 by 176.31.235.120 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5464</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5464"/>
		<updated>2013-10-19T18:36:07Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5463 by 175.42.0.194 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5462</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5462"/>
		<updated>2013-10-19T14:43:43Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5461 by 176.31.235.120 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5460</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5460"/>
		<updated>2013-10-19T13:30:00Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5459 by 176.31.235.120 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5457</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5457"/>
		<updated>2013-10-19T12:14:05Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5456 by 142.0.133.188 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5455</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5455"/>
		<updated>2013-10-19T12:06:31Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5453 by 142.0.133.188 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Main_Page&amp;diff=5452</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Main_Page&amp;diff=5452"/>
		<updated>2013-10-19T11:07:55Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: /* Help build WikEmacs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:InflatableBalloons.jpg|50px|left]] '''Grand reopening!''' '''WikEmacs''' is now under new management and will remain open indefinitely.  Spread the word!&lt;br /&gt;
&lt;br /&gt;
[[File:Emacs_parts.png|320px|thumb|right|Basic [[Emacs Terminology|terminology]] of typical Emacs GUI Frame]]&lt;br /&gt;
__NOTOC__&lt;br /&gt;
'''First time visitors''' can start [[#Explore WikEmacs|exploring WikEmacs]]. We have added lots of useful pages since the launch of WikEmacs.&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
We need more '''[[:Category:WikEmacs Contributor|WikEmacs Contributor]]s'''.  You can help the following way.&lt;br /&gt;
&lt;br /&gt;
{{Note| First of all, please take a minute to look at the&lt;br /&gt;
[[WikEmacs:Guidelines|WikEmacs Guidelines]] before you start editing.}}&lt;br /&gt;
&lt;br /&gt;
* Priority tasks&lt;br /&gt;
** Migrate content from [http://www.emacswiki.org EmacsWiki]. Please adopt the following approach -''I found this on EmacsWiki which was helpful. But it took me a lot of time to find it. Now that I have found it, I will put it in WikEmacs so that others can benefit from it.''&lt;br /&gt;
* Intermediate tasks&lt;br /&gt;
** Provide tutorials or content for the [[:Category:Popular Package|popular packages]] or [[:Category:Built-in Package|built-in packages]].&lt;br /&gt;
** Add more content to [[Special:ShortPages|short pages]].&lt;br /&gt;
** Document or add more [[:Category:Third Party Package|third party packages]].&lt;br /&gt;
* Other tasks&lt;br /&gt;
** Copy edit [[Special:RecentChanges|recent changes]] or be a moral police.&lt;br /&gt;
** Add more members to various [[Special:Categories|categories]].&lt;br /&gt;
** Categorize one of these pages [[Special:UncategorizedPages|uncategorized pages]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Emacs News'''&lt;br /&gt;
&lt;br /&gt;
The latest stable release of Emacs is [[GNU Emacs 24|Emacs-24.3]].&lt;br /&gt;
&lt;br /&gt;
Emacs is available on all popular [[:Category:Install Or Upgrade| Operating Systems]] including [[Installing Emacs on GNU/Linux | GNU/Linux]], [[Installing Emacs on BSD |BSD]], [[Installing Emacs on OS X | OS X]] and [[Installing Emacs on Windows| Windows]].  It supports a variety of [[:Category:Programming languages|programming languages]].&lt;br /&gt;
&amp;lt;!-- Left hand column --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left; width: 49%;&amp;quot;&amp;gt;&lt;br /&gt;
== Explore WikEmacs ==&lt;br /&gt;
&lt;br /&gt;
To explore WikEmacs proceed as follows:&lt;br /&gt;
* Search for or visit a page of interest&lt;br /&gt;
* At the end of the page, there is a list of categories&lt;br /&gt;
* Click on individual categories and it will give you a list of all pages that will be of interest to you.&lt;br /&gt;
&lt;br /&gt;
===  What is your comfort level with Emacs? ===&lt;br /&gt;
* [[:Category:Beginner|Beginner]]&lt;br /&gt;
* [[:Category:Intermediate|Intermediate]]&lt;br /&gt;
* [[:Category:Expert|Expert]]&lt;br /&gt;
** Are you a maintainer of a [[:Category:Built-in Package|Built-in Package]]? If you don't find information about your package, please add it. No one else is better than you are to write about it.&lt;br /&gt;
** Have you developed any [[:Category:Third Party Package|Third Party Package]]s? Consider writing about what it is and how to use it.&lt;br /&gt;
* [[:Category:Vim User|Vim User]]&lt;br /&gt;
&lt;br /&gt;
=== What do you want to accomplish now? ===&lt;br /&gt;
* [[:Category:Install Or Upgrade|Install Or Upgrade]]&lt;br /&gt;
* [[:Category:Customization|Customize Emacs]]&lt;br /&gt;
* [[Key Bindings|Tweak Key Bindings]]&lt;br /&gt;
* [[:Category:Tutorial|Learn more Emacs (Tutorials)]]&lt;br /&gt;
&lt;br /&gt;
=== What do you use Emacs for? ===&lt;br /&gt;
* [[:Category:Text Editing|Text Editing]]&lt;br /&gt;
* [[:Category:Programming|Programming]]&lt;br /&gt;
* [[:Category:Document authoring|Document authoring]]&lt;br /&gt;
* [[:Category:Organizer|Getting Organized]]&lt;br /&gt;
* [[:Category:Email|Emailing]]&lt;br /&gt;
* [[:Category:Chat|Chatting]]&lt;br /&gt;
* [[:Category:Blogging|Blogging]]&lt;br /&gt;
* [[:Category:Browse|Browsing]] &lt;br /&gt;
* [[:Category:Entertainment|Entertainment]]&lt;br /&gt;
* [[:Category:Workflow|Other]]&lt;br /&gt;
&lt;br /&gt;
=== How do you involve yourself with the community? ===&lt;br /&gt;
* [[:Category:Emacs User|Emacs User]]&lt;br /&gt;
* [[:Category:Emacs Contributor|Emacs Contributor]]&lt;br /&gt;
* [[:Category:WikEmacs Contributor|WikEmacs Contributor]]&lt;br /&gt;
* [[:Category:User Role|Other]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- Right hand column --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right; width: 49%;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Help build WikEmacs==&lt;br /&gt;
&lt;br /&gt;
The following are suggestions for articles to write, along with the page of the GNU Emacs manual which documents this feature.  ('''Note:''' it's possible that an article for a given topic exists already under a different name.  In that case, please ensure that the article includes the link to the manual page, and then remove the topic from this list.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Not finished.  I grabbed ideas from large section titles of the manual, but there are many more in the &amp;quot;Detailed Node Listing&amp;quot;, longer version of the table of contents. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Command-line startup options]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Entering-Emacs.html] and [https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Invocation.html])&lt;br /&gt;
* [[Built-in help]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Help.html])&lt;br /&gt;
* [[Registers]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Registers.html])&lt;br /&gt;
* [[:Category:Search|Search for text in a buffer]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Search.html])&lt;br /&gt;
* [[Fixing typos]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Fixit.html])&lt;br /&gt;
* [[Keyboard macros]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Keyboard-Macros.html])&lt;br /&gt;
* [[Windows within a frame]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Windows.html])&lt;br /&gt;
* [[Frames]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Frames.html])&lt;br /&gt;
* [[International character sets]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/International.html])&lt;br /&gt;
* [[Indentation]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Indentation.html])&lt;br /&gt;
* [[Editing source code]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Programs.html])&lt;br /&gt;
* [[Building software]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Building.html])&lt;br /&gt;
* [[Maintaining source code repositories]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Maintaining.html])&lt;br /&gt;
* [[Abbrevs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Abbrevs.html])&lt;br /&gt;
* [[Dired]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html])&lt;br /&gt;
* [[Calendars and diaries]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Calendar_002fDiary.html])&lt;br /&gt;
* [[Sending mail]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Sending-Mail.html])&lt;br /&gt;
* [[Rmail]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Rmail.html])&lt;br /&gt;
* [[Gnus]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Gnus.html])&lt;br /&gt;
* [[Document viewer]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Document-View.html])&lt;br /&gt;
* [[Shell commands withing Emacs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Shell.html])&lt;br /&gt;
* [[Emacs server]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html])&lt;br /&gt;
* [[Printing]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Printing.html])&lt;br /&gt;
* [[Sorting]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Sorting.html])&lt;br /&gt;
* [[Picture mode]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Picture-Mode.html])&lt;br /&gt;
* [[Editing binary files]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Editing-Binary-Files.html])&lt;br /&gt;
* [[Saving Emacs sessions]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html])&lt;br /&gt;
* [[Recursive editing]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Recursive-Edit.html])&lt;br /&gt;
* [[Emulating other text editors]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Emulation.html])&lt;br /&gt;
* [[Hyperlinking within Emacs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Hyperlinking.html])&lt;br /&gt;
* [[Games and fun]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Amusements.html])&lt;br /&gt;
* [[Installing additional packages]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html])&lt;br /&gt;
* [[Customising Emacs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Customization.html])&lt;br /&gt;
** [[Customize]] (simple interface) ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Easy-Customization.html])&lt;br /&gt;
* [[Cancelling commands]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Quitting.html])&lt;br /&gt;
* [[If Emacs is malfunctioning]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Lossage.html])&lt;br /&gt;
* [[Reporting bugs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Bugs.html])&lt;br /&gt;
* [[Contributing to GNU Emacs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html])&lt;br /&gt;
* [[Getting help from others]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Service.html])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:WikEmacs]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Main_Page&amp;diff=5451</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Main_Page&amp;diff=5451"/>
		<updated>2013-10-19T11:07:16Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: /* Help build WikEmacs */ Add link to Search category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:InflatableBalloons.jpg|50px|left]] '''Grand reopening!''' '''WikEmacs''' is now under new management and will remain open indefinitely.  Spread the word!&lt;br /&gt;
&lt;br /&gt;
[[File:Emacs_parts.png|320px|thumb|right|Basic [[Emacs Terminology|terminology]] of typical Emacs GUI Frame]]&lt;br /&gt;
__NOTOC__&lt;br /&gt;
'''First time visitors''' can start [[#Explore WikEmacs|exploring WikEmacs]]. We have added lots of useful pages since the launch of WikEmacs.&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
We need more '''[[:Category:WikEmacs Contributor|WikEmacs Contributor]]s'''.  You can help the following way.&lt;br /&gt;
&lt;br /&gt;
{{Note| First of all, please take a minute to look at the&lt;br /&gt;
[[WikEmacs:Guidelines|WikEmacs Guidelines]] before you start editing.}}&lt;br /&gt;
&lt;br /&gt;
* Priority tasks&lt;br /&gt;
** Migrate content from [http://www.emacswiki.org EmacsWiki]. Please adopt the following approach -''I found this on EmacsWiki which was helpful. But it took me a lot of time to find it. Now that I have found it, I will put it in WikEmacs so that others can benefit from it.''&lt;br /&gt;
* Intermediate tasks&lt;br /&gt;
** Provide tutorials or content for the [[:Category:Popular Package|popular packages]] or [[:Category:Built-in Package|built-in packages]].&lt;br /&gt;
** Add more content to [[Special:ShortPages|short pages]].&lt;br /&gt;
** Document or add more [[:Category:Third Party Package|third party packages]].&lt;br /&gt;
* Other tasks&lt;br /&gt;
** Copy edit [[Special:RecentChanges|recent changes]] or be a moral police.&lt;br /&gt;
** Add more members to various [[Special:Categories|categories]].&lt;br /&gt;
** Categorize one of these pages [[Special:UncategorizedPages|uncategorized pages]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Emacs News'''&lt;br /&gt;
&lt;br /&gt;
The latest stable release of Emacs is [[GNU Emacs 24|Emacs-24.3]].&lt;br /&gt;
&lt;br /&gt;
Emacs is available on all popular [[:Category:Install Or Upgrade| Operating Systems]] including [[Installing Emacs on GNU/Linux | GNU/Linux]], [[Installing Emacs on BSD |BSD]], [[Installing Emacs on OS X | OS X]] and [[Installing Emacs on Windows| Windows]].  It supports a variety of [[:Category:Programming languages|programming languages]].&lt;br /&gt;
&amp;lt;!-- Left hand column --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left; width: 49%;&amp;quot;&amp;gt;&lt;br /&gt;
== Explore WikEmacs ==&lt;br /&gt;
&lt;br /&gt;
To explore WikEmacs proceed as follows:&lt;br /&gt;
* Search for or visit a page of interest&lt;br /&gt;
* At the end of the page, there is a list of categories&lt;br /&gt;
* Click on individual categories and it will give you a list of all pages that will be of interest to you.&lt;br /&gt;
&lt;br /&gt;
===  What is your comfort level with Emacs? ===&lt;br /&gt;
* [[:Category:Beginner|Beginner]]&lt;br /&gt;
* [[:Category:Intermediate|Intermediate]]&lt;br /&gt;
* [[:Category:Expert|Expert]]&lt;br /&gt;
** Are you a maintainer of a [[:Category:Built-in Package|Built-in Package]]? If you don't find information about your package, please add it. No one else is better than you are to write about it.&lt;br /&gt;
** Have you developed any [[:Category:Third Party Package|Third Party Package]]s? Consider writing about what it is and how to use it.&lt;br /&gt;
* [[:Category:Vim User|Vim User]]&lt;br /&gt;
&lt;br /&gt;
=== What do you want to accomplish now? ===&lt;br /&gt;
* [[:Category:Install Or Upgrade|Install Or Upgrade]]&lt;br /&gt;
* [[:Category:Customization|Customize Emacs]]&lt;br /&gt;
* [[Key Bindings|Tweak Key Bindings]]&lt;br /&gt;
* [[:Category:Tutorial|Learn more Emacs (Tutorials)]]&lt;br /&gt;
&lt;br /&gt;
=== What do you use Emacs for? ===&lt;br /&gt;
* [[:Category:Text Editing|Text Editing]]&lt;br /&gt;
* [[:Category:Programming|Programming]]&lt;br /&gt;
* [[:Category:Document authoring|Document authoring]]&lt;br /&gt;
* [[:Category:Organizer|Getting Organized]]&lt;br /&gt;
* [[:Category:Email|Emailing]]&lt;br /&gt;
* [[:Category:Chat|Chatting]]&lt;br /&gt;
* [[:Category:Blogging|Blogging]]&lt;br /&gt;
* [[:Category:Browse|Browsing]] &lt;br /&gt;
* [[:Category:Entertainment|Entertainment]]&lt;br /&gt;
* [[:Category:Workflow|Other]]&lt;br /&gt;
&lt;br /&gt;
=== How do you involve yourself with the community? ===&lt;br /&gt;
* [[:Category:Emacs User|Emacs User]]&lt;br /&gt;
* [[:Category:Emacs Contributor|Emacs Contributor]]&lt;br /&gt;
* [[:Category:WikEmacs Contributor|WikEmacs Contributor]]&lt;br /&gt;
* [[:Category:User Role|Other]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- Right hand column --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right; width: 49%;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Help build WikEmacs==&lt;br /&gt;
&lt;br /&gt;
The following are suggestions for articles to write, along with the page of the GNU Emacs manual which documents this feature.  ('''Note:''' it's possible that an article for a given topic exists already under a different name.  In that case, please ensure that the article includes the link to the manual page, and then remove the topic from this list.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Not finished.  I grabbed ideas from large section titles of the manual, but there are many more in the &amp;quot;Detailed Node Listing&amp;quot;, longer version of the table of contents. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Command-line startup options]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Entering-Emacs.html] and [https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Invocation.html])&lt;br /&gt;
* [[Built-in help]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Help.html])&lt;br /&gt;
* [[Registers]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Registers.html])&lt;br /&gt;
* [[:Category:Search]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Search.html])&lt;br /&gt;
* [[Fixing typos]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Fixit.html])&lt;br /&gt;
* [[Keyboard macros]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Keyboard-Macros.html])&lt;br /&gt;
* [[Windows within a frame]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Windows.html])&lt;br /&gt;
* [[Frames]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Frames.html])&lt;br /&gt;
* [[International character sets]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/International.html])&lt;br /&gt;
* [[Indentation]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Indentation.html])&lt;br /&gt;
* [[Editing source code]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Programs.html])&lt;br /&gt;
* [[Building software]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Building.html])&lt;br /&gt;
* [[Maintaining source code repositories]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Maintaining.html])&lt;br /&gt;
* [[Abbrevs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Abbrevs.html])&lt;br /&gt;
* [[Dired]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html])&lt;br /&gt;
* [[Calendars and diaries]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Calendar_002fDiary.html])&lt;br /&gt;
* [[Sending mail]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Sending-Mail.html])&lt;br /&gt;
* [[Rmail]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Rmail.html])&lt;br /&gt;
* [[Gnus]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Gnus.html])&lt;br /&gt;
* [[Document viewer]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Document-View.html])&lt;br /&gt;
* [[Shell commands withing Emacs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Shell.html])&lt;br /&gt;
* [[Emacs server]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html])&lt;br /&gt;
* [[Printing]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Printing.html])&lt;br /&gt;
* [[Sorting]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Sorting.html])&lt;br /&gt;
* [[Picture mode]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Picture-Mode.html])&lt;br /&gt;
* [[Editing binary files]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Editing-Binary-Files.html])&lt;br /&gt;
* [[Saving Emacs sessions]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html])&lt;br /&gt;
* [[Recursive editing]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Recursive-Edit.html])&lt;br /&gt;
* [[Emulating other text editors]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Emulation.html])&lt;br /&gt;
* [[Hyperlinking within Emacs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Hyperlinking.html])&lt;br /&gt;
* [[Games and fun]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Amusements.html])&lt;br /&gt;
* [[Installing additional packages]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html])&lt;br /&gt;
* [[Customising Emacs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Customization.html])&lt;br /&gt;
** [[Customize]] (simple interface) ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Easy-Customization.html])&lt;br /&gt;
* [[Cancelling commands]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Quitting.html])&lt;br /&gt;
* [[If Emacs is malfunctioning]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Lossage.html])&lt;br /&gt;
* [[Reporting bugs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Bugs.html])&lt;br /&gt;
* [[Contributing to GNU Emacs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html])&lt;br /&gt;
* [[Getting help from others]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Service.html])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:WikEmacs]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Main_Page&amp;diff=5450</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Main_Page&amp;diff=5450"/>
		<updated>2013-10-19T11:06:03Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: /* Help build WikEmacs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:InflatableBalloons.jpg|50px|left]] '''Grand reopening!''' '''WikEmacs''' is now under new management and will remain open indefinitely.  Spread the word!&lt;br /&gt;
&lt;br /&gt;
[[File:Emacs_parts.png|320px|thumb|right|Basic [[Emacs Terminology|terminology]] of typical Emacs GUI Frame]]&lt;br /&gt;
__NOTOC__&lt;br /&gt;
'''First time visitors''' can start [[#Explore WikEmacs|exploring WikEmacs]]. We have added lots of useful pages since the launch of WikEmacs.&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
We need more '''[[:Category:WikEmacs Contributor|WikEmacs Contributor]]s'''.  You can help the following way.&lt;br /&gt;
&lt;br /&gt;
{{Note| First of all, please take a minute to look at the&lt;br /&gt;
[[WikEmacs:Guidelines|WikEmacs Guidelines]] before you start editing.}}&lt;br /&gt;
&lt;br /&gt;
* Priority tasks&lt;br /&gt;
** Migrate content from [http://www.emacswiki.org EmacsWiki]. Please adopt the following approach -''I found this on EmacsWiki which was helpful. But it took me a lot of time to find it. Now that I have found it, I will put it in WikEmacs so that others can benefit from it.''&lt;br /&gt;
* Intermediate tasks&lt;br /&gt;
** Provide tutorials or content for the [[:Category:Popular Package|popular packages]] or [[:Category:Built-in Package|built-in packages]].&lt;br /&gt;
** Add more content to [[Special:ShortPages|short pages]].&lt;br /&gt;
** Document or add more [[:Category:Third Party Package|third party packages]].&lt;br /&gt;
* Other tasks&lt;br /&gt;
** Copy edit [[Special:RecentChanges|recent changes]] or be a moral police.&lt;br /&gt;
** Add more members to various [[Special:Categories|categories]].&lt;br /&gt;
** Categorize one of these pages [[Special:UncategorizedPages|uncategorized pages]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Emacs News'''&lt;br /&gt;
&lt;br /&gt;
The latest stable release of Emacs is [[GNU Emacs 24|Emacs-24.3]].&lt;br /&gt;
&lt;br /&gt;
Emacs is available on all popular [[:Category:Install Or Upgrade| Operating Systems]] including [[Installing Emacs on GNU/Linux | GNU/Linux]], [[Installing Emacs on BSD |BSD]], [[Installing Emacs on OS X | OS X]] and [[Installing Emacs on Windows| Windows]].  It supports a variety of [[:Category:Programming languages|programming languages]].&lt;br /&gt;
&amp;lt;!-- Left hand column --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left; width: 49%;&amp;quot;&amp;gt;&lt;br /&gt;
== Explore WikEmacs ==&lt;br /&gt;
&lt;br /&gt;
To explore WikEmacs proceed as follows:&lt;br /&gt;
* Search for or visit a page of interest&lt;br /&gt;
* At the end of the page, there is a list of categories&lt;br /&gt;
* Click on individual categories and it will give you a list of all pages that will be of interest to you.&lt;br /&gt;
&lt;br /&gt;
===  What is your comfort level with Emacs? ===&lt;br /&gt;
* [[:Category:Beginner|Beginner]]&lt;br /&gt;
* [[:Category:Intermediate|Intermediate]]&lt;br /&gt;
* [[:Category:Expert|Expert]]&lt;br /&gt;
** Are you a maintainer of a [[:Category:Built-in Package|Built-in Package]]? If you don't find information about your package, please add it. No one else is better than you are to write about it.&lt;br /&gt;
** Have you developed any [[:Category:Third Party Package|Third Party Package]]s? Consider writing about what it is and how to use it.&lt;br /&gt;
* [[:Category:Vim User|Vim User]]&lt;br /&gt;
&lt;br /&gt;
=== What do you want to accomplish now? ===&lt;br /&gt;
* [[:Category:Install Or Upgrade|Install Or Upgrade]]&lt;br /&gt;
* [[:Category:Customization|Customize Emacs]]&lt;br /&gt;
* [[Key Bindings|Tweak Key Bindings]]&lt;br /&gt;
* [[:Category:Tutorial|Learn more Emacs (Tutorials)]]&lt;br /&gt;
&lt;br /&gt;
=== What do you use Emacs for? ===&lt;br /&gt;
* [[:Category:Text Editing|Text Editing]]&lt;br /&gt;
* [[:Category:Programming|Programming]]&lt;br /&gt;
* [[:Category:Document authoring|Document authoring]]&lt;br /&gt;
* [[:Category:Organizer|Getting Organized]]&lt;br /&gt;
* [[:Category:Email|Emailing]]&lt;br /&gt;
* [[:Category:Chat|Chatting]]&lt;br /&gt;
* [[:Category:Blogging|Blogging]]&lt;br /&gt;
* [[:Category:Browse|Browsing]] &lt;br /&gt;
* [[:Category:Entertainment|Entertainment]]&lt;br /&gt;
* [[:Category:Workflow|Other]]&lt;br /&gt;
&lt;br /&gt;
=== How do you involve yourself with the community? ===&lt;br /&gt;
* [[:Category:Emacs User|Emacs User]]&lt;br /&gt;
* [[:Category:Emacs Contributor|Emacs Contributor]]&lt;br /&gt;
* [[:Category:WikEmacs Contributor|WikEmacs Contributor]]&lt;br /&gt;
* [[:Category:User Role|Other]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- Right hand column --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right; width: 49%;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Help build WikEmacs==&lt;br /&gt;
&lt;br /&gt;
The following are suggestions for articles to write, along with the page of the GNU Emacs manual which documents this feature.  ('''Note:''' it's possible that an article for a given topic exists already under a different name.  In that case, please ensure that the article includes the link to the manual page, and then remove the topic from this list.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Not finished.  I grabbed ideas from large section titles of the manual, but there are many more in the &amp;quot;Detailed Node Listing&amp;quot;, longer version of the table of contents. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Command-line startup options]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Entering-Emacs.html] and [https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Invocation.html])&lt;br /&gt;
* [[Built-in help]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Help.html])&lt;br /&gt;
* [[Registers]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Registers.html])&lt;br /&gt;
* [[Category:Search]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Search.html])&lt;br /&gt;
* [[Fixing typos]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Fixit.html])&lt;br /&gt;
* [[Keyboard macros]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Keyboard-Macros.html])&lt;br /&gt;
* [[Windows within a frame]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Windows.html])&lt;br /&gt;
* [[Frames]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Frames.html])&lt;br /&gt;
* [[International character sets]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/International.html])&lt;br /&gt;
* [[Indentation]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Indentation.html])&lt;br /&gt;
* [[Editing source code]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Programs.html])&lt;br /&gt;
* [[Building software]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Building.html])&lt;br /&gt;
* [[Maintaining source code repositories]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Maintaining.html])&lt;br /&gt;
* [[Abbrevs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Abbrevs.html])&lt;br /&gt;
* [[Dired]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html])&lt;br /&gt;
* [[Calendars and diaries]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Calendar_002fDiary.html])&lt;br /&gt;
* [[Sending mail]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Sending-Mail.html])&lt;br /&gt;
* [[Rmail]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Rmail.html])&lt;br /&gt;
* [[Gnus]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Gnus.html])&lt;br /&gt;
* [[Document viewer]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Document-View.html])&lt;br /&gt;
* [[Shell commands withing Emacs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Shell.html])&lt;br /&gt;
* [[Emacs server]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html])&lt;br /&gt;
* [[Printing]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Printing.html])&lt;br /&gt;
* [[Sorting]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Sorting.html])&lt;br /&gt;
* [[Picture mode]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Picture-Mode.html])&lt;br /&gt;
* [[Editing binary files]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Editing-Binary-Files.html])&lt;br /&gt;
* [[Saving Emacs sessions]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html])&lt;br /&gt;
* [[Recursive editing]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Recursive-Edit.html])&lt;br /&gt;
* [[Emulating other text editors]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Emulation.html])&lt;br /&gt;
* [[Hyperlinking within Emacs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Hyperlinking.html])&lt;br /&gt;
* [[Games and fun]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Amusements.html])&lt;br /&gt;
* [[Installing additional packages]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html])&lt;br /&gt;
* [[Customising Emacs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Customization.html])&lt;br /&gt;
** [[Customize]] (simple interface) ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Easy-Customization.html])&lt;br /&gt;
* [[Cancelling commands]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Quitting.html])&lt;br /&gt;
* [[If Emacs is malfunctioning]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Lossage.html])&lt;br /&gt;
* [[Reporting bugs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Bugs.html])&lt;br /&gt;
* [[Contributing to GNU Emacs]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html])&lt;br /&gt;
* [[Getting help from others]] ([https://www.gnu.org/software/emacs/manual/html_node/emacs/Service.html])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:WikEmacs]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Category:Search&amp;diff=5449</id>
		<title>Category:Search</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Category:Search&amp;diff=5449"/>
		<updated>2013-10-19T11:05:20Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Add link to manual&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Search|Search}}&lt;br /&gt;
&lt;br /&gt;
Searching with Emacs&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5448</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5448"/>
		<updated>2013-10-19T10:40:27Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Revert vandalism&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5442</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5442"/>
		<updated>2013-10-19T10:17:59Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: /* Basic Use */ Consistency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
: Execute a macro multiple times, using [[prefix argument]]&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
: Execute a macro until the end of the buffer&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5441</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5441"/>
		<updated>2013-10-19T10:17:06Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: /* Basic Use */ Add execution until the end of file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
&lt;br /&gt;
To execute a macro multiple times, use [[prefix argument]]:&lt;br /&gt;
&lt;br /&gt;
; {{Keys|C-u 37 C-x e}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
&lt;br /&gt;
To execute a macro until the end of the buffer:&lt;br /&gt;
&lt;br /&gt;
; {{Keys|C-u 0 C-x e}}&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5440</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5440"/>
		<updated>2013-10-19T10:15:40Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: /* Basic Use */ Angled brackets break html&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|F3}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|F4}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
&lt;br /&gt;
To execute a macro multiple times, use [[prefix argument]]:&lt;br /&gt;
&lt;br /&gt;
; {{Keys|C-u 37 C-x}} or {{Keys|C-u 37 F4}}&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5439</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5439"/>
		<updated>2013-10-19T10:14:09Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5438 by 198.27.74.193 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Use==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|&amp;lt;F3&amp;gt;}}, or {{Keys|C-x (}}&lt;br /&gt;
: Start defining a macro.&lt;br /&gt;
; {{Keys|&amp;lt;F4&amp;gt;}}, or {{Keys|C-x )}}&lt;br /&gt;
: Stop defining a macro.&lt;br /&gt;
; {{Keys|&amp;lt;F4&amp;gt;}}, or {{Keys|C-x e}}&lt;br /&gt;
: Execute a macro&lt;br /&gt;
&lt;br /&gt;
To execute a macro multiple times, use [[prefix argument]]:&lt;br /&gt;
&lt;br /&gt;
; {{Keys|C-u 37 C-x}} or {{Keys|C-u 37 &amp;lt;F4&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5436</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5436"/>
		<updated>2013-10-19T10:05:56Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5435 by 198.27.74.193 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Troubleshooting&amp;diff=5434</id>
		<title>Troubleshooting</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Troubleshooting&amp;diff=5434"/>
		<updated>2013-10-19T09:44:45Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Add find-function entry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Troubleshooting''' tips from long time Emacs users.&lt;br /&gt;
&lt;br /&gt;
= Find where a function is defined =&lt;br /&gt;
&lt;br /&gt;
; {{Command|find-function}}&lt;br /&gt;
: This command finds the source file containing the definition of the function near point.&lt;br /&gt;
&lt;br /&gt;
; {{Command|find-function-on-key}}&lt;br /&gt;
: This finds the source file containing the definition of the function bound to that key.&lt;br /&gt;
&lt;br /&gt;
However, some functions are implemented in C rather than Lisp.  To find these functions, download the C source files and add the following to your init file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
(setq find-function-C-source-directory &amp;quot;/path/to/C-source-directory&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Locate library file =&lt;br /&gt;
&lt;br /&gt;
; {{Command|locate-library}}&lt;br /&gt;
: Use this to debug [[load-path]] issues. Try {{Command|locate-library RET org RET}} now.&lt;br /&gt;
&lt;br /&gt;
I just got this issue but only on ESXi cluster. I changed the das.failuredetectiontime value on 4 cluster (1 full ESXi's and 3 full ESX's) and only the ESXi cluster didn't update the value.&lt;br /&gt;
&lt;br /&gt;
= Looking at Emacs Lisp files =&lt;br /&gt;
&lt;br /&gt;
When installing new packages, you would want to hear some words of wisdom from the author of the library file. &lt;br /&gt;
&lt;br /&gt;
; {{Command|find-library}}&lt;br /&gt;
: Try {{Command|find-library RET mediawiki RET}} to see whether you have installed [[Mediawiki.el]]. If it works, look at the ''Commentary'' section to see the author's notes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Beginner]][[Category:Intermediate]][[Category:Troubleshoot]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Category:WikEmacs_Contributor&amp;diff=5433</id>
		<title>Category:WikEmacs Contributor</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Category:WikEmacs_Contributor&amp;diff=5433"/>
		<updated>2013-10-19T09:34:37Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5193 by 192.187.117.116 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Install [[Mediawiki.el]]. This way you can make submissions to this Wiki using Emacs.&lt;br /&gt;
* Read [[WikEmacs:Guidelines]] for the conventions used in this Wiki.&lt;br /&gt;
&lt;br /&gt;
[[Category:WikEmacs]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5426</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5426"/>
		<updated>2013-10-19T08:53:27Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5424 by 37.187.77.184 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Regexp_Search&amp;diff=5425</id>
		<title>Regexp Search</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Regexp_Search&amp;diff=5425"/>
		<updated>2013-10-19T08:50:07Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Formatting, and added category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;# {{CommandKeys|C-M-s|isearch-forward-regexp}} : incremental forward search matching regexp&lt;br /&gt;
# {{CommandKeys|C-M-r|isearch-backward-regexp}} :   incremental backward search matching regexp&lt;br /&gt;
&lt;br /&gt;
[[Category:Searching]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Bookmarks&amp;diff=5423</id>
		<title>Bookmarks</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Bookmarks&amp;diff=5423"/>
		<updated>2013-10-19T08:45:10Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Revert to last good version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Package&lt;br /&gt;
|name=recentf&lt;br /&gt;
|description=helps opening a file that is recently visited &lt;br /&gt;
|source=http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/bookmark.el&lt;br /&gt;
|maintainer=[[Karl Fogel]] &amp;amp; [[FSF]]&lt;br /&gt;
|in_emacs=yes&lt;br /&gt;
|Development status=active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Bookmarks are somewhat like registers in that they record positions you can jump to. Unlike registers, they have long names, and they persist automatically from one Emacs session to the next. The prototypical use of bookmarks is to record “where you were reading” in various files.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
*C-x r m &amp;lt;RET&amp;gt; Set the bookmark for the visited file, at point. &lt;br /&gt;
*C-x r m bookmark &amp;lt;RET&amp;gt; Set the bookmark named bookmark at point (bookmark-set). &lt;br /&gt;
*C-x r b bookmark &amp;lt;RET&amp;gt; Jump to the bookmark named bookmark (bookmark-jump). &lt;br /&gt;
*C-x r l List all bookmarks (list-bookmarks). &lt;br /&gt;
*M-x bookmark-save Save all the current bookmark values in the default bookmark file.&lt;br /&gt;
&lt;br /&gt;
== Customizations ==&lt;br /&gt;
=== Changing the default bookmarks-file ===&lt;br /&gt;
By default, bookmarks are saved to the file {{Filename|.emacs.bmk}}, outside of your {{Dirname|~/.emacs.d}} directory. To change this to another file, set the variable {{Variable|bookmark-default-file}} to what you like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
(setq bookmark-default-file &amp;quot;~/.emacs.d/bookmarks&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Utilities]]&lt;br /&gt;
[[Category:Bookmarks]]&lt;br /&gt;
[[Category:Built-in Package]]&lt;br /&gt;
[[ Category:File Navigation]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Emacs_Code_Browser&amp;diff=5420</id>
		<title>Emacs Code Browser</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Emacs_Code_Browser&amp;diff=5420"/>
		<updated>2013-10-19T08:13:13Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: /* Basic setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Package&lt;br /&gt;
|name=Emacs Code Browser&lt;br /&gt;
|description=code navigation tool&lt;br /&gt;
|maintainer=Klaus Berndl&lt;br /&gt;
|source=http://ecb.sourceforge.net/&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
While Emacs already has good&lt;br /&gt;
editing support for many modes, its browsing support is somewhat&lt;br /&gt;
lacking. That's where the Emacs Code Browser (ECB) comes in: it displays a number of informational&lt;br /&gt;
windows that allow for easy source code navigation and overview.&lt;br /&gt;
&lt;br /&gt;
The informational windows can contain:&lt;br /&gt;
&lt;br /&gt;
* A directory tree,&lt;br /&gt;
* a list of source files in the current directory,&lt;br /&gt;
* a list of functions/classes/methods/... in the current file, (ECB uses the Semantic Bovinator, or Imenu, or etags, for getting this list so all languages supported by any of these tools are automatically supported by ECB too)&lt;br /&gt;
* a history of recently visited files, &lt;br /&gt;
* the Speedbar and&lt;br /&gt;
* output from compilation (the &amp;quot;compilation&amp;quot; window) and other modes like help, grep etc. or whatever a user defines to be displayed in this window.&lt;br /&gt;
&lt;br /&gt;
As an added bonus, ECB makes sure to keep these informational windows visible, even when you use C-x 1 and similar commands.&lt;br /&gt;
&lt;br /&gt;
It goes without saying that you can configure the layout, ie which informational windows should be displayed where. ECB comes with a number of ready-made window layouts to choose from.&lt;br /&gt;
&lt;br /&gt;
= Basic setup =&lt;br /&gt;
&lt;br /&gt;
The easiest way to install ECB is using [[Elpa]].&lt;br /&gt;
&lt;br /&gt;
To start ECB: {{Command|ecb-activate}}&lt;br /&gt;
&lt;br /&gt;
= Helpful keybindings =&lt;br /&gt;
&lt;br /&gt;
== Navigating ==&lt;br /&gt;
&lt;br /&gt;
* {{Keys|C-c . g h}} : Go to history&lt;br /&gt;
* {{Keys|C-c . g m}} : Go to methods&lt;br /&gt;
* {{Keys|C-c . g s}} : Go to sources:&lt;br /&gt;
* {{Keys|C-c . g d}} : Go to directories&lt;br /&gt;
* {{Keys|C-c . g 1}} : Main buffer&lt;br /&gt;
&lt;br /&gt;
= Common Customization =&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
= Project Pages =&lt;br /&gt;
* [http://ecb.sourceforge.net/ Homepage]&lt;br /&gt;
&lt;br /&gt;
= Tutorial Pages =&lt;br /&gt;
&lt;br /&gt;
[[Category:Project Management]][[Category:Convenience]][[Category:Third Party Package]]&lt;br /&gt;
[[Category:Programming]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Emacs_Code_Browser&amp;diff=5419</id>
		<title>Emacs Code Browser</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Emacs_Code_Browser&amp;diff=5419"/>
		<updated>2013-10-19T08:09:53Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: /* Helpful keybindings */ Add some key bindings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Package&lt;br /&gt;
|name=Emacs Code Browser&lt;br /&gt;
|description=code navigation tool&lt;br /&gt;
|maintainer=Klaus Berndl&lt;br /&gt;
|source=http://ecb.sourceforge.net/&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
While Emacs already has good&lt;br /&gt;
editing support for many modes, its browsing support is somewhat&lt;br /&gt;
lacking. That's where the Emacs Code Browser (ECB) comes in: it displays a number of informational&lt;br /&gt;
windows that allow for easy source code navigation and overview.&lt;br /&gt;
&lt;br /&gt;
The informational windows can contain:&lt;br /&gt;
&lt;br /&gt;
* A directory tree,&lt;br /&gt;
* a list of source files in the current directory,&lt;br /&gt;
* a list of functions/classes/methods/... in the current file, (ECB uses the Semantic Bovinator, or Imenu, or etags, for getting this list so all languages supported by any of these tools are automatically supported by ECB too)&lt;br /&gt;
* a history of recently visited files, &lt;br /&gt;
* the Speedbar and&lt;br /&gt;
* output from compilation (the &amp;quot;compilation&amp;quot; window) and other modes like help, grep etc. or whatever a user defines to be displayed in this window.&lt;br /&gt;
&lt;br /&gt;
As an added bonus, ECB makes sure to keep these informational windows visible, even when you use C-x 1 and similar commands.&lt;br /&gt;
&lt;br /&gt;
It goes without saying that you can configure the layout, ie which informational windows should be displayed where. ECB comes with a number of ready-made window layouts to choose from.&lt;br /&gt;
&lt;br /&gt;
= Basic setup =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Helpful keybindings =&lt;br /&gt;
&lt;br /&gt;
== Navigating ==&lt;br /&gt;
&lt;br /&gt;
* {{Keys|C-c . g h}} : Go to history&lt;br /&gt;
* {{Keys|C-c . g m}} : Go to methods&lt;br /&gt;
* {{Keys|C-c . g s}} : Go to sources:&lt;br /&gt;
* {{Keys|C-c . g d}} : Go to directories&lt;br /&gt;
* {{Keys|C-c . g 1}} : Main buffer&lt;br /&gt;
&lt;br /&gt;
= Common Customization =&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
= Project Pages =&lt;br /&gt;
* [http://ecb.sourceforge.net/ Homepage]&lt;br /&gt;
&lt;br /&gt;
= Tutorial Pages =&lt;br /&gt;
&lt;br /&gt;
[[Category:Project Management]][[Category:Convenience]][[Category:Third Party Package]]&lt;br /&gt;
[[Category:Programming]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Emacs_Code_Browser&amp;diff=5418</id>
		<title>Emacs Code Browser</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Emacs_Code_Browser&amp;diff=5418"/>
		<updated>2013-10-19T08:06:10Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Add Programming category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Package&lt;br /&gt;
|name=Emacs Code Browser&lt;br /&gt;
|description=code navigation tool&lt;br /&gt;
|maintainer=Klaus Berndl&lt;br /&gt;
|source=http://ecb.sourceforge.net/&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
While Emacs already has good&lt;br /&gt;
editing support for many modes, its browsing support is somewhat&lt;br /&gt;
lacking. That's where the Emacs Code Browser (ECB) comes in: it displays a number of informational&lt;br /&gt;
windows that allow for easy source code navigation and overview.&lt;br /&gt;
&lt;br /&gt;
The informational windows can contain:&lt;br /&gt;
&lt;br /&gt;
* A directory tree,&lt;br /&gt;
* a list of source files in the current directory,&lt;br /&gt;
* a list of functions/classes/methods/... in the current file, (ECB uses the Semantic Bovinator, or Imenu, or etags, for getting this list so all languages supported by any of these tools are automatically supported by ECB too)&lt;br /&gt;
* a history of recently visited files, &lt;br /&gt;
* the Speedbar and&lt;br /&gt;
* output from compilation (the &amp;quot;compilation&amp;quot; window) and other modes like help, grep etc. or whatever a user defines to be displayed in this window.&lt;br /&gt;
&lt;br /&gt;
As an added bonus, ECB makes sure to keep these informational windows visible, even when you use C-x 1 and similar commands.&lt;br /&gt;
&lt;br /&gt;
It goes without saying that you can configure the layout, ie which informational windows should be displayed where. ECB comes with a number of ready-made window layouts to choose from.&lt;br /&gt;
&lt;br /&gt;
= Basic setup =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Helpful keybindings =&lt;br /&gt;
&lt;br /&gt;
= Common Customization =&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
= Project Pages =&lt;br /&gt;
* [http://ecb.sourceforge.net/ Homepage]&lt;br /&gt;
&lt;br /&gt;
= Tutorial Pages =&lt;br /&gt;
&lt;br /&gt;
[[Category:Project Management]][[Category:Convenience]][[Category:Third Party Package]]&lt;br /&gt;
[[Category:Programming]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5417</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5417"/>
		<updated>2013-10-19T08:03:55Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Revert vandalism&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5411</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5411"/>
		<updated>2013-10-18T20:14:34Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Undo revision 5410 by 37.187.77.184 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Yasnippet&amp;diff=5409</id>
		<title>Yasnippet</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Yasnippet&amp;diff=5409"/>
		<updated>2013-10-18T20:03:03Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Package&lt;br /&gt;
|name=yasnippet&lt;br /&gt;
|description=template system for Emacs&lt;br /&gt;
|author=João Távora&lt;br /&gt;
|maintainer=João Távora&lt;br /&gt;
|source=https://github.com/capitaomorte/yasnippet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''YASnippet''' (Yet Another Snippet) is a template system for Emacs. It allows you to type an abbreviation and automatically expand it into function templates. Bundled language templates includes: C, C++, C#, Perl, Python, Ruby, SQL, LaTeX, HTML, CSS and more.&lt;br /&gt;
&lt;br /&gt;
== Basic setup ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
(add-to-list 'load-path &amp;quot;~/.emacs.d/plugins/yasnippet&amp;quot;)&lt;br /&gt;
(require 'yasnippet)&lt;br /&gt;
(yas/global-mode 1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Helpful keybindings ==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|Tab}}&lt;br /&gt;
: Expand snippet.&lt;br /&gt;
&lt;br /&gt;
== Embedded Lisp ==&lt;br /&gt;
It is possible to embed lisp code directly in to snippet files by surrounding the&lt;br /&gt;
s-expression with backticks ('''`'''). For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
#name : document string&lt;br /&gt;
# --&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- `(car (last (split-string (buffer-file-name) &amp;quot;/&amp;quot;))) ; finds last entry&lt;br /&gt;
   ; (filename) in the full path of the file`&lt;br /&gt;
-- Author: Author&lt;br /&gt;
-- Description: $1&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This snippet will extract the name of the buffer (which is presumably the file&lt;br /&gt;
name) and add it to the second line of the expansion. Yasnippet is smart enough&lt;br /&gt;
to ignore the comment at the end of the line as well.&lt;br /&gt;
&lt;br /&gt;
== Common Customization ==&lt;br /&gt;
&lt;br /&gt;
=== Use Yasnippet with Hippie Expand ===&lt;br /&gt;
&lt;br /&gt;
If you use [[Hippie Expand]], you can add [[Yasnippet]] to the list of expansion functions. For example if you want to try expanding snippets first:&lt;br /&gt;
{{Snippet|(setq hippie-expand-try-functions-list (cons 'yas/hippie-try-expand hippie-expand-try-functions-list))}}&lt;br /&gt;
&lt;br /&gt;
You could do this globally, or for a specific mode using a [[mode hook]]. &lt;br /&gt;
&lt;br /&gt;
{{Note|If you use {{Keys|Tab}} for [[Hippie Expand]], consider using a prefix for your snippets. Otherwise you may be trying to tab between possible expansions and find yourself tabbing through fields in an expanded snippet instead.}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
== Project Pages ==&lt;br /&gt;
* [https://github.com/capitaomorte/yasnippet GitHub Repo]&lt;br /&gt;
&lt;br /&gt;
== Tutorial Pages ==&lt;br /&gt;
* [http://yasnippet.googlecode.com/files/yas_demo.avi Screencast]&lt;br /&gt;
&lt;br /&gt;
[[Category:Intermediate]]&lt;br /&gt;
[[Category:Convenience]]&lt;br /&gt;
[[Category:Third Party Package]]&lt;br /&gt;
[[Category:Template System]]&lt;br /&gt;
[[Category:Editing]]&lt;br /&gt;
[[Category:Popular Package]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Learning_Resources&amp;diff=5408</id>
		<title>Learning Resources</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Learning_Resources&amp;diff=5408"/>
		<updated>2013-10-18T20:00:21Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: /* Configuring Emacs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Books ==&lt;br /&gt;
&lt;br /&gt;
* '''Learning GNU Emacs, 2nd Edition''' by Debra Cameron, Bill Rosenblatt, Eric S. Raymond&lt;br /&gt;
&lt;br /&gt;
Much better than the current, 3rd edition. The first half of the book walks you through the fundamental steps, as a tutorial.&lt;br /&gt;
&lt;br /&gt;
Can be obtained from O'Reilly http://shop.oreilly.com/product/9781565921528.do&lt;br /&gt;
&lt;br /&gt;
* '''Casting Spells in Lisp (Emacs Lisp version)''' by Conrad Barski M.D. &lt;br /&gt;
&lt;br /&gt;
Written originally to teach some other flavor of Lisp, the book has been modified for [http://www.gnu.org/software/emacs/emacs-lisp-intro/ Emacs Lisp]. The presentation is in a form between a comic book and a manual that educates while you have fun. The best of both worlds.&lt;br /&gt;
&lt;br /&gt;
It can be read online [http://www.lisperati.com/casting-spels-emacs/html/casting-spels-emacs-1.html here].&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.rothlis.net/emacs/howtolearn.html How to Learn Emacs] &lt;br /&gt;
&lt;br /&gt;
* [http://xahlee.org/emacs/elisp.html Xah Emacs Lisp Tutorial] - This concise and concrete tutorial focus on practical needs with examples.&lt;br /&gt;
&lt;br /&gt;
* [http://xahlee.org/emacs/emacs.html  Xah Emacs Tutorial]&lt;br /&gt;
&lt;br /&gt;
== Screencasts ==&lt;br /&gt;
&lt;br /&gt;
* [http://emacsmovies.org/ Emacs Movies] new screencast, promises to come out with a book also&lt;br /&gt;
* [http://www.youtube.com/user/rpdillon?feature=watch Hacks Emacs](YouTube Channel) &lt;br /&gt;
* [http://emacsrocks.com/ Emacs Rocks!]&lt;br /&gt;
* [https://peepcode.com/products/meet-emacs Peepcode's Meet Emacs](commercial)&lt;br /&gt;
&lt;br /&gt;
== Blogs ==&lt;br /&gt;
&lt;br /&gt;
* [http://emacs-fu.blogspot.de/ Emacs Fu] - Useful Tricks for Emacs&lt;br /&gt;
* [http://www.masteringemacs.org/ Mastering Emacs]&lt;br /&gt;
* [http://emacsworld.blogspot.com/ Got Emacs?]&lt;br /&gt;
* [http://xahlee.org/emacs/blog.html Xah Emacs Blog] - Tips and tricks for Emacs and Emacs Lisp&lt;br /&gt;
* [http://planet.emacsen.org/ Planet Emacsen] - blogroll, includes probably all above&lt;br /&gt;
&lt;br /&gt;
== Articles ==&lt;br /&gt;
&lt;br /&gt;
* [http://batsov.com/articles/2011/11/30/the-ultimate-collection-of-emacs-resources/ The Ultimate Collection of Emacs Resources]&lt;br /&gt;
&lt;br /&gt;
== Twitter ==&lt;br /&gt;
&lt;br /&gt;
There are many Twitter accounts dedicated to sharing news and tips about Emacs. One can benefit a lot by following them:&lt;br /&gt;
&lt;br /&gt;
* [http://twitter.com/#!/emacs_knight @emacs_knight]&lt;br /&gt;
* [http://twitter.com/#!/learnemacs @learnemacs]&lt;br /&gt;
* [http://twitter.com/#!/dotemacs @dotemacs]&lt;br /&gt;
* [http://twitter.com/#!/dotemax @dotemax]&lt;br /&gt;
&lt;br /&gt;
== Useful Extensions ==&lt;br /&gt;
&lt;br /&gt;
Before you install a lot of extensions, explore your Emacs distribution! Try {{Keys|C-h p}} ({{Command|find-emacs-packages}}) to browse the available packages by category.&lt;br /&gt;
&lt;br /&gt;
== Configuring Emacs ==&lt;br /&gt;
* [https://sites.google.com/site/steveyegge2/my-dot-emacs-file This] blog post is a great introduction to setting up your init.el (formerly .emacs) and your emacs directory the &amp;quot;professional way&amp;quot;!&lt;br /&gt;
* [http://devblog.avdi.org/category/emacs-reboot/ Avdi Grimm]'s series of blog posts on how to organise Emacs configuration files.&lt;br /&gt;
&lt;br /&gt;
[[Category:Beginner]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Learning_Resources&amp;diff=5407</id>
		<title>Learning Resources</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Learning_Resources&amp;diff=5407"/>
		<updated>2013-10-18T20:00:07Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: /* Configuring Emacs */ Adding Avdi's blog&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Books ==&lt;br /&gt;
&lt;br /&gt;
* '''Learning GNU Emacs, 2nd Edition''' by Debra Cameron, Bill Rosenblatt, Eric S. Raymond&lt;br /&gt;
&lt;br /&gt;
Much better than the current, 3rd edition. The first half of the book walks you through the fundamental steps, as a tutorial.&lt;br /&gt;
&lt;br /&gt;
Can be obtained from O'Reilly http://shop.oreilly.com/product/9781565921528.do&lt;br /&gt;
&lt;br /&gt;
* '''Casting Spells in Lisp (Emacs Lisp version)''' by Conrad Barski M.D. &lt;br /&gt;
&lt;br /&gt;
Written originally to teach some other flavor of Lisp, the book has been modified for [http://www.gnu.org/software/emacs/emacs-lisp-intro/ Emacs Lisp]. The presentation is in a form between a comic book and a manual that educates while you have fun. The best of both worlds.&lt;br /&gt;
&lt;br /&gt;
It can be read online [http://www.lisperati.com/casting-spels-emacs/html/casting-spels-emacs-1.html here].&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.rothlis.net/emacs/howtolearn.html How to Learn Emacs] &lt;br /&gt;
&lt;br /&gt;
* [http://xahlee.org/emacs/elisp.html Xah Emacs Lisp Tutorial] - This concise and concrete tutorial focus on practical needs with examples.&lt;br /&gt;
&lt;br /&gt;
* [http://xahlee.org/emacs/emacs.html  Xah Emacs Tutorial]&lt;br /&gt;
&lt;br /&gt;
== Screencasts ==&lt;br /&gt;
&lt;br /&gt;
* [http://emacsmovies.org/ Emacs Movies] new screencast, promises to come out with a book also&lt;br /&gt;
* [http://www.youtube.com/user/rpdillon?feature=watch Hacks Emacs](YouTube Channel) &lt;br /&gt;
* [http://emacsrocks.com/ Emacs Rocks!]&lt;br /&gt;
* [https://peepcode.com/products/meet-emacs Peepcode's Meet Emacs](commercial)&lt;br /&gt;
&lt;br /&gt;
== Blogs ==&lt;br /&gt;
&lt;br /&gt;
* [http://emacs-fu.blogspot.de/ Emacs Fu] - Useful Tricks for Emacs&lt;br /&gt;
* [http://www.masteringemacs.org/ Mastering Emacs]&lt;br /&gt;
* [http://emacsworld.blogspot.com/ Got Emacs?]&lt;br /&gt;
* [http://xahlee.org/emacs/blog.html Xah Emacs Blog] - Tips and tricks for Emacs and Emacs Lisp&lt;br /&gt;
* [http://planet.emacsen.org/ Planet Emacsen] - blogroll, includes probably all above&lt;br /&gt;
&lt;br /&gt;
== Articles ==&lt;br /&gt;
&lt;br /&gt;
* [http://batsov.com/articles/2011/11/30/the-ultimate-collection-of-emacs-resources/ The Ultimate Collection of Emacs Resources]&lt;br /&gt;
&lt;br /&gt;
== Twitter ==&lt;br /&gt;
&lt;br /&gt;
There are many Twitter accounts dedicated to sharing news and tips about Emacs. One can benefit a lot by following them:&lt;br /&gt;
&lt;br /&gt;
* [http://twitter.com/#!/emacs_knight @emacs_knight]&lt;br /&gt;
* [http://twitter.com/#!/learnemacs @learnemacs]&lt;br /&gt;
* [http://twitter.com/#!/dotemacs @dotemacs]&lt;br /&gt;
* [http://twitter.com/#!/dotemax @dotemax]&lt;br /&gt;
&lt;br /&gt;
== Useful Extensions ==&lt;br /&gt;
&lt;br /&gt;
Before you install a lot of extensions, explore your Emacs distribution! Try {{Keys|C-h p}} ({{Command|find-emacs-packages}}) to browse the available packages by category.&lt;br /&gt;
&lt;br /&gt;
== Configuring Emacs ==&lt;br /&gt;
* [https://sites.google.com/site/steveyegge2/my-dot-emacs-file This] blog post is a great introduction to setting up your init.el (formerly .emacs) and your emacs directory the &amp;quot;professional way&amp;quot;!&lt;br /&gt;
* [[http://devblog.avdi.org/category/emacs-reboot/ Avdi Grimm]]'s series of blog posts on how to organise Emacs configuration files.&lt;br /&gt;
&lt;br /&gt;
[[Category:Beginner]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Tutorial&amp;diff=5404</id>
		<title>Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Tutorial&amp;diff=5404"/>
		<updated>2013-10-18T19:50:21Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Tutorial for using Emacs ==&lt;br /&gt;
&lt;br /&gt;
The absolute mandatory way to begin learning Emacs to is to use the built-in tutorial.&lt;br /&gt;
&lt;br /&gt;
* You can {{Keys|C-h t}}, meaning hold the Control key and press 'h' at same time, then release them and press 't', which will launch the tutorial.&lt;br /&gt;
&lt;br /&gt;
[http://david.rothlis.net/emacs/howtolearn.html How to learn Emacs] is a guide that teaches Emacs using the built-in help and the elisp source code.&lt;br /&gt;
&lt;br /&gt;
== Tutorial for Emacs Lisp ==&lt;br /&gt;
&lt;br /&gt;
Emacs as [[lisp]] machine, most of its function is implement by [[Emacs lisp]], and you customize Emacs with [[elisp]]. Learning elisp, at least understand its syntax, can be very useful. there is a official tutorial for elisp.&lt;br /&gt;
&lt;br /&gt;
* you can (C-h i m Emacs Lisp Intro &amp;lt;enter&amp;gt;) to begin the tutorial.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=User_talk:Holocronweaver&amp;diff=5403</id>
		<title>User talk:Holocronweaver</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=User_talk:Holocronweaver&amp;diff=5403"/>
		<updated>2013-10-18T16:34:28Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Created page with &amp;quot;Hello, Holocronweaver, I am new to WikEmacs.  Any chance we could get http://wikemacs.org/index.php/Keyboard_macros protected?&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello, Holocronweaver, I am new to WikEmacs.  Any chance we could get http://wikemacs.org/index.php/Keyboard_macros protected?&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5402</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5402"/>
		<updated>2013-10-18T16:19:59Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Revert vandalism&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Elscreen&amp;diff=5399</id>
		<title>Elscreen</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Elscreen&amp;diff=5399"/>
		<updated>2013-10-18T15:54:38Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Fix typo in package name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{Package&lt;br /&gt;
|name=elscreen.el&lt;br /&gt;
|description=Emacs window session manager&lt;br /&gt;
|author=&lt;br /&gt;
|maintainer=NaotoMorishima&lt;br /&gt;
|source=http://www.morishima.net/~naoto/elscreen-en/?lang=en&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''Emacs Lisp screen''' is a tabbed window session manager modeled after [http://www.gnu.org/software/screen/ GNU screen]. &lt;br /&gt;
&lt;br /&gt;
GNU Emacs is more of an “environment” than just an editor, since it has the strong configuration language, emacs-lisp. There are a lot of applications written in emacs-lisp, and you may run many applications on your Emacs at the same time, i.e. e-mail reader, news reader, IRC client, a kind of IDE, etc. These applications likely consist of two or more windows, so when you switch among applications, you may want to save or restore how windows are located (this is called as “window-configuration”). &lt;br /&gt;
Note that for managing multiple buffers, you may want to use something else, like [[ido]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
== With el-get ==&lt;br /&gt;
&lt;br /&gt;
With [[el-get]] : {{Command|el-get-install RET elscreen}}, and done.&lt;br /&gt;
&lt;br /&gt;
== From sources ==&lt;br /&gt;
&lt;br /&gt;
Download it at http://www.morishima.net/~naoto/elscreen-en/?lang=en&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Basic usage =&lt;br /&gt;
&lt;br /&gt;
Click on the menu or type {{CommandKeys| C-z ?| elscreen-help}} to see full help.&lt;br /&gt;
The prefix key of elscreen is '''C-z'''.&lt;br /&gt;
&lt;br /&gt;
== Screen creation ==&lt;br /&gt;
&lt;br /&gt;
; {{CommandKeys|C-z C-c|elscreen-create}}&lt;br /&gt;
: create a new screen and switch to it.&lt;br /&gt;
&lt;br /&gt;
; {{CommandKeys|C-z C|elscreen-clone &amp;amp;optional SCREEN}} &lt;br /&gt;
: create a new screen with the window-configuration of SCREEN. If SCREEN is omitted, current screen is used.&lt;br /&gt;
&lt;br /&gt;
== Navigation ==&lt;br /&gt;
&lt;br /&gt;
; {{CommandKeys|C-z p|elscreen-previous}}&lt;br /&gt;
:  switch to the previous screen. 'n' will go to next.&lt;br /&gt;
&lt;br /&gt;
== Suspend emacs ==&lt;br /&gt;
&lt;br /&gt;
'''C-z''' is the prefix key, but you still can iconify emacs with '''C-x C-z'''. (see C-h w iconify-or-deiconify)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
== Change prefix key ==&lt;br /&gt;
This variable must be set before elscreen is loaded :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
(setq elscreen-prefix-key “\C-z”)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
alternatively, you can change it when elscreen is loaded :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
 (elscreen-set-prefix-key &amp;quot;\C-t&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use C-prior and C-next to change tabs ==&lt;br /&gt;
&lt;br /&gt;
Add into your ~/.emacs :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
(global-set-key (kbd &amp;quot;&amp;lt;C-prior&amp;gt;&amp;quot;) 'elscreen-previous)&lt;br /&gt;
(global-set-key (kbd &amp;quot;&amp;lt;C-next&amp;gt;&amp;quot;) 'elscreen-next)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Give each screen its own buffer-list ==&lt;br /&gt;
&lt;br /&gt;
You may want to have each screen its own independent buffer list (i.e. most recently used buffer orders).&lt;br /&gt;
Give a try to '''[http://www.emacswiki.org/emacs/ElscreenSeparateBufferLists elscreen-buffer-list]'''.&lt;br /&gt;
You can install it with [[el-get]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
[[escreen]] &lt;br /&gt;
&lt;br /&gt;
http://www.emacswiki.org/emacs/EmacsLispScreen&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-------------------------------------------------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!-- Add categories based on user-level (beginner etc), user-role (programming, emacs contributor etc), platform (windows, linux etc), work flow (text editing, document authoring etc) or package type (built-in or third party) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Third Party Package]][[Category:session manager]]&lt;br /&gt;
[[Category:Beginner]]&lt;br /&gt;
[[Category:Convenience]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5397</id>
		<title>Keyboard macros</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Keyboard_macros&amp;diff=5397"/>
		<updated>2013-10-18T15:34:37Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Revert vandalism&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Manual|emacs|Basic-Keyboard-Macro|Basic Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
'''Keyboard macros''' can be used to automate or repeat tedious editing tasks in Emacs.&lt;br /&gt;
&lt;br /&gt;
==Example usage==&lt;br /&gt;
Consider the standard &amp;lt;code&amp;gt;*scratch*&amp;lt;/code&amp;gt; buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This buffer is for notes you don't want to save, and for Lisp evaluation.&lt;br /&gt;
;; If you want to create a file, visit that file with C-x C-f,&lt;br /&gt;
;; then enter the text in that file's own buffer.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose you want to remove the first occurrence of the letter &amp;quot;a&amp;quot; on every row in that piece of text. You could write a [[regular expression]] to do the job, but let's assume you want to use a keyboard macro this time.&lt;br /&gt;
&lt;br /&gt;
# Make sure [[point]] is at the start of the buffer.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-x (&amp;lt;/code&amp;gt; to start recording your macro. '''Note:''' If you hit &amp;lt;code&amp;gt;C-g&amp;lt;/code&amp;gt; or if an error occurs, your keyboard macro recording will stop.&lt;br /&gt;
# Hit &amp;lt;code&amp;gt;C-s&amp;lt;/code&amp;gt; followed by &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to find the first &amp;quot;a&amp;quot;. Now, point is right after the first &amp;quot;a&amp;quot; in the text.&lt;br /&gt;
# Hit backspace to delete that &amp;quot;a&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first occurrence of &amp;quot;a&amp;quot; of the first line has been deleted. Let's move point to the beginning of the next line and then stop recording.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-e C-f&amp;lt;/code&amp;gt; to move point to the beginning of the next line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x )&amp;lt;/code&amp;gt; to finish the recording of our macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The macro you have just recorded performs the operation of removing the first occurrence of &amp;quot;a&amp;quot; it can find and then moving point to the next line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;7&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hit &amp;lt;code&amp;gt;C-x e&amp;lt;/code&amp;gt; once to call that macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Continue hitting &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to call it several times. Hit any other key to get out of the macro repetition.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saving macros==&lt;br /&gt;
{{Manual|emacs|Save-Keyboard-Macro|Save Keyboard Macro}}&lt;br /&gt;
&lt;br /&gt;
===Binding to a key===&lt;br /&gt;
To bind a keyboard macro to a key use &amp;lt;code&amp;gt;C-x C-k b&amp;lt;/code&amp;gt;.  To avoid problems caused by overriding existing bindings, the key sequences &amp;lt;code&amp;gt;C-x C-k 0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k 9&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C-x C-k A&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;C-x C-k Z&amp;lt;/code&amp;gt; are reserved for your own keyboard macro bindings.  You can, however, bind a keyboard macro to whatever you like.&lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
&lt;br /&gt;
Variables can be stored in lisp or in [[registers]].  Here's an example using lisp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[M-: (setq x 1)]&lt;br /&gt;
&amp;lt;F3&amp;gt;&lt;br /&gt;
Line number [C-u M-: x]&lt;br /&gt;
[M-: (setq x (+ x 1))]&lt;br /&gt;
&amp;lt;F4&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now execute the macro four times with the command &amp;lt;code&amp;gt;C-x e e e e&amp;lt;/code&amp;gt; and you get:&lt;br /&gt;
&lt;br /&gt;
line number 1&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 2&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 3&amp;lt;br /&amp;gt;&lt;br /&gt;
line number 4&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Category:Search&amp;diff=5394</id>
		<title>Category:Search</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Category:Search&amp;diff=5394"/>
		<updated>2013-10-18T15:15:40Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Created page with &amp;quot;Searching with Emacs&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Searching with Emacs&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Helm&amp;diff=5393</id>
		<title>Helm</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Helm&amp;diff=5393"/>
		<updated>2013-10-18T15:14:36Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Added categories&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Package&lt;br /&gt;
|name=Helm&lt;br /&gt;
|description=incremental completion and selection narrowing framework&lt;br /&gt;
|author=Thierry Volpiatto&lt;br /&gt;
|maintainer=Thierry Volpiatto&lt;br /&gt;
|source=https://github.com/emacs-helm/helm&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''Helm''' is an incremental completion and selection narrowing framework for Emacs. It will help steer you in the right direction when you're looking for stuff in Emacs (like buffers, files, etc).&lt;br /&gt;
&lt;br /&gt;
Helm is a fork of '''anything.el''' originally written by Tamas Patrovics and can be considered to be its successor. Helm sets out to clean up the legacy code in anything.el and provide a cleaner, leaner and more modular tool that's not tied in the trap of backward compatibility.&lt;br /&gt;
&lt;br /&gt;
== Basic setup ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
(add-to-list 'load-path &amp;quot;/path/to/helm/directory&amp;quot;)&lt;br /&gt;
(require 'helm-config)&lt;br /&gt;
(global-set-key (kbd &amp;quot;C-c h&amp;quot;) 'helm-mini)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Helpful keybindings ==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|C-n}}&lt;br /&gt;
: Move to next helm suggestion.&lt;br /&gt;
&lt;br /&gt;
; {{Keys|C-p}}&lt;br /&gt;
: Move to previous helm suggestion.&lt;br /&gt;
&lt;br /&gt;
== Common Customization ==&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Ido]]&lt;br /&gt;
&lt;br /&gt;
== Project Pages ==&lt;br /&gt;
* [https://github.com/emacs-helm/helm GitHub Repo]&lt;br /&gt;
* [https://github.com/emacs-helm/helm/wiki Wiki]&lt;br /&gt;
&lt;br /&gt;
== Tutorial Pages ==&lt;br /&gt;
&lt;br /&gt;
* [http://bc.tech.coop/blog/070711.html QuickSilver for Emacs: anything.el]&lt;br /&gt;
* [http://metasandwich.com/2010/07/30/what-can-i-get-for-10-dolla-anything-el/ What can I get for 10 dolla? Anything.el.]&lt;br /&gt;
&lt;br /&gt;
[[Category:Intermediate]]&lt;br /&gt;
[[Category:Completion]]&lt;br /&gt;
[[Category:Convenience]]&lt;br /&gt;
[[Category:Search]]&lt;br /&gt;
[[Category:Third Party Package]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Registers&amp;diff=5392</id>
		<title>Registers</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Registers&amp;diff=5392"/>
		<updated>2013-10-18T15:10:09Z</updated>

		<summary type="html">&lt;p&gt;TychoBrailleur: Revert vandalism&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Emacs registers are compartments where you can save text, rectangles, positions, and other things for later use. Once you save text or a rectangle in a register, you can copy it into the buffer once, or many times; once you save a position in a register, you can jump back to that position once, or many times.&lt;br /&gt;
&lt;br /&gt;
== Naming convention ==&lt;br /&gt;
There are 62 registers, each with a single character for a name:&lt;br /&gt;
&lt;br /&gt;
* from a to z&lt;br /&gt;
* from A to Z, different from a to z&lt;br /&gt;
* from 0 to 9&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
A register can store a position, a piece of text, a rectangle, a number, a window configuration, or a file name, but only one thing at any given time. Whatever you store in a register remains there until you store something else in that register. &lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type&lt;br /&gt;
! How to save&lt;br /&gt;
! How to use&lt;br /&gt;
! Other useful command&lt;br /&gt;
|-&lt;br /&gt;
|Position&lt;br /&gt;
|C-x r &amp;lt;SPC&amp;gt; '''r'''&lt;br /&gt;
|''jump:'' C-x r j '''r'''&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Text&lt;br /&gt;
|C-x r s '''r'''&lt;br /&gt;
|''insert:'' C-x r i '''r'''&lt;br /&gt;
| m-x append-toregister &amp;lt;RET&amp;gt; '''r'''; m-x prepend-to-register &amp;lt;RET&amp;gt; '''r'''&lt;br /&gt;
|-&lt;br /&gt;
|Rectangle&lt;br /&gt;
|C-x r r '''r'''&lt;br /&gt;
|''insert:'' C-x r i '''r'''&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Window Config&lt;br /&gt;
|C-x r w '''r'''&lt;br /&gt;
|''restore:'' C-x r j '''r'''&lt;br /&gt;
|''save all frame's window:'' C-x r f '''r'''&lt;br /&gt;
|-&lt;br /&gt;
|Number&lt;br /&gt;
|C-u number C-x r n '''r'''&lt;br /&gt;
|''insert:'' C-x r i '''r'''&lt;br /&gt;
|''increment:'' C-x r + '''r'''&lt;br /&gt;
|-&lt;br /&gt;
| File&lt;br /&gt;
| (set-register ?z '(fine . name))&lt;br /&gt;
| ''jump:'' C-x r j '''r'''&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
* To see what register r contains, use M-x view-register&lt;br /&gt;
== Bookmark ==&lt;br /&gt;
[[Bookmarks]] can be thought as register with a long name and surviving between Emacs session.&lt;br /&gt;
&lt;br /&gt;
[[Category:Text Editing]]&lt;/div&gt;</summary>
		<author><name>TychoBrailleur</name></author>
	</entry>
</feed>