Terminology
Emacs has its own terminology for these concepts:
So I decided to try Emacs for Mac, which (presumably) I could use as a free-standing application, thereby circumventing whatever problems Terminal.app may be causing. But it turns out that, with Emacs for Mac I can type even fewer Org Mode key-bound commands! (In this post, I will abbreviate Emacs for Mac as McE, and Emacs via Terminal.app as.
Typing 'emacs foo.txt' when foo.txt exists launches a GUI Emacs window with foo.txt loaded. If emacs is already running and has a server, then it will open in the existing window and come to the foreground. Typing 'emacs foo.txt' when foo.txt does not exist launches a GUI Emacs window with an empty text buffer named 'foo.txt'. Spacemacs is just a well-configured Emacs distribution with community-sourced best in class plugins and layers selected to take the setup pain out of Emacs. Evil mode gives the Vim bindings and modes for fast editing, while Helm makes everything discoverable to make learning to be more productive simple and unintrusive.
Common Name | Common Key | Emacs Name | Emacs Key |
Cut | C-x | Kill-region | C-w |
Copy | C-c | Kill-ring-save | M-w |
Paste | C-v | Yank | C-y |
— | — | Yank next | M-y |
If you do not care for the DefaultKillingAndYankingkey bindings, then consider these alternatives:
- PcSelectionMode – the Windows and Motif flavour with
C-<ins>
,C-<del>
, andS-<ins>
. - CuaMode – use
C-x
,C-c
andC-v
to copy and paste - CuaLightMode – something between PcSelectionMode and CuaMode
- DeleteSelectionMode –
DEL
deletes the region; just typing replaces it. - WholeLineOrRegion –
C-w
andM-w
act on the current line when TransientMarkMode is not active
X11 Copy & Paste to/from Emacs:
X copy and paste support has historically been a mess. This is relevant, as Emacs supports the various aspects of this mess.
Important for this discussion is the understanding that X generally distinguishes between two types of selection, the PRIMARY and the CLIPBOARD. Every time you select a piece of text with the mouse, the selected text is set as the PRIMARY selection. Using the copy function will place the selected text into the CLIPBOARD. Pasting using the middle mouse button will insert the PRIMARY selection, pasting using the paste function will insert the CLIPBOARD.
With this out of the way, starting with Emacs 24.1, GNU Emacs should already do the right thing here. If you dislike this behavior, there are two options you can customize:
x-select-enable-primary
- defaultnil
; set this tot
if you want the Emacs commandsC-w
andC-y
to use the primary selection.x-select-enable-clipboard
- defaultt
; set this tonil
if you want the Emacs commandsC-w
andC-y
to use the clipboard selection.
Yes, you can have Emacs use both at the same time.
![Emacs For Mac Emacs For Mac](/uploads/1/3/4/0/134054236/123722204.jpg)
This does not affect pasting using the middle mouse button. By default, this uses
mouse-yank-primary
, which will only look at the primary selection. If you want the middle mouse button to insert the clipboard instead, use the following:Finally, in other applications, pasting usually replaces the selected text with the contents of the clipboard. To enable this behavior in Emacs, use DeleteSelectionMode with the following:
XEmacs
Third party plugins
simpleclip
You can use https://github.com/rolandwalker/simpleclip which ALWAYS works.
More specifically, for copy&paste, there are only two commands:
cliphist
Read clipboard history from clipboard managers (Parcellite, ClipIt at Linux and Flycut at Mac). https://github.com/redguardtoo/cliphist
datclip
If it’s getting to be a bit of a hassle, use https://github.com/thomp/datclip to simply show the primary, secondary, and clipboard selections in the datclip buffer.
clipmon
Monitor the clipboard and insert any change into the kill-ring. It makes it easier to use
yank-pop
from several inputs outside Emacs. https://github.com/bburns/clipmonBy Xah Lee. Date: . Last updated: .
Windows
Download at http://ftp.gnu.org/pub/gnu/emacs/windows/
This is the official GNU Emacs, build for Windows by Free Software Foundation.
You'll see file names like these:
- emacs-25.1-i686-w64-mingw32.zip
- emacs-25.1-x86_64-w64-mingw32.zip
- emacs-25.2-i686.zip
The “i686” means 32-bit. The “x86_64” means 64-bit.
To find if your Microsoft Windows is 32 or 64, press ❖ Window key, type “about” in the search box. It'll bring up “About this PC” window.Look for the line “system type”.
After download, right click “extract all” to unzip it.
Open the folder, open the folder named “bin”, click the “runemacs” to start emacs.
To uninstall, just delete the folder.
[see Emacs in Microsoft Windows FAQ]
Mac
Emacs is installed on macOS by default, but a very old version, version22.1, dated 2007.
In terminal, type:
which emacs
→ check if emacs is installed and in your path.emacs --version
→ print version.emacs
→ launch emacs. (to quit, press Ctrl+xCtrl+cx)
Emacs Os X
Download Latest Emacs for MacOS
Download athttp://emacsformacosx.com/
This is plain GNU Emacs, built by David Caldwell.
Homebrew, Macports
Get emacs from one of the package managers.
- Homebrew http://brew.sh/
- MacPorts https://www.macports.org/
Linux
Build Emacs from Source Code
Emacs For Mac
Download Emacs Binary from apt-get
In terminal, type:
which emacs
→ check if emacs is installed and in your path.emacs --version
→ print version.emacs
→ launch emacs. (to quit, press Ctrl+xCtrl+cx)
On Ubuntu, to check available emacs package version for install,
Emacs For Mac Osx
Typicall you install by
sudo apt-get install emacs26
, where the emacs26 may be other version.
Emacs Quick Start
Emacs For Mac Os X
If you have a question, put $5 at patreon and message me.
Or Buy Xah Emacs Tutorial
Or buy a nice keyboard:Best Keyboards for Emacs
Or Buy Xah Emacs Tutorial
Or buy a nice keyboard:Best Keyboards for Emacs