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
2
votes
0answers
326 views

How to copy into mintty xterm clipboard from terminal emacs

My host machine is Windows, but I'm working in Linux virtualbox machine over ssh from mintty in MSYS2 environment. As you may know, in mintty you copy via C-insert and paste via C-S-insert. When I ssh ...
1
vote
1answer
207 views

How copy content of minibuffer to kill-ring?

Windows 10, Emacs 25, Helm How copy content of minibuffer to kill-ring?
0
votes
1answer
90 views

How to paste to another app from a shell script

I've been getting very vexed by the following. Goal: Take the clipboard contents and paste them into another application by using a shell script called by Emacs, followed by a Return. [This is for ...
1
vote
1answer
178 views

Copy part of the file in the buffer

I need to copy part of the file (with re-search-forward) to another file under the marker. I know how to use re-search-forward, but I have problems with buffer. Am i right with my logic? 1) open ...
0
votes
0answers
294 views

Wanted: vim-like paste behavior from browse-kill-ring

When using the browse-kill-ring package to insert some text from the kill ring, the text always gets inserted before point. This is not intuitive to vim users who are used to pasted text being ...
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 ...
2
votes
0answers
108 views

Copy/Paste relative links between buffers

How can I copy (relative) links and regions with (relative) links between buffers? Buffer c:\path\to\a\a.org contains links of the form * A section with links This is a link to another org-file [[...
1
vote
0answers
185 views

Evil paste behaviour

I'm noticing odd behaviour when I select some text with control-space and use p to paste -- in that the paste is done after the cursor character, rather than on the next line. Is that intentional, ...
1
vote
1answer
122 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 ...
1
vote
2answers
319 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
134 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
871 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
139 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
449 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
92 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
125 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
101 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
36 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
698 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
119 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
73 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
282 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
656 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
193 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
405 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
6k 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
733 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
82 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 ...
2
votes
1answer
798 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
187 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
589 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
134 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
33 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
400 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
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 ...
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 ...
6
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
144 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
261 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
480 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?
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
48 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
218 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
142 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-...
9
votes
2answers
570 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
581 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
448 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 ...