diff --git a/emacs/init.org b/emacs/init.org index d90ba16..f70c485 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -1943,15 +1943,17 @@ Intelligently inserts an org-mode link from the clipboard. ;; Use w3m instead of eww to open org-board archived links (advice-add 'org-board-open-with :around (lambda (oldfn filename-string arg &rest args) - (if (and filename-string - (or (and arg (eq org-board-default-browser 'system)) - (and (not arg) (eq org-board-default-browser 'eww)))) - (let ((filename (concat "file://" - (s-chop-prefix "file://" - filename-string)))) - (w3m filename t) - 0) - (apply oldfn filename-string arg args)))) + (cond + ((not (file-exists-p filename-string)) 1) + ((and filename-string + (or (and arg (eq org-board-default-browser 'system)) + (and (not arg) (eq org-board-default-browser 'eww)))) + (let ((filename (concat "file://" + (s-chop-prefix "file://" + filename-string)))) + (w3m filename t) + 0)) + (:else (apply oldfn filename-string arg args))))) :general (org-mode-map "C-c b" org-board-keymap)) #+END_SRC