Questions tagged [yank]
Emacs' name for 'paste' (the one that goes together with copy).
83 questions
1 vote
1 answer
72 views
Append .*? in isearch-forward-regexp search string by pressing TAB key
I would like to append .*? in isearch-forward-regexp search string when I press TAB key. I have tried ;; Insert .*? on space inside isearch regexp (define-key isearch-mode-map (kbd "<tab>&...
0 votes
0 answers
24 views
How can I tell what function runs when you paste from the right-click menu? [duplicate]
I have made a serious error and pasting from the right-click menu does not behave as C-y does. I could bisect my config files and find the source of the error, but I would rather figure out what ...
1 vote
1 answer
156 views
How to strip/normalise indent on paste?
It's often the case that I want to move a code block from one place to another that has a different level of indent. Here's an example Haskell snippet: someFunc = withSystemTempDirectory "test&...
1 vote
2 answers
76 views
can't use `isearch-yank-word-or-char` in minibuffer-local-map?
I'd like to have occur's prompt in the minibuffer do the same that isearch does: C-w inserts the word at point in the main buffer into the minibuffer prompt. That keybinding, when doing isearch, calls ...
0 votes
1 answer
81 views
How to bring the deleted region back if I abort yanking with `M-y`?
I have the following configuration in my init.el: (use-package delsel :demand t :config (delete-selection-mode +1)) When I do yank-pop with M-y while a region is selected, it deletes the ...
0 votes
1 answer
151 views
Is it possible to use counsel-yank-pop (or something similar) to get the job done of pasting from the clipboard-ring in the mini-buffer?
This is my emacs init file. As you see, I use command counsel-yank-pop. And I even did a keybinding for it with: ;; =counsel-yank-pop= enhances built-in =yank-pop=. (global-set-key (kbd "M-y"...
4 votes
3 answers
2k views
How to repeat the last yank command N times?
I'm just not able able to replicate the answer on this. Starting with: lipsum I do (my interpretaton): Alt-W over the word (copy) Enter (new line) Ctrl-Y (paste) Alt-2 Ctrl-X z (repeat last two ...
0 votes
2 answers
310 views
Default yank keyboard shortcut does not work
I am using Emacs 27.1 (GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian). When I hover the mouse pointer over the "copy&...