From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: Org babel tangle: Don't export code Date: Wed, 25 Sep 2019 09:07:13 +1000 Message-ID: <87o8z9qony.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46942) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCtuw-0003KM-OP for emacs-orgmode@gnu.org; Tue, 24 Sep 2019 19:08:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCtuu-0003Z3-Qh for emacs-orgmode@gnu.org; Tue, 24 Sep 2019 19:08:21 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:36353) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iCtuu-0003YK-Kw for emacs-orgmode@gnu.org; Tue, 24 Sep 2019 19:08:20 -0400 Received: by mail-pl1-f196.google.com with SMTP id f19so1588312plr.3 for ; Tue, 24 Sep 2019 16:08:19 -0700 (PDT) Received: from tim-desktop (203-173-23-204.dyn.iinet.net.au. [203.173.23.204]) by smtp.gmail.com with ESMTPSA id f18sm2969637pgf.58.2019.09.24.16.07.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Sep 2019 16:07:16 -0700 (PDT) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org I just put :tangle no in the block header e.g. #+begin_src emacs-lisp :tangle no #+end_src This is how I turn off or remove blocks from my .emacs.d/init.el file, which is tangled from an or file. You can also put a filename. This is what I do for Emacs 27, which introduces the early-init.el file i.e. #+begin_src emacs-lisp :tangle early-init.el #+end_src #+begin_src emacs-lisp :tangle init.el #+end_src Nathan Neff writes: > Hello all, > > I use *.org files to configure my emacs and use org-babel-load-file > to configure my org-mode using *.org files. Love the feature. > > However sometimes I'm experimenting with code blocks, and want to simply > "turn off" certain code blocks in my *.org files from being executed. > Every time > I go to do this, I search the web for 30-60 minutes and I'm frustrated and > confused by > the myriad options and documentation. > > All I want to do is mark a source code block in my *.org files so that the > particular code block is: > > 1) Not exported to the resulting .el file when tangling > Or > 2) Not ran in the resulting .el files when tangling > > I recently spent 30 minutes to an hour trying to figure out how to simply > "disable" or "prevent" or "exclude" or "quit" or "don't" or "stop" or > "please don't do this" > to a code block in my *.org files. I don't want to mark the code block as > "text", unless there's really no other option. > > In my opinion, the documentation does not simply define how to do this > relatively common task. > > Can someone please point me in the right direction? Also I would be > willing to submit a doc-fix or FAQ item if there is currently not an item > to do so. I'm lost and do not want to spend more time on this seemingly > easy task. > > Thanks, > --Nate -- Tim Cross