summaryrefslogtreecommitdiff
path: root/org-conf.el
diff options
context:
space:
mode:
Diffstat (limited to 'org-conf.el')
-rw-r--r--org-conf.el28
1 files changed, 15 insertions, 13 deletions
diff --git a/org-conf.el b/org-conf.el
index c9e2cf5..0170be3 100644
--- a/org-conf.el
+++ b/org-conf.el
@@ -10,6 +10,7 @@
(setq org-hide-emphasis-markers nil)
(setq org-hide-macro-markers nil)
(setq org-hide-leading-stars nil)
+(setq org-return-follows-link t)
;; tempo
@@ -260,7 +261,7 @@ in Lisp code use `org-set-tags' instead."
(format "%s\n :PROPERTIES:\n :cost: %s\n :FROM: %s\n :RECORD_TIME: %s\n :END: \n %s%%?"
which cost from inactive-time shop-and-items)))
-(require 'org-ptotocol)
+(require 'org-protocol)
(setq org-capture-templates
'(("d" "Record Diaries" entry
@@ -423,17 +424,18 @@ in Lisp code use `org-set-tags' instead."
;;;###autoload
(defun org-filtered-link ()
"Filter out some unnecessary parts in the link description"
- (let* ((link (plist-get org-store-link-plist :link))
- (title (plist-get org-store-link-plist :description))
- (filtered (cond ((string-match-p " - Mathematics Stack Exchange" title)
- (replace-match "" nil nil title))
- ((string-match-p " - YouTube" title)
- (replace-match "" nil nil title))
- ((string-match-p "\\(.*?\\)最新章节列表,\\1无弹窗_UU看书" title)
- (replace-match "\\1" nil nil title))
- (t
- title))))
- (org-make-link-string link filtered)))
+ (save-match-data
+ (let* ((link (plist-get org-store-link-plist :link))
+ (title (plist-get org-store-link-plist :description))
+ (filtered (cond ((string-match " - Mathematics Stack Exchange" title)
+ (replace-match "" nil nil title))
+ ((string-match " - YouTube" title)
+ (replace-match "" nil nil title))
+ ((string-match "\\(.*?\\)最新章节列表,\\1无弹窗_UU看书" title)
+ (replace-match "\\1" nil nil title))
+ (t
+ title))))
+ (org-link-make-string link filtered))))
;; Determine tag based upon the URL
;;;###autoload
@@ -468,7 +470,7 @@ If DESC is non-`nil', then it is the description of the new link."
(interactive)
;;; HACK: Refocus the selected frame.
;;; I was doing this in the applescript. But for some reason it is messed up. So
-;;; I let emacs gain focus by itself now.
+;;; I let Emacs gain focus by itself now.
(select-frame-set-input-focus (selected-frame))
(let* ((tags (completing-read "tag: " '("roman-ARCHIVE"
"web_link-ARCHIVE")