rexim / org-cliplink

Insert org-mode links from clipboard
327 stars 11 forks source link

feat(clipboard): add an option to specify clipboard source #112

Closed 15cm closed 6 years ago

15cm commented 6 years ago

Add a custom var org-cliplink-simpleclip-source to specify clipboard source.

System clipboard will be used only if org-cliplink-simpleclip-source is t and simpleclip-get-contents is defined.

Documents about the dependency of simpleclip.el needs to be added for this option later.

rexim commented 6 years ago

@15cm looks good! Thanks for the contribution!

15cm commented 6 years ago

Thanks for merging. BTW, it will be helpful if you can add document for this option when you have time.

rexim commented 6 years ago

@15cm yeah, I created an issue for that #113. I will document it when I have spare time. :)

15cm commented 6 years ago

Totally agree with you. I was not clear how to handle dependency in Elisp. Modified the PR based on your suggestion. Let's see how it goes when GitHub is up.

On Sun, Oct 21, 2018 at 9:56 PM Alexey Kutepov notifications@github.com wrote:

@rexim requested changes on this pull request.

In org-cliplink.el https://github.com/rexim/org-cliplink/pull/112#discussion_r226890245:

@@ -403,8 +403,63 @@ Used when the current transport implementation is set to :group 'org-cliplink :type '(repeat string))

+(defcustom org-cliplink-clipboard-source-is-system nil

Honestly, I'm not a big fan of simply copy-pasting a big chunk of code from another project and be done with it. Could we just integrate with simpleclip?

We could create a custom var org-cliplink-simpleclip-source and when it's true, check that simpleclip is installed and call simpleclip-get-contents.

After all the simpleclip devs may introduce useful changes to that function and copy-pasting them over and over again is not a good idea.

In org-cliplink.el https://github.com/rexim/org-cliplink/pull/112#discussion_r226890309:

@@ -403,8 +403,63 @@ Used when the current transport implementation is set to :group 'org-cliplink :type '(repeat string))

+(defcustom org-cliplink-clipboard-source-is-system nil

Honestly, I'm not a big fan of simply copy-pasting a big chunk of code from another project and be done with it. Could we just integrate with simpleclip?

We could create a custom var org-cliplink-simpleclip-source and when it's true, check that simpleclip is installed and call simpleclip-get-contents.

After all the simpleclip devs may introduce useful changes to that function and copy-pasting them over and over again is not a good idea.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rexim/org-cliplink/pull/112#pullrequestreview-166813530, or mute the thread https://github.com/notifications/unsubscribe-auth/AHZmxHCcffT0PyoV9EHjZCIjyXS0iUAGks5unSXMgaJpZM4Xysqi .