* Using Org-mode for literate Emacs configuration with use-package
@ 2024-07-09 19:39 Sébastien Gendre
0 siblings, 0 replies; 2+ messages in thread
From: Sébastien Gendre @ 2024-07-09 19:39 UTC (permalink / raw)
To: GNU Emacs text editor
[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]
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ébastien
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <87le2acq2f.fsf__13832.1084481262$1720874764$gmane$org@k-7.ch>]
* Re: Using Org-mode for literate Emacs configuration with use-package
[not found] <87le2acq2f.fsf__13832.1084481262$1720874764$gmane$org@k-7.ch>
@ 2024-07-27 7:47 ` Dilip via General discussions about Org-mode.
0 siblings, 0 replies; 2+ messages in thread
From: Dilip via General discussions about Org-mode. @ 2024-07-27 7:47 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I also enjoy using literate org config.
I cannot think of a way to split config in org src blocks and evaluate it
easily.
Each src block needs to evaluated, although most of the time while
editing itself I do evaluate or =eval-buffer=.
There is one way I can think of, that is to use =noweb= inside one
block. That might add little noise if you do many splits, but it works.
You can do =org-babel-expand-src-block= to get the output.
Or you may just use many use-package src block for that package.
With =:custom= keyword in use-package, you can add some doc for that
variable.
Eg: (use-package org :custom
(org-ellipsis ".." "Some doc"))
I'm interested in knowing others opinion, and how they use it.
I use both emacs and nixos config in org-mode.
https://github.com/idlip/d-nix/blob/gol-d/d-setup.org
Other resource that uses a method that lets you use single noweb
reference to tangle all src block name.
Eg: You can use just <<org-conf>> and have any number of src block with
same #+name:org-conf name
https://github.com/rasendubi/dotfiles
Best,
Dilip
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-27 7:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09 19:39 Using Org-mode for literate Emacs configuration with use-package Sébastien Gendre
[not found] <87le2acq2f.fsf__13832.1084481262$1720874764$gmane$org@k-7.ch>
2024-07-27 7:47 ` Dilip via General discussions about Org-mode.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).