Questions tagged [copy-paste]
is about the editor operations cut, copy, and paste as they apply to Emacs. In Emacs, cut is called "kill" and paste is called "yank" (but Emacs enhances the standard cut and paste behavior).
20
questions
25
votes
7answers
14k views
Copy text from Emacs to OS X clipboard
When I run Emacs in a text terminal instead of the normal GUI mode, I can copy in Emacs by activating the start of a region with C-SPC, and then select what I want, and then do M-w.
Is there any way ...
32
votes
10answers
7k views
Kill or copy current line with minimal keystrokes
I do C-a C-k C-k to kill the entire line point is on.
If I want to copy the line instead of killing it, I can hit C-/ C-/
right after typing the sequence above.
Alternatively, I can do C-a C-SPC C-...
4
votes
2answers
2k views
Copy and paste between Emacs in an X terminal and other X applications
I am running Emacs in Gnome-terminal on Ubuntu.
The way I know to copy and paste between emacs and other applications is by Ctrl+C and Ctrl+V, which I think is by the terminal emulator.
A problem ...
3
votes
1answer
249 views
Almost working smoothly attempt to get terminal Emacs to copy to clipboard
I'm running this emacs
GNU Emacs 25.2.2 (x86_64-pc-linux-gnu) of 2017-09-22, modified by Debian
directly in a Gnome terminal by calling emacs, which is actually a link to /etc/alternatives/emacs. ...
19
votes
1answer
3k views
Emacs doesn't paste in Evil's Visual mode with every OS clipboard
Setup:
GUI version GNU Emacs 25.0.50.1 (x86_64-w64-mingw32) of 2015-07-25 on KAEL
Compiled from EmacsW64.
Package Evil, using the latest version of Evil from MELPA
Windows 7 x64 bit.
Situation:
...
5
votes
1answer
983 views
Character encoding when copying some text from somewhere to Emacs and saving to a file
Suppose I copy some text from a source (e.g. a webpage, a text file opened in an editor such as gedit or emacs) to a buffer in emacs, and then save the buffer to a text file.
When I copy the text ...
4
votes
2answers
549 views
how to push kill-ring contents onto system pasteboard (clipboard)?
I use the brilliant answer from my previous question to copy selected regions of text from Emacs onto my system pasteboard (i.e. the OSX clipboard).
But some functions (e.g. gist-buffer) push output ...
3
votes
2answers
297 views
Pasting Text from Clipboard - why ^M instead of linebreaks?
I'm using some VBA scripts which copy Text in MS Outlook from an e-mail message and send it to the clipboard.
If I then paste the clipboard content with Ctrl-Y in Emacs 24.5.1 in Windows 7, the ...
5
votes
2answers
608 views
Copy/paste between SSH terminal Emacs and macOS
Suppose you are working in macOS, and you decide to SSH into a Linux box and fire up terminal Emacs. How do you copy and paste between macOS and your SSH terminal-Emacs?
Copying and pasting between ...
2
votes
1answer
678 views
How to set copy to C-c in Emacs?
I have tried using Cua mode (via adding (cua-mode t) to my ~/.emacs file) but it doesn't seem to set the copy keybinding to Ctrl-c. See for example this screenshot showing my Edit menu:
I have tried ...
2
votes
1answer
420 views
How to avoid term turn line wrap into line break for long output
When the output in term is longer than the frame it will wrap the line. But when I copy and paste the output, I found the output will break under the wrap point, because it treat it as line break. How ...
25
votes
2answers
3k views
Add operating system clipboard to kill ring
Often I find myself copying a code snippet into my operating system's clipboard from the internet. Then, I take the following simple steps:
Switch to my Emacs window
Find the place where I want to ...
11
votes
1answer
2k views
Org mode - Parsing rich HTML directly when pasting?
Currently, for notetaking tools like Evernote and Quiver, I can directly copy HTML content from my favorite browser and then paste them into the app, with all the formatting + link preserved. However ...
4
votes
1answer
265 views
Copy text as it is rendered by Emacs
I have Emacs doing a bunch of smart things to display text for me. In particular, some text has the invisible property set, and I'm running adaptive-wrap with <!-- adaptive-wrap-extra-indent: 3 --&...
2
votes
1answer
805 views
Copy and Paste From PDF to Emacs as Plain Text
Here is my problem:
I often copy text from a PDF (let's say one that is nicely formatted or scanned cleanly) and like to post it in an active org-mode file I have for academic research. However, ...
8
votes
2answers
3k views
How to access os clipboard using Emacs + Evil
How can i yank to/from windows clipboard when using:
Windows 7 (x64)
GNU Emacs 24.4.1 (x64)
Evil 1.0.9
and having (setq x-select-enable-clipboard nil) in my .emacs? (I put this line there because i ...
7
votes
2answers
549 views
Evil-emacs: how to select last pasted text (like gv)?
How do I visually select the last pasted text with evil-emacs?
gv reselects the last visual selection. I'd like a function/snippet that does the same for my last pasted text.
5
votes
1answer
367 views
Handling text files with mixed encodings
I created a text file by copying its different parts from different
sources (webpages, other text files, pdf files) into gedit and saved
it to the file. I wonder if that is the reason why I may have
...
2
votes
2answers
594 views
Remove tabs from pasted text automatically?
I have emacs configured to refrain from inserting tabs for indentation purposes already. But this does not have any effect when I paste text containing a tab (from an external application, Google ...
2
votes
2answers
274 views
Evil - don't yank with only whitespace to register
How can I configure Emacs in Evil mode to delete an empty line (d d) without copying it but still copy it when deleting a non-empty line?