Skip to content

Commit

Permalink
this fixes so you can run jedi:goto-definition from inside an org-bab…
Browse files Browse the repository at this point in the history
…el src-code dedicated buffer - opened with C-c '
  • Loading branch information
methuselah-0 committed Oct 22, 2020
1 parent 9d5f291 commit 4006866
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions jedi-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@

(defconst jedi:version "0.2.8")

(defvar jedi:source-dir (if load-file-name
(file-name-directory load-file-name)
default-directory))
(defvar jedi:source-dir
(if (string-match "\*Org Src" (buffer-name (current-buffer)))
(file-name-directory (buffer-file-name (org-src-source-buffer (current-buffer))))
(if load-file-name
(file-name-directory load-file-name)
default-directory)))

(defvar jedi:epc nil)
(make-variable-buffer-local 'jedi:epc)
Expand Down

0 comments on commit 4006866

Please sign in to comment.