diff options
author | jao <jao@numenor.local> | 2011-04-17 20:59:57 +0200 |
---|---|---|
committer | jao <jao@numenor.local> | 2011-04-17 20:59:57 +0200 |
commit | 9202d6d179686f527a5b50d03ef7fd5abfb3bd65 (patch) | |
tree | 04d0e42825ab7c93ce95aeb74be25dfbc3d724c4 /org | |
parent | ef57ed13fdd8160ef9f9403f548100394f7145c8 (diff) | |
download | elibs-9202d6d179686f527a5b50d03ef7fd5abfb3bd65.tar.gz elibs-9202d6d179686f527a5b50d03ef7fd5abfb3bd65.tar.bz2 |
osx things
Diffstat (limited to 'org')
-rw-r--r-- | org/jao-org-links.el | 12 | ||||
-rw-r--r-- | org/jao-org-utils.el | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/org/jao-org-links.el b/org/jao-org-links.el index ca57f69..4ee4137 100644 --- a/org/jao-org-links.el +++ b/org/jao-org-links.el @@ -1,4 +1,6 @@ -(require 'org) +(require 'jao-org-utils) + +(autoload 'jao-as-safari-doc "jao-applescript.el") ;; doc links (defvar jao-org--sink-dir "./") @@ -26,4 +28,10 @@ (defun jao-org-links-setup (sink-dir) (setq jao-org--sink-dir (file-name-as-directory sink-dir))) -(provide 'jao-org-links)
\ No newline at end of file +(defun jao-org-insert-safari-link () + (interactive) + (let ((ln (jao-as-safari-doc))) + (when ln (jao-org-insert-link (car ln) (cdr ln))))) + + +(provide 'jao-org-links) diff --git a/org/jao-org-utils.el b/org/jao-org-utils.el index 535e8f4..ea87ec5 100644 --- a/org/jao-org-utils.el +++ b/org/jao-org-utils.el @@ -9,6 +9,9 @@ (interactive) (message "%s" (or (jao-org-link-at-point) "No link at point"))) +(defun jao-org-insert-link (url title) + (insert (format "[[%s][%s]]" url title))) + ;;; eldoc (defun jao-org-eldoc--hook () (set (make-local-variable 'eldoc-documentation-function) |