From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KBnzOa0ow2Ka3gAAbAwnHQ (envelope-from ) for ; Mon, 04 Jul 2022 19:51:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eEYSOa0ow2KGAgAAG6o9tA (envelope-from ) for ; Mon, 04 Jul 2022 19:51:41 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8C4D31E818 for ; Mon, 4 Jul 2022 19:51:41 +0200 (CEST) Received: from localhost ([::1]:34392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8QEW-0002IX-Aa for larch@yhetil.org; Mon, 04 Jul 2022 13:51:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8QD3-00015T-UD for emacs-orgmode@gnu.org; Mon, 04 Jul 2022 13:50:11 -0400 Received: from mail-yb1-xb36.google.com ([2607:f8b0:4864:20::b36]:33561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8QD2-0008CA-78 for emacs-orgmode@gnu.org; Mon, 04 Jul 2022 13:50:09 -0400 Received: by mail-yb1-xb36.google.com with SMTP id 76so2390933ybd.0 for ; Mon, 04 Jul 2022 10:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=APVpxf7NETGuKwcKl9aAycWNu1FfFcWrvxcg5GeF9gU=; b=K/VIigxmtzQ1mb2MOlVbC9O9x/7W1v4GY3gjzpCk2NmvPXxvkyolUcWq26Ahs/oF0/ b6eQbpLla6lGYayxpRRSJmMKoQm7Ql0VLXvJjINaMBzsCb/T9LdmwrBic7c8tKxGXPzp Zvg646AqH180WTOXY6hZ+DuiByOp1QtBwOhYleHWvEa/Gjkn9Lx9tRqviC8NHHbTz8L3 pgqjSMk/QotdxX4mQcJscc4WdwB1gWmQDGYY3Lrl1APdoyHDbhTODkC/aLlAB/iiJVWh d67UQBmPyXrawgv6ALzxl4dR9b1jsOZgGre+IEaOoXiOWUdcygpoVfJDupKO2jCs0y4y +rsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=APVpxf7NETGuKwcKl9aAycWNu1FfFcWrvxcg5GeF9gU=; b=kS7721ba9HP6/5ZpLY0OW+sUB5lMZDVp6BcJyrzkuO8OZ7wtLKuV2+7B8vY6R4CX91 VvosRu/B7/U+ODQCrVwBLvuwq1LkSaRjdYBdUH83PxrjYeGqlctDvgb/xbxEKmsUexdy gChhUn0XGDWwGY/zNO13iPIuaKuONL6hFHpX9rRiGc78hGbF+gSAnVcbGiUfdAuCqy6n Bg40mtxs1STx7a11UkvSvWnUFV9AqNP6Kjz8PhPruJIPu+ISLS3lJtHc58MUkYzpcMz6 oxR4uI61z2Tz4n4/Kkr4IjLNANnWYEYo7tAgjRHFSxUEbnWCFc+mHWLSWK1IXgh2gtu8 vrVg== X-Gm-Message-State: AJIora+uwXBr14oPgJ7vPUNqqo9kAVgBoV9foNDGv2Xn/LHlt9TmDsER mOJG8fonCnTPqyJhOI+zIqVFVOR2+SKFlotMzAPSeLDFqQ== X-Google-Smtp-Source: AGRyM1sqOSQ+8qzRHIctcrf+HIriAfTcLDJEFK7NLf5iQQuhhfJLjYAi8sR0OLV/qCaSGdiub2w8NLMVwi3vjcS87+A= X-Received: by 2002:a05:6902:f:b0:66e:3b23:8111 with SMTP id l15-20020a056902000f00b0066e3b238111mr9849174ybh.255.1656957006812; Mon, 04 Jul 2022 10:50:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Immanuel Litzroth Date: Mon, 4 Jul 2022 19:49:31 +0200 Message-ID: Subject: Re: Moving to a literate file for .emacs To: Stephen Eglen Cc: emacs-orgmode Mailinglist Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::b36; envelope-from=immanuel.litzroth@gmail.com; helo=mail-yb1-xb36.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656957101; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=APVpxf7NETGuKwcKl9aAycWNu1FfFcWrvxcg5GeF9gU=; b=PM7kQ4YNagtP0qE4zKz+TQrcnce2nHNUNHz6hGmqRMPqT2dixqwusGXPewmd7jyiCQgY4b p/7JN5vwzoAC6NOjG09VzialkRMWOfJc5pVAc3hF/6VHfQSSA9VhHOckIHai1PowYGGA4J 6lbiBBDfzcCkBO0bwn3IDoBz39znwaujOmj8/TATlijAxnEKCmhedINpkJ+Ht/4dySBn5B Di55ALSSs8droqdzOlwzXrOwEAMXIXGunl7IhIKJQRUcbNr6KZGp/mjdv0R9Crp7joN234 pQMQa8EEsdmg8fuq6q3/Epny3blYtoQdIYvuZmkYZYo65nAOiM2rIpVD13NVVg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656957101; a=rsa-sha256; cv=none; b=sIJXqF3QL4yVKvNOjCVitPs66L8qQZ1gJnbt8+jI8pEDief5A/lFJAjFB9xxnbH+0jw0Up C3MEnhI+YVy612V3d3hlna8zDmwPEKVc22+V6TgEbs8EMEEdOH0tFu3WAH4YYcFXsmEplJ AxsJYGFbD9WDzT0gEgdsPQPFcMC+i/EFyxBxVyPhmLsy00JFSi4rjDmCJixZZnQFA8zXHr c/Of0086kUxcXKfXf/4PVkh0l9Ugi83sxq7ECTzEtrYAIQLbrQizvJiOdLwn0tI5D/OfIH feCi2zV+TLu/rzfK0xQWp3HG/vrOYcbHG4GK0LF5rTazGaAMNENnu4r/aqx0iQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="K/VIigxm"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -9.25 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="K/VIigxm"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8C4D31E818 X-Spam-Score: -9.25 X-Migadu-Scanner: scn0.migadu.com X-TUID: Q1+oQ/q1Tuwe It's possible to let tangling generate comments that will link back to the literate file where you defined the function. https://orgmode.org/manual/Extracting-Source-Code.html 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. Immanuel On Mon, Jul 4, 2022 at 4:07 PM Stephen Eglen 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