Add missing bits
This commit is contained in:
parent
b0419a4e77
commit
4c495efa3a
15
gists.org
15
gists.org
|
@ -730,6 +730,19 @@ Based on an answer at the [[https://emacs.stackexchange.com/a/77480/34645][Emacs
|
|||
* Create note with Denote from a URL :emacs:
|
||||
|
||||
#+begin_src elisp :tangle gists/denote-create-note-url.el
|
||||
(defconst my/termux-p (getenv "ANDROID_ROOT"))
|
||||
|
||||
(defun my/clipboard-get ()
|
||||
"Return the text on the system clipboard.
|
||||
|
||||
This function treats Termux systems differently, the clipboard is only
|
||||
accessible through the termux-clipboard-get commandline interface,
|
||||
part of the the termux-api package."
|
||||
|
||||
(if my/termux-p
|
||||
(shell-command-to-string "termux-clipboard-get")
|
||||
(current-kill 0)))
|
||||
|
||||
(defun my/get-url-title (url)
|
||||
"Attempt to retrieve the title string from the given URL.
|
||||
|
||||
|
@ -803,6 +816,8 @@ Based on an answer at the [[https://emacs.stackexchange.com/a/77480/34645][Emacs
|
|||
(denote-subdirectory-prompt))
|
||||
(org-set-property "URL" url))
|
||||
|
||||
;;; Elfeed integration
|
||||
|
||||
(defun my/elfeed/entry-url ()
|
||||
"Return the URL of the current elfeed entry."
|
||||
(when-let ((entry (or elfeed-show-entry
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
(defconst my/termux-p (getenv "ANDROID_ROOT"))
|
||||
|
||||
(defun my/clipboard-get ()
|
||||
"Return the text on the system clipboard.
|
||||
|
||||
This function treats Termux systems differently, the clipboard is only
|
||||
accessible through the termux-clipboard-get commandline interface,
|
||||
part of the the termux-api package."
|
||||
|
||||
(if my/termux-p
|
||||
(shell-command-to-string "termux-clipboard-get")
|
||||
(current-kill 0)))
|
||||
|
||||
(defun my/get-url-title (url)
|
||||
"Attempt to retrieve the title string from the given URL.
|
||||
|
||||
|
@ -71,6 +84,8 @@ looking at the <title> tags."
|
|||
(denote-subdirectory-prompt))
|
||||
(org-set-property "URL" url))
|
||||
|
||||
;;; Elfeed integration
|
||||
|
||||
(defun my/elfeed/entry-url ()
|
||||
"Return the URL of the current elfeed entry."
|
||||
(when-let ((entry (or elfeed-show-entry
|
||||
|
|
Loading…
Reference in a new issue