# Org: Disable Gnus Loading when Org is Loaded 2023-06-08 Thu When I load a org file, eww and gnus are also loaded, eww is fine, but gnus is HUGE and will cause lag. I got the solution in #emacs irc: the variable `org-modules` (but don't put ol-eww, because eww will also load gnus) ``` I configured org eww gnus with use-package, all :defer t [09:24] but when I load an org file, it will also load eww and gnus, why? ... and if I don't configure gnus with use-package, it will not load oh, Gnus, hmm ... dongdigua: it looks like you have quite a fancy setup. One should do some extra to make it happen dongdigua: may you please elaborate? maybe send us a paste of the relevant config ,paste ... olivermead habamax: https://bpa.st/ZKDJA [10:17] guys go sleep no u dongdigua: my apologies but emacsman is right, I must sleep :) ok [10:19] ... dongdigua: i might have some ideas, but they'll be tedious, not clever, and i probably won't be testing this myself [10:34] basically ideas about how to methodically try to isolate the issue ? [10:36] i don't know what a question mark means here. [10:37] ,? [10:38] To invoke fsbot, type fsbot: or , ,why why not? ,huh try: Nyuhuhuu shuhari parsnip: I mean, what is your idea? [10:41] it's a long one, not all known ahead of time, and potentially fruitless. let me know at any point if you'd rather not [10:42] i guess for starters, are you using any kit, like spacemacs, doom, nix, guix, lambda, etc vanilla emacs 29 okay, and are you using irc from the one emacs? [10:44] looks like erc yes so you can still troubleshoot this by opening a second emacs, and you don't have to exit irc, right? [10:45] y okay, so are you able to easily reproduce this issue every time you start emacs? like in just a few steps or w/e? just visit an org document and loog at *Messages* I just found another thing: seems eww loads gnus, and org loads eww [10:47] okay. how about if you copy your init file to like, /tmp/testing/, and then do `export HOME=/tmp/testing`, and start emacs from that session? okay, maybe you'll solve your issue before any of my tedious isolating is needed parsnip: I have no idea so that last sentence has about as much information as your earlier "?" [10:53] try to communicate more [10:54] sorry [10:58] if I only comment out gnus section in the config provided before, org and eww wont load gnus, if only comment out eww, org won't load eww but load gnus [10:59] so it's not org -> eww -> gnus, org can still directly load gnus dongdigua: this is your configuration? https://bpa.st/ZKDJA yes, org eww gnus fragment, not the whole one [11:05] dongdigua: if so, what happens when you remove my/orgurl? [11:06] also, have you tried doing a binary search like manual bisect on this? that's an effective way to narrow down on the root cause user363628: remove my/orgurl don't work [11:07] what do you mean "don't work"? [11:08] ... still load eww and gnus when org is loaded, which I don't want dongdigua: why would you care if eww and gnus are loaded? dongdigua: assuming you're not using emacsclient and are using different sessions my only recommendation is to bisect - keep removing ~50% of sections till problem doesn't present, then backtrack etc [11:10] ,bisect [11:11] parsnip: bisect is [0] If you can reproduce your issue reliably in a new emacs, try bisecting your user-init-file [1] Comment out lower half of your init file and try to reproduce the issue. Recurse as needed. [2] Use M-; to comment or uncomment selected region [3] See also ,keep-one-open ,parsnip++ Noted, user363628. One fsbot-point for parsnip! user363628: i feel like mre might be sooner useful here [11:12] possibly lockywolf: I just don't want the lag when I'm just opening a single org file, org should be just org, don't need to something else i tried to start walking them through it, but they seemed to lose interest, or generally showed not much care for communicating well dongdigua: load it on emacs start dongdigua: you are using emacsclient, don't you? [11:13] *aren't you no, just emacs ,mre [11:16] MRE is help US to help YOU ,various-mre-approaches-in-emacs [11:17] various-mre-approaches-in-emacs: [0] DRAFT: try `mkdir /tmp/test; ... dongdigua: your report probably has too many lines of code in it for it to really be a good report [11:18] also, it would be nice if you can reproduce the issue without use-package, as use-package is not yet on emacs stable, iiuc [11:19] just keep removing lines from your config, until you've got the fewest number of lines possible [11:20] you mean, with-eval-after-load ? without use-package sure, but you can defer that till later if you want. if you can cut down the number of lines while still using use-package, that should help i would say priority is, just get the number of lines of code to like under 10 or so, it looks like you have a lot of unnecessary code for a report [11:21] and number of lines above means in the entire init file that is able to reproduce the error take "mre" seriously you can get a dozen people in here looking at your report, no need to have them all reading unnecessary code [11:22] dongdigua: user emacsclient, it's your best bet [11:23] just one line in .emacs: [11:30] (with-eval-after-load 'gnus (message "1")) and gnus will also load when org document is loaded new gnupg 2.4.2 is out and emacs + save encrypted file issue is still not fixed. I hope fedora wouldn't push an update for the package till it is resolved [11:33] oh in the beginning I got the message that gnus is loaded by (setq use-package-verbose t) so I won't know if gnus is loaded if use-package is commented out dongdigua: is the org file minimal too? [11:35] yes so it seems that org loading eww and gnus is work as intended? okay, so do you have an mre now? or are you still working on isolating the behavior? you can check (featurep 'gnus) [11:37] if i start a new emacs and open an org file, (featurep 'gnus) returns nil .emacs: (with-eval-after-load 'gnus (message "1")) (with-eval-after-load 'eww (message "2")) and open a .org file, got 1 and 2 [11:38] habamax: what is the issue [11:39] can't save encrypted buffer, that is the issue :) as for yours, have you checked what org does? dongdigua: huh, that's weird (eval-when-compile (require 'gnus-sum)) and "Modules that should always be loaded together with org.el... include ol-eww and ol-gnus ah, empty config will do it too weird, so -Q does not [11:42] emacs foo.org reproduces with empty config. emacs -q foo.org does not you can play with org-modules I think oh thanks hmm, no emacs -Q -nw /tmp/test/foo.org -eval "(message \"%S\" (featurep 'gnus))" t okay, it always does parship: me too it is in org-modules i somehow confused myself by not keeping mental track of what i was doing habamax: that's the point!! [11:49] (setq org-modules nil) <-- will it help? yes thank you! yw I'll probably put this conversation log on my blog [11:55] dongdigua: well... no public logging. can you edit out my goof up above? [11:56] I'll just keep fragments useful to the final result [11:58] ! You have left channel #emacs ```