Skip to content

Commit 2bc1055

Browse files
author
methuselah-0
committed
support jedi:goto-definition from within dedicated src-block buffers in org-babel
1 parent 9d5f291 commit 2bc1055

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jedi-core.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,10 @@ See also: `jedi:server-args'."
711711
(defun jedi:-buffer-file-name ()
712712
"Return `buffer-file-name' without text properties.
713713
See: https://github.com/tkf/emacs-jedi/issues/54"
714-
(substring-no-properties (or (buffer-file-name) "")))
714+
(substring-no-properties (or (if (string-match "\*Org Src" (buffer-name (current-buffer)))
715+
(buffer-file-name (org-src-source-buffer))
716+
(buffer-file-name))
717+
"")))
715718

716719
(defun jedi:call-deferred (method-name)
717720
"Call ``Script(...).METHOD-NAME`` and return a deferred object."

0 commit comments

Comments
 (0)