Fix clipboard issue for macOS and Windows#66
Conversation
|
Hello, I appreciate your trying to solve this, but I have doubts about this being the best solution. Emacs supports MacOS, so it seems like it should be able to get the clipboard contents without calling a third-party shell command. As well, there are several third-party builds of Emacs for Macs, some of which may have extra code for integrations like this. I'd be grateful if you'd file a new issue with all the relevant information, and then we can research the most appropriate way to solve the problem on MacOS. Thanks. |
|
I see and I understand your concern. I have macOS and Debian laptop so I tested these commands on both and here is the result: Clipboard related command outputs differences on macOS and LinuxWhen text inside clipboard copied from the browser is : macOS
(gui-get-selection 'CLIPBOARD)
(shell-command-to-string "pbpaste")
(current-kill 0)Linux
(gui-get-selection 'CLIPBOARD)
(shell-command-to-string "pbpaste")
(current-kill 0)About
|
|
Thanks for investigating that.
That seems like the way to do it, then. |
|
Thank you for the review. This bug on macOS was killing me since I started using your package from last week. Any improvements you can suggest would be greatly appreciated. |
|
I have a Windows machine also and out of my curiosity, I tried this package on WSL Ubuntu. So I updated the code to only use Hopefully this helps. |
|
Thank you. As a final adjustment, this PR could have two minor optimizations:
Let me know if you want to do those yourself, in which case the changelog can be updated and the PR can be merged. |
8905482 to
5ffdfd9
Compare
|
Thanks for the review! I cleaned up the commit history and fixed the code as you instructed. |
pbpaste when macOS|
@askdkc Thanks for your work on this! |
|
You're welcome! Now I can insert links with titles into my org note files smoothly😄 Thank you for creating this useful package!! |
This PR provides fix for issue #62
When using this package on macOS,
org-web-tools--get-first-urlneeds to usepbpasteinstead oforg-web-tools--get-first-url, otherwise, it cannot get URL from clipboard.Update: 2023-12-13
The Issue at #62 is likely just a DNS glitch.
However, the clipboard bug is causing problems for
org-web-toolson macOS and Windows.This pull request addresses and resolves both of these issues on these platforms.