Questions tagged [clipboard]
The clipboard tag has no usage guidance.
60
questions
0
votes
1
answer
33
views
How can I get the org-roam ID and title/headline into clipboard?
I take content from nodes of my org-roam database and paste this into e.g. an email.
For backtracing the content I would like to have certain information copied to my clipboard to insert it into the ...
0
votes
1
answer
24
views
Is there a cross platform way of accessing the GUI clipboard from emacs lisp?
I run emacs with a common configuration on osx and linux. I have some custom functions that need to get access to the GUI clipboard. I find interacting with the clipboard a bit of pain - so I've ...
0
votes
1
answer
16
views
Does kill-new take some time to put a string on the system clipboard?
I have an emacs function which calls kill-new to put a string onto the Windows system clipboard and then immediately invokes an external script to paste that string from the clipboard to an other ...
0
votes
1
answer
63
views
pasting screenshots into org, on Windows
I've got the following code, which creates a filename, inserts a link to it at point, and should also save the current image in clipboard to disk at that filename/location.
It used to work, but ...
0
votes
1
answer
107
views
How do I send docx formatted text from org-mode to the clipboard with pandoc?
I'd like to use send highlighted text from .org documents to the clipboard in the docx format. I've tried the following:
(defun region-to-clip ()
"Copies region between point and ...
0
votes
1
answer
470
views
How can I copy the text to the clipboard while using spacemacs?
I know that on emacs I can install the xclip package in order to be able to copy text to the system clipboard... With the xclip package installed and adding the following to my .emacs file, I can copy ...
1
vote
0
answers
275
views
emacs-pgtk for WSL2 - identification and clipboard issues
I installed emacs-pgtk version 29.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) from the git repo following these instructions with
./configure --with-native-...
0
votes
2
answers
144
views
How to paste all images into emacs org-mode running in WSL in one directory
I got How to paste images into Emacs org-mode running in Windows Subsystem for Linux running, so I can paste images in emacs org-mode, but I would like to
get all images in the same directory, f.e. ~/...
0
votes
2
answers
63
views
How to add a hook to save things on kill-ring (or clipboard ring) before a frame is deleted?
Context:
I have been using an interesting software called Emacs Anywhere. It helps me bring emacs keybindings for stuff like this (editing text for a question on Stack Exchange). Overall, the software ...
0
votes
1
answer
66
views
Get MIME file-type of current temporary buffer without using a temporary file
I have this function:
(defun save-binary-content (binary path)
(let ((coding-system-for-write 'no-conversion))
(with-temp-buffer
(toggle-enable-multibyte-characters)
(set-buffer-file-coding-system ...
8
votes
3
answers
4k
views
Pasting images from clipboard into Orgmode
I have seen some posts on this but I decided to ask anyway since this is an important feature many users are requesting: the ability to copy an image from eg., Chrome and paste it into Emacs Orgmode ...
1
vote
0
answers
62
views
How to copy displayed ellipsis when buffer content is folded?
I have JSON files in which I am folding away some subnodes with the hideshow mode.
This works reasonably well. Now I want to create a new file or buffer with the folded content.
For example, my ...
3
votes
2
answers
251
views
Deleting words while preserving clipboard
Is there a way to keep the clipboard contents when deleting entire words with M-DEL?
For instance, I'd like to delete a word (M-DEL) and then paste (C-y) what I had previously copied (with ctrl+c) ...
3
votes
1
answer
931
views
How to copy commit hash from Magit status buffer?
After I open a Magit status buffer and make a commit, I commonly also want to copy that commit's hash (the shortened version) to my clipboard to post somewhere else.
I can't work out how this should ...
1
vote
1
answer
290
views
Cannot use `pbpaste` in Emacs to paste Chinese characters
I'm using macOS. I tried using the following command to paste from clipboard in Emacs(started with emacs -Q)
(call-process "/usr/bin/pbpaste" nil t nil)
It works fine for English characters,...
4
votes
0
answers
882
views
Pasting images into Org
I'd like to paste images from the system clipboard into an Org file. Emacs should write the clipboard content to a suitable file (likely an attachment) and insert a suitable link (see https://orgmode....
0
votes
0
answers
137
views
How can I remove clipboard from being the default register?
I'm using emacs with evil keybindings (specifically spacemacs).
The default behavior of the paste command p is to paste in the clipboard, and default behavior of the delete command d is to put the ...
2
votes
2
answers
821
views
Possible to access the second-last clipboard contents (clipboard history)
Is there a way to access the second last value of the clipboard in Emacs?
I assume it's possible to make this work within Emacs.
Intercept the copy function.
Read the clipboard and add it to a list.
...
2
votes
3
answers
425
views
How copy current line to the clipboard?
This Emacs Wiki page
says:
‘C-a C-SPC C-e M-w’ copies the current line without the newline.
But it doesn't work to me. I'm using Emacs 26. Is there some other shortcut?
P.S.
I use CUA keys in my ...
0
votes
1
answer
279
views
Running Emacs through X2Go, the bidirectional clipboard does not work, even though it works for other programs
Being in home-office due to the Corona outbreak, I am using Emacs and other programs through X2Go.
I am also running a terminal through GNU Screen in a MinTTY window, because scrolling the terminal ...
1
vote
1
answer
220
views
Copy to PRIMARY selection in command
I'm a novice in Lisp, so I feel like I'm missing something very basic here. My intention was to create a function/shortcut to remove all whitespace and newline chars from the selected text and copy ...
1
vote
2
answers
1k
views
How to save clipboard or (car kill-ring) as string
OS Debian GNU/Linux 7
emacs-24.3
I want to save the content of the clipboard or the last item of the kill-ring (depending whats newer) as a string so that I can do stuff with it in a eLisp function. ...
1
vote
1
answer
105
views
xclip-mode returns "Unknown upattern" and does not work
The command M-x xclip-mode returns the following info in *Messages*:
Eager macro-expansion failure: (error "Unknown upattern `(quote pbpaste)'") [2 times]
Xclip mode enabled
I cannot yank text from ...
0
votes
1
answer
120
views
xclip fails to set selection when using tramp
I use Emacs in the terminal (emacs -nw) and xclip.el for synchronising the kill ring with the X clipboard. Under normal circumstances this works fine, but when visiting buffers with tramp xclip is not ...
2
votes
1
answer
379
views
"File error" when using xclip
To enable copy and paste between X11 and emacs in terminal, I installed xclip via M-x package-install. There is xclip-1.4 in ~/.emacs.d/ with the following files:
xclip-autoloads.el xclip.el xclip....
2
votes
1
answer
263
views
How to retrieve the date under the cursor in emacs calendar as the format day.month.year like 15.07.2018
Is there a way to retrieve the date under the cursor in emacs calendar as the format day.month.year like 05.07.2018 as a clipboard content?
2
votes
3
answers
182
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, ...
2
votes
1
answer
839
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
0
answers
20
views
flyspell inserts clipboard on top of correction
for me flyspell is broken (or at least the default setup of it) in all versions of Emacs from 24.x - 25.x, running on OpenSuSE Leap 42.3 within KDE 5.8.7 Plasma Desktop.
The behavior is as follows: ...
5
votes
1
answer
730
views
saving clipboard takes forever on quit
When closing spacemacs, I get the message "Saving clipboard to x clipboard manager...". The saving process ends up taking so much time that I have to kill emacs from the terminal. How can I disable ...
0
votes
1
answer
189
views
evil "exchange-with-kill-ring"-operator?
I often find myself wanting to exchange some text object with whatever's currently in CLIPBOARD (not necessarily in Emacs' kill-ring, when I copy from other programs). But of course when I do ...
3
votes
2
answers
947
views
Copying a 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
1
answer
319
views
How can I use magit to diff some text with my clipboard?
I see others doing this in there IDEs is there a way to highlight a file or some text in a file and diff it with whats in my clipboard/kill-ring ?
4
votes
0
answers
151
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 ...
1
vote
1
answer
504
views
Handle long lines while pasting from clipboard without freezing emacs
I have a lengthy xml output from a rest endpoint, I copied if from chrome dev tools to clipboard and on pasting it into an org mode buffer inside an xml source block freezes emacs for a while.
I ...
1
vote
2
answers
3k
views
copy paste from/to GUI Emacs not working -- Windows 7
I have an issue with copy and paste from or to Emacs (GUI); as precised in the title, I'm using Windows 7. The Emacs version is 25.1.1
kill and yank are working properly though ; to copy or paste, I ...
2
votes
1
answer
836
views
How to send *shell* stdout directly to kill-ring?
Suppose that I have a *shell* buffer (i.e. a subordinate shell, started with M-x shell). Suppose also that at this shell's prompt, I can execute some command foo that sends some output to stdout.
I ...
2
votes
2
answers
7k
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 ...
1
vote
1
answer
523
views
Clipboard sharing broken in OS X Sierra
Just upgraded to Sierra, and if I try to copy or paste text, nothing goes through. Has anyone else experienced this problem? Any way to debug the prolem?
Apparently Sierra also broke copy/paste in ...
2
votes
2
answers
195
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
1
answer
207
views
How to prevent the active region from setting the primary selection?
After switching to 24.5.11 from some ancient version, Emacs started to spam my primary selection: Whenever I mark a region, or even move the point using e.g. arrow keys when the mark is active, a new ...
5
votes
0
answers
207
views
Emacs: mark contents as type image in copy to clipboard
When using pdf-tools (https://github.com/politza/pdf-tools) I'd like to be able to select and area and copy it to the clipboard as an image, so as to insert into other applications. Selecting is easy ...
4
votes
0
answers
931
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
1
answer
1k
views
Copy-text-to-clipboard-link
I would like to copy a defined text-link to the clipboard by mouse-1 or C-c,C-o. Something like file+sys: that just does not open the file it should copy the following text to the clipboard. Is a ...
0
votes
3
answers
485
views
Change dd command in evil mode to not write to clipboard
I would like to use normal modes commands like d c x etc without the content being copied to clipboard.
I want to make emacs so that only y command will write anything to the clipboard. Other ...
3
votes
2
answers
749
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 ...
3
votes
1
answer
2k
views
Clipboard manager will not work in terminal Emacs
Emacs 25.1.50, GTK+ version 3.18.9 on GNU/Linux, version 4.4.
Gnome-terminal as xterm terminal emulator.
When using clipboard (as in, I copy some text from my operating system/browser), and paste it ...
8
votes
2
answers
674
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 ...
0
votes
1
answer
45
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 ...
21
votes
1
answer
5k
views
evil-mode visual selection copies text to clipboard automatically
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:
...