Fix org-board-open-with advice
This commit is contained in:
parent
46ca98bd12
commit
b7bf077b7f
@ -1943,15 +1943,17 @@ Intelligently inserts an org-mode link from the clipboard.
|
|||||||
;; Use w3m instead of eww to open org-board archived links
|
;; Use w3m instead of eww to open org-board archived links
|
||||||
(advice-add 'org-board-open-with :around
|
(advice-add 'org-board-open-with :around
|
||||||
(lambda (oldfn filename-string arg &rest args)
|
(lambda (oldfn filename-string arg &rest args)
|
||||||
(if (and filename-string
|
(cond
|
||||||
|
((not (file-exists-p filename-string)) 1)
|
||||||
|
((and filename-string
|
||||||
(or (and arg (eq org-board-default-browser 'system))
|
(or (and arg (eq org-board-default-browser 'system))
|
||||||
(and (not arg) (eq org-board-default-browser 'eww))))
|
(and (not arg) (eq org-board-default-browser 'eww))))
|
||||||
(let ((filename (concat "file://"
|
(let ((filename (concat "file://"
|
||||||
(s-chop-prefix "file://"
|
(s-chop-prefix "file://"
|
||||||
filename-string))))
|
filename-string))))
|
||||||
(w3m filename t)
|
(w3m filename t)
|
||||||
0)
|
0))
|
||||||
(apply oldfn filename-string arg args))))
|
(:else (apply oldfn filename-string arg args)))))
|
||||||
:general
|
:general
|
||||||
(org-mode-map "C-c b" org-board-keymap))
|
(org-mode-map "C-c b" org-board-keymap))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
Loading…
Reference in New Issue
Block a user