diff options
author | Case Duckworth | 2022-10-17 21:41:28 -0500 |
---|---|---|
committer | Case Duckworth | 2022-10-17 21:41:28 -0500 |
commit | aab5bfd074e57d06a79e39d7c7c4760e1f385a06 (patch) | |
tree | 7b111190a44458a970355f7a327cc5278c850293 /lisp/+org-attach.el | |
parent | asoi (diff) | |
download | emacs-aab5bfd074e57d06a79e39d7c7c4760e1f385a06.tar.gz emacs-aab5bfd074e57d06a79e39d7c7c4760e1f385a06.zip |
Bankruptcy 9
Diffstat (limited to 'lisp/+org-attach.el')
-rw-r--r-- | lisp/+org-attach.el | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lisp/+org-attach.el b/lisp/+org-attach.el deleted file mode 100644 index 5e7cc7f..0000000 --- a/lisp/+org-attach.el +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | ;;; +org-attach.el --- Fixes for org-attach -*- lexical-binding: t; -*- | ||
2 | |||
3 | ;;; Commentary: | ||
4 | |||
5 | ;; `org-attach-attach' doesn't fix the path name. Before I submit a bug, I'm | ||
6 | ;; just fixing it by advising `org-attach-attach'. | ||
7 | |||
8 | ;;; Code: | ||
9 | |||
10 | (defun +org-attach-attach-fix-args (args) | ||
11 | "ADVICE for `org-attach-attach' to normalize FILE first. | ||
12 | VISIT-DIR and METHOD are passed through unchanged. | ||
13 | |||
14 | This should be applied as `:filter-args' advice." | ||
15 | (cons (expand-file-name (car args)) (cdr args))) | ||
16 | |||
17 | (define-minor-mode +org-attach-fix-args-mode | ||
18 | "Fix the arguments passed to `org-attach-attach'. | ||
19 | This mode normalizes the filename passed to `org-attach-attach' | ||
20 | so that links can be properly made." | ||
21 | :lighter "" | ||
22 | :keymap nil | ||
23 | :global t ; I figure, what does this hurt? | ||
24 | (if +org-attach-fix-args-mode | ||
25 | (advice-add 'org-attach-attach :filter-args #'+org-attach-attach-fix-args) | ||
26 | (advice-remove 'org-attach-attach #'+org-attach-attach-fix-args))) | ||
27 | |||
28 | (provide '+org-attach) | ||
29 | ;;; +org-attach.el ends here | ||