Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Emacs' name for 'paste' (the one that goes together with copy).

0
votes
1answer
28 views

Why isn't the flushed output from my Emacs shell buffer getting into the kill ring?

Following the advice given on p. 121 of Learning GNU Emacs, 2nd Ed., I'm entering the command sequence: C-c C-o, immediately after executing a command in my Emacs shell buffer. And I'm seeing the ...
0
votes
1answer
27 views

Using a predefined Regex on a yank

can you please help me to write a small emacs function? This is the first lisp function I am writing and I think I am getting confused with point and mark placement. I want to write a function that ...
2
votes
2answers
91 views

How can I yank images from Emacs?

I want to copy images from Emacs to macOS clipboard. I have tried selecting them and yanking, which hasn't worked. Google also didn't have a solution.
0
votes
1answer
45 views

Trying to copy everything between double quotes, and then make a list of everything that was copied

So I have a defun that I made that is supposed to copy every thing that is between double quotes and then make a list of everything that was copied. I don't know what the problem is, but it doesn't ...
1
vote
3answers
102 views

adhoc emacs Elisp command to send emacs clipboard text to osx clipboard

When you press 'y' (elfeed-search-yank) in an elfeed-search buffer, the selected entry's permalink url is copied to the emacs clipboard. I don't have any automatic clipboard sync packages installed, ...
1
vote
1answer
38 views

How to get mouse copy like done on Lisp Machine Zmacs/ZWEI?

I'd like my emacs v25.3.1 running on Mac OS X to have a mouse middle button functionality that copies what you mouse middle on to the insertion point in your buffer. This is great when writing code ...
0
votes
0answers
32 views

helm-show-kill-ring disregards the selection

When I select entries (with C-<SPACE>) in helm-show-kill-ring and press either Enter or F1, it disregards the selection and yanks the entry currently under cursor. Why would this be the case and ...
2
votes
1answer
68 views

yanking earlier kills not working

I followed the tutorial verbatim and I am unable to yank earlier kills. I have looked online for support, but noone else seems to have this problem. Kill a line, move around, kill another line. ...
2
votes
1answer
94 views

after previous `counsel-yank-pop`, `yank` the last yanked entry

short: after a counsel-yank-pop, yank does not yank the same entry. How can I achieve that behavior? long: Having a kill-ring like: foo bar baz When doing a C-y (yank) and M-y (yank-pop) 'bar' ...
0
votes
1answer
45 views

Can I programmatically get access to the yanked region?

You are likely to want to do things to the text that you just yanks / pasted (wrap it in brackets etc). Is there a way to know what you just yanked? If so I would quite like select it (put the mark ...
1
vote
3answers
66 views

quickly kill and then yank parts of a program

I very often encounter the problem that I have to cut out a part of an expression and need to copy it somerhere else. For example the following python line: courtage_text = data["expose"]["brokerage"]...
1
vote
5answers
74 views

Gathering scattered text to a single location

I am looking for an easy way to gather blocks of text that are scattered throughout an emacs or org-mode document and move (or copy, but move would be preferred) them to a single location. (For ...
0
votes
1answer
139 views

What's the most efficient, idiomatic way to paste-and-replace in Emacs?

I often do something like this: Copy some stuff Go to where I need to paste it Paste it (C-y) Kill the rest of the line (C-k) Select what I just pasted, and copy it again Repeat steps 2-5 The whole "...
4
votes
1answer
103 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
2answers
37 views

Function to duplicate and mark duplicated text

In order to be able to chain the following command, I need the yanked text to be marked. That is because the end goal is to call (pop kill-ring) so that I can still use whatever was at the top of the ...
0
votes
0answers
29 views

dealing with s-expressions in javascript without paredit

I was using paredit for other languages apart from lisp and it was great for being able to delete and yank whole functions etc. but it was also quite buggy with web-mode and js2-mode. Fir example, I ...
0
votes
1answer
101 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 ...
0
votes
2answers
2k views

Paste Windows clipboard with Shift-Insert but not by yanking

I am using Emacs 24.4 on Windows 10. I only ever use it in -nw (no-window) mode. I would like Emacs to paste from the Windows clipboard only on Shift-Insert and not on yank (Ctrl-y). I have tried ...
2
votes
1answer
63 views

What is the problem with this yank function in elisp in emacs?

Idea I will like to construct a simple emacs function that copies the yy functionality in vim. The function should yank a visual-line into kill ring without deleting the line. Function Here is ...
1
vote
1answer
136 views

How can I change yank/delete to show relative line numbers during the yank/delete in evil?

I use evil via spacemacs. When I use yank, it’s mostly whole line numbers – like y20y. To a lesser extent, this is often true of delete – d10d Is there anything I can add to my Spacemacs config to ...
2
votes
1answer
27 views

isearch looses focus when trying to paste into the isearch buffer

strange issue. when i launch isearh and want to paste text into it, after pressing C-s the paste (S-insert) always pastes the text to the current edited buffer and not the isearch window. has anyone ...
0
votes
1answer
303 views

What is the difference between kill-ring-save and copy-region-as-kill?

These two commands seem identical to me. What am I missing?
1
vote
1answer
132 views

I got error when using command yank

When I typed C-y to call yank, I got this. apply: Symbol's value as variable is void: n Debugger entered--Lisp error: (void-variable n) ad-Advice-current-kill( ... [interprogram-paste-...
3
votes
1answer
327 views

Copy current URL from web browser from Emacs while editing

When editing code or org-mode, I often need the URL of the page I'm viewing in Google Chrome. Is there a way to do this from Emacs? Or with an external helper script if necessary? An example use ...
4
votes
4answers
982 views

How do I yank and cycle backward through earlier killed text?

Emacs has this very handy kill-ring that can be cycled through after yanking, by pressing M-y repeatedly. Is there a way to switch the cycling direction? So I don not need to cycle through all when I ...
1
vote
2answers
67 views

Kill and yank (append?) text from buffer to bottom of same buffer

I want to be able to kill selected text and yank it to the bottom of the buffer from which it was killed. How do I do this efficiently, meaning not with C-k, moving point to end of buffer, C-y?
1
vote
2answers
571 views

In Evil mode, how can I prevent adding to the kill ring when I yank text, visual mode over other text, then paste over?

If I have text1 text2, I yank text1 with yw then I highlight text2 with vw and paste overwrite that text with p, my kill ring now has text2. I'd prefer if text2 wasn't added to my kill ring because ...
6
votes
3answers
248 views

Use avy to select distant word or line and paste at point

Is there a way to use avy or a similar in-buffer selection tool to quickly select a word or line to paste at the current point? For the following buffer an example workflow for proposed functionality ...
1
vote
0answers
97 views

Prevent emacs to indent when yanking into html buffer

I have disabled electric indent mode, as specified here, but when yanking text, indenting is still performed. I am yanking text into an html buffer, and I do not want any change whatsoever to be ...
2
votes
2answers
68 views

How to avoid double M-y with system clipboard integration in the terminal

I added Mac clipboard integration to my emacs -nw using the following code, adapted from here: (defun copy-from-osx () (shell-command-to-string "pbpaste")) (defun paste-to-osx (text &optional ...
2
votes
1answer
173 views

How to yank text to search command (after “/”) in evil-mode?

Is it there any way to yank in the search command (after press "/") in evil-mode?
3
votes
1answer
61 views

Force append to buffer instead of at point

Is it possible to force an Emacs buffer to place any new text it receives at the end of the buffer, instead of at the mouse point? I mean all of: keystrokes, yanks, mouse paste. I'm thinking in ...
1
vote
1answer
596 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, ...
0
votes
1answer
128 views

Yank from mouse in helm modes

For many built-in commands that require user input in the minibuffer I can yank from the middle mouse button (mouse-yank-primary with <down-mouse-2>). Some examples where this works are rgrep, ...
2
votes
1answer
105 views

Yank during yas-expand without aborting expansion

When expanding a yasnippet snippet and filling out completion fields yanking/pasting inserts text correctly among fields as expected, but interrupts the snippet expansion behavior (as if pressing C-g /...
4
votes
1answer
115 views

Insert lines when yanking rectangle rather than inserting among following lines?

Having copied the 3x3 rectangular region containing a's, how can I yank/paste that content at the desired point without slicing into the following text? The following is the behavior for: M-w (kill-...
2
votes
0answers
275 views

Emacs/ESS/Org hangs/spins on yank

I have the following Emacs org buffer that I'm editing: #+BEGIN_SRC R regimes <- read.spreadsheet(wlda, 3) %>% within({ TurbineID <- paste(Site, Turbine) Date.of.Change....
6
votes
1answer
285 views

Yank a column of text copied from the clipboard

I often seem to want to copy paste multiple columns, for example, I paste one column line one line two line three Now I'd like to be able to yank another column behind it. Assuming my kill buffer ...
4
votes
3answers
486 views

Quickly open file by full path in clipboard

There is something that blocks my workflow quite often and I'm quite sure it's easy to solve. I sometimes copy file paths (e.g. /tmp/bar/foo.gz) from the command line into my host systems clipboard. ...
11
votes
2answers
292 views

What is the origin of the term “yank”?

I'm interested in learning how the term "yank" got its name. I'm also interested in why Emacs "yank" differs from vi/vim "yank". See also: dual question about Vi, also on Unix & Linux;
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: ...
7
votes
3answers
400 views

How to push system clipboards to kill ring contents at real-time when I copy outside emacs?

I noticed that when I copy thing outside of Emacs, the thing does not appear to kill ring immediately except I yank it to Emacs. If I copy twice, only the last copy can be got by yank. Sometimes, I ...
6
votes
3answers
2k views

How can I copy syntax highlighted code as RTF or HTML?

I'm using Emacs to write code samples that I later want to be able to paste into a MS-Word document, preserving the syntax highlighting. I understand that in order to do this I need to copy the text ...
0
votes
1answer
67 views

Yanking after `isearch-forward/backward`

When doing a yank after an isearch-forward/backward, the most natural thing that one wishes to happen is to isearch the string provided by that yank. How to realize this?
2
votes
1answer
67 views

Function to paste killring after the current line (like “p” in vim)

I'm trying to write a very simple function to replicate the Vim 'p' command. This is, paste some text after the current line. I've been googling for a while and haven't found a function to achieve ...
7
votes
2answers
175 views

How to automatically adjust whitespace after yanks?

When editing human language text and moving text fragments around, I frequently run into the problem that whitespace moved at the beginning or end of a fragment doesn't fit into the new position. For ...
1
vote
1answer
118 views

Yanking without moving the mark, but still be able to `yank-pop`

I would like to change C-y to not move the mark, but still be able to yank-pop. I looked at the source code and saw that the major change needed was to remove the (push-mark (point)) command: (defun ...
2
votes
1answer
415 views

How do I disable the emacs flyspell middle mouse correction?

I already use middle mouse to paste/yank. However flyspell seems to hijack this, making it impossible to paste in the vicinity of a correctable word. With the help of this question I have discovered ...
2
votes
2answers
692 views

Evil mode pasting under line

Im tryig to achive the following with this: $pricelist = pricelist(); $hotels[$index ]['id'] I want to copy the bottom line into the pricelist() function like this: $pricelist = pricelist($hotels[$...
0
votes
0answers
379 views

Kill ring not synchronizing with clipboard in Windows

I have been using Emacs 24 on Windows 7 for almost a year without any issues. But recently, kill-ring in my Emacs has stopped synchronizing with clipboard (actually whatever I copy from within Emacs ...