diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/km-org.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/km-org.el b/lisp/km-org.el index 9f7c8f8..9cc1ff5 100644 --- a/lisp/km-org.el +++ b/lisp/km-org.el @@ -654,6 +654,14 @@ to be easily overriden.") (buffer-substring-no-properties (region-beginning) (region-end))) (thing-at-point 'filename)))) + (when (and file + (derived-mode-p 'latex-mode) + (string-match (rx (zero-or-one "includegraphics") + "{" + (group (one-or-more not-newline)) + "}") + file)) + (setq file (match-string-no-properties 1 file))) (if (and file (file-exists-p file)) (org-open-file file) (km/org-open-file))))) |