Remove f.el references

This commit is contained in:
Henrik Lissner 2017-02-25 02:11:24 -05:00
parent 7ed243a398
commit a0305418ae
6 changed files with 15 additions and 14 deletions

View file

@ -17,7 +17,7 @@
(user-error "Not in an org-mode buffer"))
(if uri
(let* ((rel-path (org-download--fullname uri))
(new-path (f-expand rel-path))
(new-path (expand-file-name rel-path))
(image-p (image-type-from-file-name uri)))
(cond ((string-match-p (concat "^" (regexp-opt '("http" "https" "nfs" "ftp" "file")) ":/") uri)
(url-copy-file uri new-path))
@ -33,8 +33,8 @@
(format "[[./%s]] " rel-path)
(format "%s [[./%s][%s]] "
(doom--org-attach-icon rel-path)
rel-path (f-filename rel-path)))))
(when (string-match-p (regexp-opt '("jpg" "jpeg" "gif" "png")) (f-ext rel-path))
rel-path (file-name-nondirectory (directory-file-name rel-path))))))
(when (string-match-p (regexp-opt '("jpg" "jpeg" "gif" "png")) (file-name-extension rel-path))
(org-redisplay-inline-images)))
(let ((default-directory ".attach/"))
(if (file-exists-p default-directory)