[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/luwak e0408b2cb6 15/28: org store and capture
From: |
ELPA Syncer |
Subject: |
[elpa] externals/luwak e0408b2cb6 15/28: org store and capture |
Date: |
Tue, 25 Oct 2022 15:57:54 -0400 (EDT) |
branch: externals/luwak
commit e0408b2cb6dd773a512a15c55dfe46e4babed654
Author: Yuchen Pei <hi@ypei.me>
Commit: Yuchen Pei <hi@ypei.me>
org store and capture
---
luwak.el | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/luwak.el b/luwak.el
index c8e5470df7..88946f4ac7 100644
--- a/luwak.el
+++ b/luwak.el
@@ -89,6 +89,24 @@ When non-nill, swap the tor-switch in prefix-arg effect."
index))
(reverse index)))
+(defun luwak-guess-title ()
+ (save-excursion
+ (goto-char (point-min))
+ (re-search-forward "^[^[:space:]]" nil t)
+ (buffer-substring-no-properties (1- (point))
+ (progn (end-of-line 1) (point)))))
+
+(defun luwak-org-store-link ()
+ (when (derived-mode-p 'luwak-mode)
+ (org-link-store-props
+ :type "luwak"
+ :link (plist-get luwak-data :url)
+ :description (luwak-guess-title))))
+
+(org-link-set-parameters "luwak"
+ :follow #'luwak-open
+ :store #'luwak-org-store-link)
+
(defun luwak-open (url)
"Open URL in luwak."
(interactive "sUrl to open: ")
- [elpa] branch externals/luwak created (now ec97058718), ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 1899e7903a 19/28: typo, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 7652f876d0 08/28: display tor status, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 8e7da0d089 10/28: making using tor a user option, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 5e72329d3a 03/28: some more convenient keys, as well as removal of ref section, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 3c337adc87 07/28: removing deps on eww, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak ea6a1c4c2d 18/28: removing an unused fun, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 3af6104fe5 13/28: make link render a user option and add dump to a file, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak e0408b2cb6 15/28: org store and capture,
ELPA Syncer <=
- [elpa] externals/luwak 05f5fef4bf 17/28: history and follow numbered link, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 0c1b6e97ab 11/28: docstring minor, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 8373015f75 21/28: Prepare for ELPA submission, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 2d11ff50d6 25/28: toggle default tor switch., ELPA Syncer, 2022/10/25
- [elpa] externals/luwak aa846e8484 20/28: fixing some compiling error, as well as bugs, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak b86519f50b 06/28: updating docs about torsocks, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 179461ba0e 14/28: adding link rendering toggle, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 12692b1207 05/28: adding gitignore, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 9341d7ac6b 01/28: initial commit, ELPA Syncer, 2022/10/25
- [elpa] externals/luwak 39ac2162c5 02/28: adding luwak-mode, ELPA Syncer, 2022/10/25