[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving to a literate file for .emacs

From: Immanuel Litzroth
Subject: Re: Moving to a literate file for .emacs
Date: Mon, 4 Jul 2022 19:49:31 +0200

It's possible to let tangling generate comments that will link back to the
literate file where you defined the function.
See the comment header arg.

Then you could advise the relevant functions that do emacs function lookup
to check whether there's such a "link comment" near the definition and jump
to that instead.

All this is rather hackish and I stopped doing my init files in literate org.

On Mon, Jul 4, 2022 at 4:07 PM Stephen Eglen <sje30@cam.ac.uk> wrote:
> I see many users are switching to using a 'literate programming'
> approach to tangling their .emacs file from an org file.
> Has anyone solved the following problem though?  If I have a file called
> config.org containing:
> * test
> #+begin_src emacs-lisp
>   (defun quick-test ()
>     "interactive"
>     (* 3 9)
>   )
> #+end_src
> and then in my .emacs file I do:
> (org-babel-load-file "~/config.org")
> quick-test is indeed defined, but when I do C-c f RET quick-test RET it
> takes me to config.el (a tangled file, suitable for computers, not
> humans), rather than config.org.  Is it possible instead to get the
> editor to jump to the definition in config.org?
> Stephen

-- A man must either resolve to point out nothing new or to become a
slave to defend it. -- Sir Isaac Newton

reply via email to

[Prev in Thread] Current Thread [Next in Thread]