From a0305418ae84f39bc48bb703653a3a73afd7154d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Feb 2017 02:11:24 -0500 Subject: [PATCH] Remove f.el references --- modules/lang/org/+attach.el | 2 +- modules/lang/org/autoload/attach.el | 2 +- modules/lang/org/autoload/evil.el | 6 +++--- modules/lang/web/config.el | 4 ++-- modules/tools/macos/autoload.el | 13 +++++++------ modules/ui/doom-dashboard/config.el | 2 +- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/modules/lang/org/+attach.el b/modules/lang/org/+attach.el index ca22a73bc..d3ec3a374 100644 --- a/modules/lang/org/+attach.el +++ b/modules/lang/org/+attach.el @@ -31,7 +31,7 @@ ;; Write download paths relative to current file (advice-add 'org-download--dir-2 :override 'ignore) (defun +org*download-fullname (path) - (file-relative-name path (f-dirname (buffer-file-name)))) + (file-relative-name path (file-name-directory (buffer-file-name)))) (advice-add 'org-download--fullname :filter-return '+org*download-fullname) ;; Add another drag-and-drop handler that will handle anything but image files diff --git a/modules/lang/org/autoload/attach.el b/modules/lang/org/autoload/attach.el index 416445b6f..790c36ab4 100644 --- a/modules/lang/org/autoload/attach.el +++ b/modules/lang/org/autoload/attach.el @@ -1,7 +1,7 @@ ;;; lang/org/autoload/attach.el (defun doom--org-attach-icon (path) - (char-to-string (pcase (downcase (f-ext path)) + (char-to-string (pcase (downcase (file-name-extension path)) ("jpg" ?) ("jpeg" ?) ("png" ?) ("gif" ?) ("pdf" ?) ("ppt" ?) ("pptx" ?) diff --git a/modules/lang/org/autoload/evil.el b/modules/lang/org/autoload/evil.el index ac06a1a5a..f30805734 100644 --- a/modules/lang/org/autoload/evil.el +++ b/modules/lang/org/autoload/evil.el @@ -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) diff --git a/modules/lang/web/config.el b/modules/lang/web/config.el index 48a740e6a..8233c0e8d 100644 --- a/modules/lang/web/config.el +++ b/modules/lang/web/config.el @@ -16,9 +16,9 @@ ;; (lambda (&rest _) ;; (let* ((project-path (doom-project-root)) ;; (hash (gethash project-path bower-conf)) -;; (package-file (f-expand "bower.json" project-path)) +;; (package-file (expand-file-name "bower.json" project-path)) ;; deps) -;; (awhen (and (not hash) (f-exists? package-file) +;; (awhen (and (not hash) (file-exists-p package-file) ;; (ignore-errors (json-read-file package-file))) ;; (puthash project-path it bower-conf))) ;; t)) diff --git a/modules/tools/macos/autoload.el b/modules/tools/macos/autoload.el index 0de4d04d5..6668ea4c5 100644 --- a/modules/tools/macos/autoload.el +++ b/modules/tools/macos/autoload.el @@ -4,12 +4,13 @@ (defun +macos-open-with (&optional app-name path) "Send PATH to APP-NAME on OSX." (interactive) - (let* ((path (f-full (replace-regexp-in-string - "'" "\\'" - (or path (if (eq major-mode 'dired-mode) - (dired-get-file-for-visit) - (buffer-file-name))) - nil t))) + (let* ((path (expand-file-name + (replace-regexp-in-string + "'" "\\'" + (or path (if (eq major-mode 'dired-mode) + (dired-get-file-for-visit) + (buffer-file-name))) + nil t))) (command (format "open %s" (if app-name (format "-a %s '%s'" (shell-quote-argument app-name) path) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 25401eafe..7d27845e5 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -194,7 +194,7 @@ whose dimensions may not be fully initialized by the time this is run." "tools" :face 'font-lock-keyword-face) (propertize " Edit emacs.d" 'face 'font-lock-keyword-face)) - 'action '(lambda (_) (find-file (f-expand "init.el" doom-emacs-dir))) + 'action '(lambda (_) (find-file (expand-file-name "init.el" doom-emacs-dir))) 'follow-link t) (when last-session-p