Emacs series tutorial (7): clipboard

Source: Internet
Author: User

Emacs differs slightly in different operating systems. Here I will compare the clipboard of Emacs in different operating systems with the paste copy mentioned in the previous chapter.

 

1. Copy to clipboard

In Emacs, in addition to commands, you can also use shortcut buttons on the toolbar or menu items in the menu bar to cut and copy texts, by default, when you use the toolbar and menu bar for cutting and copying, the relevant content will be sent to the system clipboard for otherProgram. Using C-W or M-W in Windows and Mac OS X also copies the content to the clipboard, but not in Linux.

Another way to select a region is to use the mouse, which also has a small difference, as shown in the following table:

Use the mouse to select a region
Linux Windows Mac OS X
Sent to system clipboard No Yes Yes
Send to kill ring? Yes Yes Yes

In Linux, you can also use several clipboard commands, suchClipboard-kill-regionCut the area and send it to the system clipboard and kill ring,Clipboard-kill-ring-saveCopy the area content to the system clipboard and kill ring. Of course, these two commands can also be used in Windows and Mac. Essentially, these two commands are cut and copy corresponding to the menu bar.

 

2. Extract from clipboard

Since there are differences between the Emacs and the system clipboard, there are also some differences between the clipboard and the Emacs. See the following table:

Paste from system clipboard
Linux Windows Max OS X
C-y Paste Yes Yes Yes
Toolbar paste button Yes Yes No
Paste menu items in the menu bar Yes Yes No
Middle mouse Yes Yes Yes
M-x clipboard-Yank Yes Yes Yes

Here are some explanations. One is the middle mouse button. Some do not have the middle mouse button or the pulley. It also has the paste function, while the commandClipboard-YankPaste the clipboard with the paste function on the menu bar.

 

Summary:

This chapter has very little content, which is a simple comparison. In the future, we will be able to see more Emacs differences on different platforms.

 

Buttons

Command

Function

Clipboard-kill-region Cut the area and send it to the system clipboard and kill Ring
Clipboard-kill-ring-save Copy the region content to the system clipboard and kill ring.
Clipboard-Yank Paste from clipboard to Emacs

 

Not complete...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.