[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/webpaste 7bd2cec 148/298: Added support to open created pa
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/webpaste 7bd2cec 148/298: Added support to open created pastes in browser |
Date: |
Thu, 9 Dec 2021 19:00:03 -0500 (EST) |
branch: elpa/webpaste
commit 7bd2cec67ba7325888e28d27f15f52491dba9aa7
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>
Added support to open created pastes in browser
This fixes #4.
---
README.org | 14 ++++++++++++++
webpaste.el | 11 +++++++++++
2 files changed, 25 insertions(+)
diff --git a/README.org b/README.org
index d118653..04ea75a 100644
--- a/README.org
+++ b/README.org
@@ -68,6 +68,20 @@ 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
+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.
+
+Example:
+#+begin_src emacs-lisp :tangle yes
+ ;; Open recently created pastes in an external browser
+ (setq webpaste/open-in-browser t)
+#+end_src
+
+Can also be put in the =:config= section of =use-package= the same way as the
+provider definitions above.
+
** TODO Providers to implement [6/10]
- [X] ptpb.pw
- [X] ix.io
diff --git a/webpaste.el b/webpaste.el
index 0aed885..d7bd5a7 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -58,6 +58,13 @@ default to all providers in order defined in
‘webpaste-providers’ list."
"Prompt for a yes/no confirmation before attempting to paste a region or
buffer."
:group 'webpaste)
+
+(defcustom webpaste/open-in-browser nil
+ "Open recently created pastes in a browser.
+
+This uses `browse-url-generic' to open URLs."
+ :group 'webpaste)
+
(defvar webpaste/tested-providers ()
@@ -369,6 +376,10 @@ return it to the user."
;; Reset tested providers after successful paste
(setq webpaste/tested-providers nil)
+ ;; If the user want to open the link in an external browser, do so.
+ (when webpaste/open-in-browser
+ (browse-url-generic returned-url))
+
;; Add RETURNED-URL to killring for easy pasting
(kill-new returned-url)
- [nongnu] elpa/webpaste 4e410b0 272/298: Add example config to README with 'pasting buffer OR region' function, (continued)
- [nongnu] elpa/webpaste 4e410b0 272/298: Add example config to README with 'pasting buffer OR region' function, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 0760361 278/298: docs: Fix all warnings regarding docstrings, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 5e963e8 275/298: Fix bug in webpaste-paste-buffer-or-region when you don't have a region, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 9662b1c 280/298: Bump version number and copyright year, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 3c9d2e8 284/298: Merge branch 'github-actions', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 4ec1645 297/298: Readme: Update branch name, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 92a5867 088/298: Spaces, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste ca539eb 101/298: Rename and update tests for provider priority, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste ee5b4ed 141/298: Move function declaration of the get-lang-alist-with-overrides function up, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 0df8ea0 144/298: Hide some options from customize, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 7bd2cec 148/298: Added support to open created pastes in browser,
ELPA Syncer <=
- [nongnu] elpa/webpaste d37a904 160/298: Fix POST bug for several providers, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 30e78d6 164/298: Refactored the error callbacks, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d27e571 182/298: Added integration tests for paste.pound-python.org, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 76d4ddb 162/298: Update test to test the right function, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 4937b30 177/298: Change integration test to contain a link to webpaste in the pasted message, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 6b0043b 181/298: Added integration tests for dpaste.de, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 505ffb3 189/298: Switched all webpaste/whatever to webpaste-watever to comply with elisp guidelines, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 0546284 176/298: Added types to some defcustom missing it, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 321e6a4 191/298: Added more details for contributing, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 26b4d21 192/298: Added test of appending mode name to post data, ELPA Syncer, 2021/12/09