Propertize url in upload message as link

This commit is contained in:
TEC 2023-01-20 00:09:36 +08:00
parent e2a364c1a1
commit 420eae2388
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 4 additions and 2 deletions

View File

@ -519,7 +519,8 @@ Note: you have to define this yourself, there is no default."
((pred stringp) (string-trim-right (shell-command-to-string (format screenshot-upload-fn screenshot--tmp-file))))
(_ (error "Upload function is not a function or string!")))))
(gui-select-text url)
(message "Screenshot uploaded, link copied to clipboard (%s)" url)))
(message "Screenshot uploaded, link copied to clipboard (%s)"
(propertize url 'face 'link))))
(delete-file screenshot--tmp-file))
(defcustom screenshot-text-upload-fn #'screenshot-ixio-upload
@ -554,7 +555,8 @@ return a URL."
(point-min) (point-max)))))
(setq url (funcall screenshot-text-upload-fn (point-min) (point-max)))
(gui-select-text url)
(message "Screenshot uploaded, link copied to clipboard (%s)" url))))
(message "Screenshot uploaded, link copied to clipboard (%s)"
(propertize url 'face 'link)))))
;;; Screenshot transient