[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/webpaste cac4979 173/298: Added option to send returned UR
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/webpaste cac4979 173/298: Added option to send returned URL to clpboard |
Date: |
Thu, 9 Dec 2021 19:00:08 -0500 (EST) |
branch: elpa/webpaste
commit cac4979ca7381eeefae0fbbc6ce244e539f59a27
Author: Nathan Aclander <naclander@linux.ucla.edu>
Commit: Nathan Aclander <naclander@linux.ucla.edu>
Added option to send returned URL to clpboard
If simpleclip is installed, users can send their returned URL to the
clipboard by setting webpaste/copy-to-clipboard to a non-nil value.
This change also adds webpaste/add-to-killring so that sending the URL
to the killring can be disabled, although to keep the same default
behavior the var's value is set to t by default.
The README is also updated to reflect these new options.
---
README.org | 21 ++++++++++++++++++++-
webpaste.el | 20 ++++++++++++++++----
2 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/README.org b/README.org
index 95a1baf..1d7b7f7 100644
--- a/README.org
+++ b/README.org
@@ -68,7 +68,26 @@ Example:
Can also be put in the =:config= section of =use-package= the same way as the
provider definitions above.
-*** Open recently created pastes in browser
+*** View recently created pastes
+Webpaste gives you several options to view your succesful paste.
+
+**** Send the returned URL to the killring
+This is webpaste's default behavior. After a succesfull paste, the returned URL
+from the provider will be sent to the killring. You can disable this with
+
+#+BEGIN_SRC emacs-lisp
+(setq webpaste/add-to-killring nil)
+#+END_SRC
+
+**** Copy URL to the clipboard
+If you have [[https://github.com/rolandwalker/simpleclip][simpleclip]]
installed, you can copy the returned URL to the
+clipboard. You can enable this with
+
+#+BEGIN_SRC emacs-lisp
+(setq webpaste/copy-to-clipboard t)
+#+END_SRC
+
+**** Open the recently created paste in the browser
To enable opening of recently created pastes in an external browser, you can
enable the option =webpaste/open-in-browser= by setting this value to a
non-nil value.
diff --git a/webpaste.el b/webpaste.el
index dc9b240..2ce5409 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -65,6 +65,14 @@ default to all providers in order defined in
‘webpaste-providers’ list."
This uses `browse-url-generic' to open URLs."
:group 'webpaste)
+(defcustom webpaste/copy-to-clipboard nil
+ "Uses simpleclip to send the provider's returned URL to the clipboard"
+ :group 'webpaste)
+
+(defcustom webpaste/add-to-killring t
+ "Add the returned URL to the killring after paste"
+ :group 'webpaste)
+
(defvar webpaste/tested-providers ()
@@ -388,11 +396,15 @@ return it to the user.")
(when webpaste/open-in-browser
(browse-url-generic returned-url))
- ;; Add RETURNED-URL to killring for easy pasting
- (kill-new returned-url)
+ ;; Send RETURNED-URL to the clipboard using simpleclip
+ (when webpaste/copy-to-clipboard
+ (simpleclip-set-contents returned-url)
+ (message "URL copied to clipboard. "))
- ;; Notify user
- (message "Added %S to kill ring." returned-url))
+ ;; Add RETURNED-URL to killring for easy pasting
+ (when webpaste/add-to-killring
+ (kill-new returned-url)
+ (message (format "Added %S to kill ring." returned-url))))
- [nongnu] elpa/webpaste d2ed48a 156/298: Added unit test for appending of language to returning links, (continued)
- [nongnu] elpa/webpaste d2ed48a 156/298: Added unit test for appending of language to returning links, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 899e08e 157/298: Change install method of emacs in travis for faster build times, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste e87a37c 158/298: Switched from ert to buttercup for testing, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 865ff10 159/298: Disable this test for now since it breaks, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 59fd22f 161/298: Merge branch 'naclander-POST-bug', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d475f02 170/298: Added integration test for ptpb.pw, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 95de0b8 169/298: Remove sync as a provider parameter on creation and add it on execution, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste fd4332a 172/298: Merge branch 'test-providers-on-travis', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 60c0a98 167/298: Added printing of travis event type, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d0442ad 168/298: Renamed all unit tests to make it easier for integration tests, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste cac4979 173/298: Added option to send returned URL to clpboard,
ELPA Syncer <=
- [nongnu] elpa/webpaste db393a1 175/298: Merge branch 'naclander-copy-to-clipboard', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 92f309e 188/298: Added a contributing guidelines file, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste ddd2fca 186/298: Added tests for success lambdas, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 2a05d02 194/298: Added supports for custom hooks when returning URLs. This fixes #22., ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste b96e411 204/298: Moved the paste message to be a variable used for all integration tests, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 26f089e 201/298: Rename webpaste-paste-text and webpaste-paste-text-to-provider to be in "private scope", ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 90a96d2 199/298: Change emacs-lisp-mode from elisp to clojure for sprunge.us, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 4b32baa 203/298: Rename all the lambdas to private scopes, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste cc9ba3d 202/298: Begin autoloading of the webpaste group, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste aed3e00 210/298: Bump version for new release, ELPA Syncer, 2021/12/09