Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org-babel Support? #441

Open
Addlai opened this issue Oct 18, 2023 · 2 comments
Open

org-babel Support? #441

Addlai opened this issue Oct 18, 2023 · 2 comments

Comments

@Addlai
Copy link

Addlai commented Oct 18, 2023

I'm surprised if this hasn't been addressed somewhere, but my searches turned up nothing.

To be clear, what I'm asking is if I'm editing code using a literate style with org-babel, can dumb-jump jump me from a function use in an org-mode source block to the definition of the function in another org-mode source block. (Or, if the definition wasn't tangled from org-babel, then the definition in the code file.) My impression is that most heavy users of Emacs are using org-babel for a lot of things, like Emacs init file for instance. My init file has almost 12000 lines, much of which is custom lisp code, so I do some jumping around.

@jacktasia
Copy link
Owner

If it's an actual file and not just a buffer, it should be pretty straightforward to make this work and is very similar to #135

Happy to accept a PR or if you can provide a minimal example file I will try.

@NightMachinery
Copy link

NightMachinery commented Oct 25, 2024

@jacktasia Can I forcefully make dumb-jump use Python's rules for .org files?

Update: I did this myself using o1. It seems to work fine!

 (defun night/h-dumb-jump-add-python-rules-to-org ()
  "Add Python rules to Org mode in Dumb Jump."
  (interactive)
  (let ((python-rules (cl-remove-if-not (lambda (rule)
                                          (string= (plist-get rule :language) "python"))
                                        dumb-jump-find-rules)))
    (setq dumb-jump-find-rules
          (append dumb-jump-find-rules
                  (mapcar (lambda (rule)
                            (plist-put (copy-tree rule) :language "org"))
                          python-rules)))))
                          
(night/h-dumb-jump-add-python-rules-to-org)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants