Skip to content

Commit 4a64532

Browse files
committed
fix: preview org files with mdopen
1 parent f179ea1 commit 4a64532

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

grip-mode.el

+3-3
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,12 @@ Use default browser unless `xwidget' is available."
169169
(unless (and grip-mdopen-path (executable-find grip-mdopen-path))
170170
(grip-mode -1) ; Force to disable
171171
(user-error "The `mdopen' is not available in PATH environment"))
172-
(when buffer-file-name
172+
(when grip--preview-file
173173
(setq grip--process
174174
(start-process "mdopen" "*mdopen*"
175175
grip-mdopen-path
176-
buffer-file-name))
177-
(message "Preview `%s' with mdopen" buffer-file-name)))
176+
grip--preview-file))
177+
(message "Preview `%s' on %s" buffer-file-name (grip--preview-url))))
178178
(progn
179179
(unless (and grip-binary-path (executable-find grip-binary-path))
180180
(grip-mode -1) ; Force to disable

0 commit comments

Comments
 (0)