From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John Kitchin Newsgroups: gmane.emacs.help Subject: Re: Using Org-mode for literate Emacs configuration with use-package Date: Sat, 13 Jul 2024 09:45:27 -0400 Message-ID: References: <87le2acq2f.fsf@k-7.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40123"; mail-complaints-to="usenet@ciao.gmane.io" Cc: GNU Emacs text editor To: =?UTF-8?Q?S=C3=A9bastien_Gendre?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 16 00:12:11 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sTTvX-000ACG-D0 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 16 Jul 2024 00:12:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTTuj-0003sA-2R; Mon, 15 Jul 2024 18:11:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSd4M-0006QC-Bx for help-gnu-emacs@gnu.org; Sat, 13 Jul 2024 09:45:49 -0400 Original-Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sSd4J-0001jX-6e for help-gnu-emacs@gnu.org; Sat, 13 Jul 2024 09:45:45 -0400 Original-Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-367a081d1cdso1508052f8f.1 for ; Sat, 13 Jul 2024 06:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew.cmu.edu; s=google-2021; t=1720878339; x=1721483139; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0LBS9nG4nmeOibDABJCJBa4yC7YyT9XIim6DEl6uixQ=; b=hVnMeTKTcIUT+w01cD4X7xXOYh2g2UY3k5eruhbyrZrCQhOaEr9n/TgZx/0oB1/HAd NdpOWK/imujzhoUxojr1ZpxtoKqh4pUFAXKFH0n7EJGXEz+Fy7c0QLiHXM9fGsfbTYeJ elBeSURZCZConoto6QSU+MIuAX95D4AEsD1+2G5dOqeSqxAqDRUo+Pwco0VmLEV2HOtd zkJcoaJwaS0WchoCO8tGPsCWIymdKChvX8RpvMey8de8WF+wN6wJSTrNbdvG+UZx978y oZ4o/+MMSNJWIqQPkM53hGH+loTJ9h0HaeMtNoALa4jVZefhnmVCTO1TqeMkmLseAiwG mBPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720878339; x=1721483139; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0LBS9nG4nmeOibDABJCJBa4yC7YyT9XIim6DEl6uixQ=; b=ZSU3G/cQI32HQrO1ztLiGnLvETHfG1yzqfE3bY6GR0Zr8rYPglHx5PZZfuQFY6G8yW H35cTQbiWflALs/XGDT/nDIdXqafs5S6W2ePoje87Z0Ss0WbAsFg64fIDQtRacw8OBx1 b/B0k8k4qQnjisviGxSQwTzVS5w5WV21oBO2rN9FRrozJdtfXedqxj8d1R34EEKgZOPy ytFTIYQwuBe0ZBAym8tL8VAlD5q+qZrUhyd6lxcMCyt0X5tHlyTUv5SOo5WFlLWjokt0 3VPTaLdlccUUlanj/NLYcdzcs8Je+l5pXDCovNq5CF4UrH5bXNvkoSekohCL09hetRN+ 3MRA== X-Gm-Message-State: AOJu0YzL5quYOw7mbDD0kITwshmJRTGFrRf7fdBSoGJK4gQBGv5YP2bl KkftOclAV6moCaSXPCPgUkIMs1X91MEvX1Oa1rp0SESPcySY2xo3h7Slq+VICmPS1f0GPcymuf3 ejQfh5029OdapzrrVD8tPXtGovq32PUfrLhlZDtVgLTYX4sQ= X-Google-Smtp-Source: AGHT+IGLJ9qlqlvZ8Lr5OepLS0wKxmoukxH7+ohH1TMAenEP/fN63EPdmT3Ej7O7qELkZaU+fC55sVbTXIm5c3KrrCA= X-Received: by 2002:adf:ee08:0:b0:367:95e6:158a with SMTP id ffacd0b85a97d-367cead8498mr9385822f8f.63.1720878338880; Sat, 13 Jul 2024 06:45:38 -0700 (PDT) In-Reply-To: <87le2acq2f.fsf@k-7.ch> Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=jkitchin@andrew.cmu.edu; helo=mail-wr1-x435.google.com X-Spam_score_int: -9 X-Spam_score: -1.0 X-Spam_bar: - X-Spam_report: (-1.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URI_DOTEDU=1 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 15 Jul 2024 18:11:19 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147236 Archived-At: This sounds like a use case for noweb. Check out https://orgmode.org/manual/Noweb-Reference-Syntax.html John ----------------------------------- Professor John Kitchin (he/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 https://kitchingroup.cheme.cmu.edu https://pointbreezepubs.gumroad.com/ pycse bookstore On Sat, Jul 13, 2024 at 8:45=E2=80=AFAM S=C3=A9bastien Gendre = wrote: > Hello, > > I am using Org-mode and the elisp function `(org-babel-load-file)` to > write my Emacs configuration into an Org-mode document. It's very > useful to document my configuration and I can quickly do exports to HTML > or PDF when a friend want to know more about my configuration. > > But, I have a problem. > > Sometimes, I need to split a package configuration into multiple > sections of my Org-mode document. For example Org-mode, because I set a > lot of settings. By spiting my config, I can correctly document each > option and organize it in a more comprehensible way. > > But with the elisp function `(use-package)`, I need to join each package > configuration into the call of `(use-package)` function. Which prevent > me from splitting my config into Org-mode sections. > > I was thinking of writing Org-mode source block with different parts of > my `(use-package)` call, so I can distribute it into different section of > my > Org-mode document. But in this case, I can no-longer evaluate my > `(use-package)` call directly from my Org-mode document. > > > Do you have any suggestion ? How do you manage this problem ? > > > Best regards > > ------- > Gendre S=C3=A9bastien >