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).

Filter by
Sorted by
Tagged with
1
vote
1answer
117 views

Copy Paste - Hard to use with one Hand

Coming from casual IDEs I used CUA mode. Switching back to the vanilla keymaps I noticed that M-w & C-y (copy&yank) is significant harder to use with one hand than Ctrl c & Ctrl v Why are ...
4
votes
1answer
700 views

How do I cut and paste effectively between applications while using EXWM?

For example, I am trying to copy the URL line from Firefox into an org mode buffer. The usual cut and paste keys for Firefox (C-c C-v) do not work, and neither does (M-w C-y). To copy from Firefox (...
1
vote
2answers
280 views

Copying an rectangular selection to system clipboard

Does anyone know a command or somtething to copy an rectangular selection (as with C-x r M-w / copy-rectange-as-kill) and put the killed rectangle into the system clipboard like with the kill-ring-...
1
vote
1answer
127 views

How can Emacs mouse capture in an X11 based terminal be disabled to enable copy and past?

I am using Spacemacs in a terminal in a desktop, ie Konsole and when I try to copy and paste I see that emacs is capturing mouse clicks. Is it possible to disable Emacs mouse capture for copying and ...
1
vote
2answers
587 views

How to copy text from another application to emacs in ubuntu?

I am using emacs 23.3 on Ubuntu 12.04 LTS. I am having problems trying to copy text from another application (most of the time, Firefox) to emacs. Sometimes it works and sometimes it doesn't. Any way ...
3
votes
1answer
125 views

Copy non-printable characters as displayed by Emacs

Very similar to this question: Copy text as it is rendered by Emacs but what I need is to coy the ^M, ^E and so on characters as they are displayed. (Otherwise the text in clipboard gets truncated).
0
votes
1answer
378 views

copy/paste text use pdf-tools in emacs

when I use pdf-tools the text in it can't be copy/paste as normal I want to treat this pdf mode as a place where I get the information to use in emacs
3
votes
0answers
87 views

copy to clipboard without overwriting kill ring

I'm looking for a way to copy to clipboard from emacs without passing through the kill-ring, moving the marker or using the mouse. If I use x-select-enable-primary and x-select-enable-clipboard, I can ...
0
votes
1answer
116 views

Accidental yank or paste into org buffer

EDIT: I closed and reopened Emacs again and the same behavior happened. But this time the text inserted was from my last kill or M-w—(add-hook 'before-save-hook 'time-stamp)—to copy it to the system ...
2
votes
1answer
87 views

How can i keep the case when I am using select and paste to C-s input field?

I see a word in buffer1. I want to look for it in buffer2. I select the word in buffer1. I select buffer2 as my current buffer, hit C-s, and press mouse-2 (the middle mouse button). Emacs converts ...
1
vote
0answers
35 views

Is there a way to get copy & paste to be context-aware wrt whitespace and formatting?

When I copy a word and paste it at the end of an existing sentence (between the last word and the full stop), I'd like it to be pasted in such a way that the space between the pasted word and the ...
5
votes
2answers
611 views

Copy text as rectangle

This is the block of text that I intend to copy as rectangle (without the line numbers). 1. ALM_KRmet_DCDO_RPMP_START 2. ALM_KRmet_DCDO_RPMP_STOP 3. ALM_KRmet_DIDC_RPMP_TRIP 4. ...
1
vote
1answer
110 views

Get thing-at-point to include periods

I'm using avy to select and insert symbols on screen with the help of thing-at-point. Is there an obvious way to get this to include periods? At the moment if I select self.blah I get just self (or ...
1
vote
1answer
65 views

pasting from websites results in 1 long line..anyway to keep the paragraph format?

when copy and pasting from any web site a paragraph and pasting into emacs with S-insert, the paragraph is always a very long line. is there anyway to keep the paragraph structure?
5
votes
2answers
271 views

Alternative shortcuts to copy the character

To copy the character at point usually I do Shift-<right> M-w. I am wondering what are the alternative ways to do this action using only the Emacs standard keybindings (maybe with minimal ...
2
votes
1answer
576 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
0answers
160 views

How do I get the highlight region mouse and yank functionality work like Emacs 21.3 in a newer version?

Recently at work (a small academic department, absolutely no Emacs support) we upgraded from Emacs version 21.3.1 to 24.3. In version 21 marking a region with the mouse will put the highlighted text ...
6
votes
4answers
385 views

Copy all file names that match regexp

In a dired buffer of a directory, how do I copy the file names of all files matching [tT]ypolog[yi]? Getting them from an elisp list format, \n separated format or otherwise into a python list format ...
2
votes
2answers
5k views

copy from shell and paste in terminal-emacs

How can I copy from the command line and paste in Emacs in terminal mode? If I select the text with the mouse and paste it from the clipboard with the third button (the wheel) it is OK. But if I try ...
3
votes
0answers
699 views

Emacs takes a very long time to read/save to the clipboard

Sometimes emacs takes a very long time (+ 30 seconds) to read from or save to the system (Linux) clipboard. The entire emacs session hangs while it does this and I can't cancel it with C-g or ESC ESC ...
0
votes
2answers
81 views

Copy and paste with mouse breaks Umlaute

After upgrading to emacs 24 I have strange problems with copy and paste. I managed to reinstall copy and paste with the mouse but there remains the problem with German diacritic characters. If I copy ...
1
vote
1answer
741 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, ...
4
votes
3answers
179 views

Copy a column of uneven width that ends with a specific character

I have a data file that looks as follows ALGO = Fast EDIFF = 6.7e-05 ENCUT = 520 IBRION = 2 ICHARG = 1 ISIF = 2 ISMEAR = 0 ISPIN = 2 I'm interested in copying the first column of uneven width but ...
2
votes
2answers
569 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
132 views

Is it possible to get the start and end points in the buffer in which text is pasted?

Like if you have a buffer containing hel! and paste in lo world after the third letter you get 4 and 11 respectively? Emacs has many state variables, are there any that could help me in this case?
0
votes
1answer
32 views

One directional access to the clipboard (OS to Emacs: no, Emacs to OS: yes)

Is it possible that Emacs ignores the system clipboard? I mean when outside of Emacs I copy something, Emacs ignores it. But not vice-versa, i.e., I would like to be able to have the access to the ...
4
votes
1answer
384 views

How can I paste my password when pushing?

Instead of memorizing all of my passwords, I use a password manager to store them for me. Currently, since I use Magit for most Git purposes, I need to go through several steps in order to push: P P ...
11
votes
1answer
1k 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 ...
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 ...
5
votes
2answers
2k views

How to auto copy when a region is selected?

Chrome browser has an excellent extension called autocopy, which copies text whenever some text is selected/highlighted. To copy a region in emacs, I have to select the region and then press M-w to ...
1
vote
1answer
142 views

How to set mouse left click and hold to copy in helm-mode

I'm using helm-mode in emacs to open files. However, when I try to copy the path of a file (say /home/user1/Documents/file1.txt) to paste it in terminal, I get a message saying <down-mouse-1> ...
4
votes
1answer
244 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 --&...
4
votes
2answers
431 views

How to get contents of current line?

I want to get contents of the current line(the line with cursor) for my function. What command allows me to achieve this?
4
votes
1answer
500 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
4answers
2k views

A quick way to copy the word before the cursor

By M-backspace (or by M-x backward-kill-word), I can remove the word before the cursor. Is there a built-in equivalent of this command for copying instead of deleting? Obviously one can do M-x ...
1
vote
1answer
46 views

How can select text in a single window in a multi-window configuration? [duplicate]

When I have two buffers open side by side in as terminal (as shown in the screenshot), I cannot simply select text in a single buffer for copy and paste purpose. The selection will span across them, ...
5
votes
1answer
212 views

Inadvertent paste when correcting spelling mistakes using flyspell

When I click with the middle mouse button that usually inserts the primary selection at the point where I clicked. However, the same button opens flyspell's context menu when I click on a misspelled ...
4
votes
2answers
3k views

Evil: Is there a default register that does not get overwritten by later yanks to explicit registers?

I often use registers in evil, but I have a common use case that I cannot seem to resolve. I would like to have all copied text stored somewhere that does not get overwritten when I explicitly make ...
7
votes
5answers
2k views

How to paste text that had been copied (alt-w) prior to my latest paste (ctrl-y)?

Once I have selected some text I use Alt-w to copy the region and then use ctrl-y to paste it. Is there a way to paste something I have selected and copied with Alt-w prior to my latest paste?
1
vote
0answers
138 views

Unicode character escape sequences instead of text upon mouse-2 paste from other windows

I am having a weird problem with emacs: When pasting non-ascii text, e.g. € from X-clipboard with the middle mouse button into x-enabled emacs I get Unicode character escape sequences, e.g. \u20ac ...
5
votes
1answer
3k views

Copy and paste to system clipboard in tmux

I have the following code in my init.el (xclip-mode +1) (setq x-select-enable-clipboard t x-select-enable-primary t x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING) x-stretch-...
8
votes
2answers
549 views

How to change octal sequences into utf-8 text

When I copy non-ascii text from Windows and paste into Emacs, it shows up as an octal sequence. For example, if I paste ä into Emacs it shows up as \344. I could type C-q 344 to get the ä back in ...
0
votes
1answer
552 views

Interpretation of tabs in text copied from Emacs and pasted in other programs/editors

When you set Emacs to recognize 4 spaces as 1 tab, then copy text from an Emacs buffer to another program, will the other program see 4 spaces or interpret it as 1 tab (which may correspond to a ...
4
votes
3answers
432 views

Only allow kill-ring-save if there is highlighted text

I would like to wrap kill-ring-save in order to only execute kill-ring-save if text has been highlighted - same as in most text editors. Sometimes I accidentally hit copy instead of paste and then my ...
0
votes
1answer
30 views

Scrolling seems to add an unwanted chunk into my kill ring

Anybody know why this may be occurring? Here is an outline of how I recreate the issue... I copy or kill something to my kill ring. I scroll up or down with the mouse. I then yank and get an ...
8
votes
4answers
474 views

Fastest way to move code block to specific line

Say you have code on lines 4, 5, 6. Then you want to move this block of code to starting point line 9 while also deleting lines 4, 5, 6. What's the fastest way, i.e. least amount of key strokes, to ...
7
votes
1answer
113 views

How can I copy and paste characters displayed with compose-region?

I use several modes that display Unicode characters in my code without changing the underlying file. For example, in Haskell mode, the following code: foo :: forall a. Eq a => a -> a -> a ...
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 ...
5
votes
1answer
915 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 ...
5
votes
1answer
345 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 ...