Re: [O] [babel] Commenting out src blocks for tangling
schulte.e...@gmail.com writes: Alan Schmitt alan.schm...@polytechnique.org writes: Hi Eric, schulte.e...@gmail.com writes: I see that hello subtree is tangled. Does it mean that to comment a whole tree I need to comment every subtree (recursively)? Thanks, Alan I just pushed up a fix, thanks for catching this bug. I'm sorry, but I think there is a bug with the fix. When I tangle a file, I get an error: org-babel-under-commented-heading-p: Symbol's function definition is void: org-babel-under-commented-headline-p I also see a failure with the tests: 1 unexpected results: FAILED ob-tangle/continued-code-blocks-w-noweb-ref I just did a git pull before trying this. This should be fixed now, thanks for pointing it out. It's working, thanks a lot! Alan
Re: [O] [babel] Commenting out src blocks for tangling
Hi Eric, schulte.e...@gmail.com writes: I see that hello subtree is tangled. Does it mean that to comment a whole tree I need to comment every subtree (recursively)? Thanks, Alan I just pushed up a fix, thanks for catching this bug. I'm sorry, but I think there is a bug with the fix. When I tangle a file, I get an error: org-babel-under-commented-heading-p: Symbol's function definition is void: org-babel-under-commented-headline-p I also see a failure with the tests: 1 unexpected results: FAILED ob-tangle/continued-code-blocks-w-noweb-ref I just did a git pull before trying this. Alan
Re: [O] [babel] Commenting out src blocks for tangling
Alan Schmitt alan.schm...@polytechnique.org writes: Hi Eric, schulte.e...@gmail.com writes: I see that hello subtree is tangled. Does it mean that to comment a whole tree I need to comment every subtree (recursively)? Thanks, Alan I just pushed up a fix, thanks for catching this bug. I'm sorry, but I think there is a bug with the fix. When I tangle a file, I get an error: org-babel-under-commented-heading-p: Symbol's function definition is void: org-babel-under-commented-headline-p I also see a failure with the tests: 1 unexpected results: FAILED ob-tangle/continued-code-blocks-w-noweb-ref I just did a git pull before trying this. This should be fixed now, thanks for pointing it out. Best, Alan -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] [babel] Commenting out src blocks for tangling
schulte.e...@gmail.com writes: I just tried it with my init file and it did not work. Here is a minimal example. Save this as test.org: --8---cut here---start-8--- * Testing #+BEGIN_SRC emacs-lisp (message hello world) #+END_SRC * COMMENT Commenting #+BEGIN_SRC emacs-lisp (message Salut le monde 2) #+END_SRC --8---cut here---end---8--- Then do a M-x org-babel-load-file giving test.org as file name. If you look at *Messages*, or at the generated test.el, you will see the second block has been tangled. Am I missing something with this feature, or is this a bug? (I tried with emacs -Q and loading a current org, and the same happens.) I can't reproduce, both manual tangling and tangling through org-babel-load-file only tangle the first block for me. Maybe you aren't using a current version of Org-mode. I'm on. Org-mode version 8.2.1 (release_8.2.1-99-g2eef1b @ /home/eschulte/src/org-mode/lisp/) Thanks, my version was a couple weeks old and the current version does work with this example. However I could not make it work with this slightly bigger example: --8---cut here---start-8--- * Testing #+BEGIN_SRC emacs-lisp (message hello world) #+END_SRC * COMMENT Commenting #+BEGIN_SRC emacs-lisp (message Salut le monde 2) #+END_SRC ** Testing sub tree #+BEGIN_SRC emacs-lisp (message hello subtree) #+END_SRC --8---cut here---end---8--- I see that hello subtree is tangled. Does it mean that to comment a whole tree I need to comment every subtree (recursively)? Thanks, Alan
Re: [O] [babel] Commenting out src blocks for tangling
Alan Schmitt alan.schm...@polytechnique.org writes: schulte.e...@gmail.com writes: I just tried it with my init file and it did not work. Here is a minimal example. Save this as test.org: --8---cut here---start-8--- * Testing #+BEGIN_SRC emacs-lisp (message hello world) #+END_SRC * COMMENT Commenting #+BEGIN_SRC emacs-lisp (message Salut le monde 2) #+END_SRC --8---cut here---end---8--- Then do a M-x org-babel-load-file giving test.org as file name. If you look at *Messages*, or at the generated test.el, you will see the second block has been tangled. Am I missing something with this feature, or is this a bug? (I tried with emacs -Q and loading a current org, and the same happens.) I can't reproduce, both manual tangling and tangling through org-babel-load-file only tangle the first block for me. Maybe you aren't using a current version of Org-mode. I'm on. Org-mode version 8.2.1 (release_8.2.1-99-g2eef1b @ /home/eschulte/src/org-mode/lisp/) Thanks, my version was a couple weeks old and the current version does work with this example. However I could not make it work with this slightly bigger example: --8---cut here---start-8--- * Testing #+BEGIN_SRC emacs-lisp (message hello world) #+END_SRC * COMMENT Commenting #+BEGIN_SRC emacs-lisp (message Salut le monde 2) #+END_SRC ** Testing sub tree #+BEGIN_SRC emacs-lisp (message hello subtree) #+END_SRC --8---cut here---end---8--- I see that hello subtree is tangled. Does it mean that to comment a whole tree I need to comment every subtree (recursively)? Thanks, Alan I just pushed up a fix, thanks for catching this bug. -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] [babel] Commenting out src blocks for tangling
Hello, Sorry to resurrect this old thread, but I cannot make this work. b...@altern.org writes: Rainer M Krug r.m.k...@gmail.com writes: I agree - COMMENTing a subtree should automatically disable tangling of code blocks in the subtree. Would this something which could be introduced easily, as it seems there are quite a few who assumed that it would be doing it? This is now the case in master: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8e0b45 I just tried it with my init file and it did not work. Here is a minimal example. Save this as test.org: --8---cut here---start-8--- * Testing #+BEGIN_SRC emacs-lisp (message hello world) #+END_SRC * COMMENT Commenting #+BEGIN_SRC emacs-lisp (message Salut le monde 2) #+END_SRC --8---cut here---end---8--- Then do a M-x org-babel-load-file giving test.org as file name. If you look at *Messages*, or at the generated test.el, you will see the second block has been tangled. Am I missing something with this feature, or is this a bug? (I tried with emacs -Q and loading a current org, and the same happens.) Thanks, Alan
Re: [O] [babel] Commenting out src blocks for tangling
Alan Schmitt alan.schm...@polytechnique.org writes: Hello, Sorry to resurrect this old thread, but I cannot make this work. b...@altern.org writes: Rainer M Krug r.m.k...@gmail.com writes: I agree - COMMENTing a subtree should automatically disable tangling of code blocks in the subtree. Would this something which could be introduced easily, as it seems there are quite a few who assumed that it would be doing it? This is now the case in master: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8e0b45 I just tried it with my init file and it did not work. Here is a minimal example. Save this as test.org: --8---cut here---start-8--- * Testing #+BEGIN_SRC emacs-lisp (message hello world) #+END_SRC * COMMENT Commenting #+BEGIN_SRC emacs-lisp (message Salut le monde 2) #+END_SRC --8---cut here---end---8--- Then do a M-x org-babel-load-file giving test.org as file name. If you look at *Messages*, or at the generated test.el, you will see the second block has been tangled. Am I missing something with this feature, or is this a bug? (I tried with emacs -Q and loading a current org, and the same happens.) I can't reproduce, both manual tangling and tangling through org-babel-load-file only tangle the first block for me. Maybe you aren't using a current version of Org-mode. I'm on. Org-mode version 8.2.1 (release_8.2.1-99-g2eef1b @ /home/eschulte/src/org-mode/lisp/) Cheers, Thanks, Alan -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] [babel] Commenting out src blocks for tangling
Hi Rainer, Rainer M Krug r.m.k...@gmail.com writes: Follow up: would it be possible to have the same mechanism for tangling, i.e. a tag :notangle:? functioning would be equivalent to property tangle: no but more visible and consistent with the :noexport:? One could also define properties to be tangled and not tangled for different scenarios? One approach could be to use export filters here. I'd rather let (or someone else) find out if this approach is easy enough before considering adding a new keyword like :notangle:. But if you (or someone else) come up with a patch implementing the :notangle: approach, of course we might consider it too. Thanks, -- Bastien
Re: [O] [babel] Commenting out src blocks for tangling
Bastien bzg at altern.org writes: Hi Rainer, Rainer M Krug r.m.krug at gmail.com writes: Follow up: would it be possible to have the same mechanism for tangling, i.e. a tag :notangle:? functioning would be equivalent to property tangle: no but more visible and consistent with the :noexport:? One could also define properties to be tangled and not tangled for different scenarios? One approach could be to use export filters here. Why not use the new exporter, rather than org-babel-tangle? Below, there is a minimal backend called R-src-blocks that only exports src-blocks for language R and the headline titles as comments. R-src-blocks backend is just an illustration - I don't intend that anyone actually use it. I guess I am suggesting that tangling is just exporting code; with full access to all the export machinery (like exclude_tags and backend specific options), it might be better to head toward backends that yield code than to elaborate org-babel-tangle. Chuck #+BEGIN_SRC emacs-lisp (require 'ox-ascii) (defun comment-headline (headline contents info) (concat ### * (org-element-property :raw-value headline) \n\n contents)) (org-export-define-backend R-src-blocks ((src-block . (lambda (src-block contents info) (and (string= (org-element-property :language src-block) R) (car (org-export-unravel-code src-block) (section . org-ascii-section) (headline . comment-headline))) #+END_SRC I'd rather let (or someone else) find out if this approach is easy enough before considering adding a new keyword like :notangle:. But if you (or someone else) come up with a patch implementing the :notangle: approach, of course we might consider it too. Thanks,
Re: [O] [babel] Commenting out src blocks for tangling
Hi Charles, Charles Berry ccbe...@ucsd.edu writes: Why not use the new exporter, rather than org-babel-tangle? A very nice example on how the new exporter can be useful! Thanks for sharing this, -- Bastien
Re: [O] [babel] Commenting out src blocks for tangling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28/02/13 00:33, Darlan Cavalcante Moreira wrote: I also converted my Emacs configuration to an org-mode file a long time ago and I hit the same spot you did. As you, I initially assumed (wished) that the COMMENT marker would disable tangling of blocks in that subtree. After that I found out the tangle property, which solves the problem but has no visual indication as you mentioned. Nowadays I use both approaches. Whenever I set the tangle property to no I also set the COMMENT mark and vice-verse. It is just a very minor annoyance to do both things and I'm used to it now. I agree - COMMENTing a subtree should automatically disable tangling of code blocks in the subtree. Would this something which could be introduced easily, as it seems there are quite a few who assumed that it would be doing it? Rainer -- Darlan At Wed, 27 Feb 2013 19:32:41 +, Eric S Fraga wrote: Alan L Tyree alanty...@gmail.com writes: [...] G'day Eric, If I understand your problem correctly, doesn't the property :tangle: do what you want? Yes, thanks; Aaron Ecay has also pointed out to me. It works and does exactly what I said I needed. And you have both been very polite :-) -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1285-g6cc600 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRLxzfAAoJENvXNx4PUvmCuaAIAOITFnoNMB5EIyaPib6JC/wU WcD5e0J8+kQMcowYEoLrJmPOupw3sXj2tQoyq0gHhdcCVgBx0ZJh+WNkbC7QUlWh ruSJYuPQhbkFr+FjUpas3iyNmuxPIghpmmhMPKK/NhLGaE3tVgvEtMXeY9IEp2ai a0P+7g32yAv80kmJE2FXy8UdWGo/Cya8MFueRH2YxRv7cYRA63qFj8Wl4+hCM7sD comvN6wZue8ZTi32O203PQueafEA37+AZgUdcdLU13TQDRj4PytFjjsHGr64LRK8 zYTQr3+YiUDq9Nr0j+B4uxPZWXJgAcTMzW6+0FqbPdnSPoTpGnwLblQbZ/MnG1E= =sgpY -END PGP SIGNATURE-
Re: [O] [babel] Commenting out src blocks for tangling
Rainer M Krug r.m.k...@gmail.com writes: I agree - COMMENTing a subtree should automatically disable tangling of code blocks in the subtree. Would this something which could be introduced easily, as it seems there are quite a few who assumed that it would be doing it? This is now the case in master: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8e0b45 Thanks! -- Bastien
Re: [O] [babel] Commenting out src blocks for tangling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28/02/13 10:25, Bastien wrote: Rainer M Krug r.m.k...@gmail.com writes: I agree - COMMENTing a subtree should automatically disable tangling of code blocks in the subtree. Would this something which could be introduced easily, as it seems there are quite a few who assumed that it would be doing it? This is now the case in master: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8e0b45 Brilliant - makes life so much easier and consistent. I'll update immediately. Cheers, Rainer Thanks! - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRLyMWAAoJENvXNx4PUvmCUZoIAMl3G6yoXTUlSKV3jwzAKwtl ppwDRmgmy7Hqsk3KAl/yZdRdypXg4Ziom9zsiOSzHYz5agiPDplePbZ/fKbeOJKU kNr4Rsy+or9h1UHyzMCJnKg3yuy1hv7htFXcMpFeLe+ohQcM0xd0ehLPvcutj5nx W/d3bbIVL5GXTPdVYT8UO2CuPLfVJURnv7RvAFlaiVhkXiwKfSrE78bsm96ZkZK1 kWvAhESSwgWDSa+/2w/PESpt80iz7OZufsfKCEga8ZrJkkFFpzHgpA7uaqGYSzYA eIJ9vrGkUsi12UC2USwT7mxF0Wic7Yj+4Nvq+t0yH7f92VnqQCeHp8ztt/fxics= =HQRW -END PGP SIGNATURE-
Re: [O] [babel] Commenting out src blocks for tangling
Bastien, Bastien wrote: Rainer M Krug r.m.k...@gmail.com writes: I agree - COMMENTing a subtree should automatically disable tangling of code blocks in the subtree. Would this something which could be introduced easily, as it seems there are quite a few who assumed that it would be doing it? This is now the case in master: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8e0b45 Does it work as well for the `:noexport:' tag? Best regards, Seb -- Sebastien Vauban
Re: [O] [babel] Commenting out src blocks for tangling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28/02/13 10:30, Sebastien Vauban wrote: Bastien, Bastien wrote: Rainer M Krug r.m.krug-re5jqeeqqe8avxtiumw...@public.gmane.org writes: I agree - COMMENTing a subtree should automatically disable tangling of code blocks in the subtree. Would this something which could be introduced easily, as it seems there are quite a few who assumed that it would be doing it? This is now the case in master: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8e0b45 Does it work as well for the `:noexport:' tag? I don't think it should. Tangling is something different to export, so there should not be ay interactions between the two in this respect. On the other hand, COMMENT is generic - it is a COMMENT and does not concern anything. So it is applicable for tangling as well. I would actually say it would be counterintuitive if :noexport: would influence tangling as it is governed by a completely different approach in org as well as in what I am doing with the org file. Cheers, Rainer Best regards, Seb -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRLyahAAoJENvXNx4PUvmCy7UIAMEFBm2FV3MaCaJuurMdh9g4 3JyoLMmgvAEhDHjIfyLHviN+RC7jr/77Xcc+2WwSlMY2RAPE6isRVIFkFR+roSHy TTyYzQu8DOCsZjWHqQM+FLl5sxPvqU0KvUlXXVzND1m48uehJkU07E77eH43AM/Q ThSanN0cIwC25u5PyPe7xi9SRoWXUYGTmsu9Ymg3J2zzmYOn8l9rSb7l68Y3fQTA 9i3SFzgyyXAJy453zNkZsoyOhCgP4kNtwZ9iLVW934sNJE1pVhMsr8wNfYfY+S+s FjNqePE+izC4uHIrSaGaw3COlar6qgPSTKQmF+ueNw/FjPL+TJsPVgSH2pig3+k= =b7/g -END PGP SIGNATURE-
Re: [O] [babel] Commenting out src blocks for tangling
Hi Rainer, Rainer M Krug wrote: On 28/02/13 10:30, Sebastien Vauban wrote: Bastien wrote: Rainer M Krug r.m.k...@gmail.com writes: I agree - COMMENTing a subtree should automatically disable tangling of code blocks in the subtree. Would this something which could be introduced easily, as it seems there are quite a few who assumed that it would be doing it? This is now the case in master: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8e0b45 Does it work as well for the `:noexport:' tag? I don't think it should. Tangling is something different to export, so there should not be ay interactions between the two in this respect. On the other hand, COMMENT is generic - it is a COMMENT and does not concern anything. So it is applicable for tangling as well. I would actually say it would be counterintuitive if :noexport: would influence tangling as it is governed by a completely different approach in org as well as in what I am doing with the org file. I've always used :noexport: instead of COMMENT (as I hate the visual clutter of that wide keyword). So, for me, they were equivalent. You must be right, though, that they aren't: COMMENT seems more generic than just export. So, dismiss my request. Best regards, Seb -- Sebastien Vauban
Re: [O] [babel] Commenting out src blocks for tangling
Bastien b...@altern.org writes: Rainer M Krug r.m.k...@gmail.com writes: I agree - COMMENTing a subtree should automatically disable tangling of code blocks in the subtree. Would this something which could be introduced easily, as it seems there are quite a few who assumed that it would be doing it? This is now the case in master: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8e0b45 Does this ONLY affect tangling or also other code? For instance I often keep LATEX_HEADER, Emacs lisp and the like in a COMMENTed headline. This should still be processed. –Rasmus -- Need more coffee. . .
Re: [O] [babel] Commenting out src blocks for tangling
Hi Rasmus, Rasmus ras...@gmx.us writes: Does this ONLY affect tangling or also other code? Only tangling. HTH, -- Bastien
Re: [O] [babel] Commenting out src blocks for tangling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28/02/13 10:47, Sebastien Vauban wrote: Hi Rainer, Rainer M Krug wrote: On 28/02/13 10:30, Sebastien Vauban wrote: Bastien wrote: Rainer M Krug r.m.krug-re5jqeeqqe8avxtiumw...@public.gmane.org writes: I agree - COMMENTing a subtree should automatically disable tangling of code blocks in the subtree. Would this something which could be introduced easily, as it seems there are quite a few who assumed that it would be doing it? This is now the case in master: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8e0b45 Does it work as well for the `:noexport:' tag? I don't think it should. Tangling is something different to export, so there should not be ay interactions between the two in this respect. On the other hand, COMMENT is generic - it is a COMMENT and does not concern anything. So it is applicable for tangling as well. I would actually say it would be counterintuitive if :noexport: would influence tangling as it is governed by a completely different approach in org as well as in what I am doing with the org file. I've always used :noexport: instead of COMMENT (as I hate the visual clutter of that wide keyword). So, for me, they were equivalent. Follow up: would it be possible to have the same mechanism for tangling, i.e. a tag :notangle:? functioning would be equivalent to property tangle: no but more visible and consistent with the :noexport:? One could also define properties to be tangled and not tangled for different scenarios? Rainer You must be right, though, that they aren't: COMMENT seems more generic than just export. So, dismiss my request. Best regards, Seb -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRL03rAAoJENvXNx4PUvmCsGQIAKlPTGJzSlRSvPamZCs2XZqp kR6YIU20QdSLs3Eei7p1VAFTdb4i9Ci6GaX8LfmForM4jrmkUYPqGNFHOl6Q6rwq tCSCxAhIvEWZirs1tmhvj+jIZ2so61LTudMfzToEXPcowoCJXOzjS4GVb/QAysmX qYrY/5OlEw7Qj8YlkmDoeTep4HtSKM941po1VWxm4AJPiyFkipgiQJ3bpVTq5g4p /QIoG7QhNug1kstDx/2LfTXMZMU1zamBS1T5i0rzYHSkpoZwHCAjozXHtpNeW5VB UOJTTctGNERb7sk70SM5ACoQxNne3Ojd5iQdjj+lJf0gKGbz20kT6rHrXUS7d9g= =ryTy -END PGP SIGNATURE-
Re: [O] [babel] Commenting out src blocks for tangling
Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: Bastien wrote: Rainer M Krug r.m.krug-re5jqeeqqe8avxtiumw...@public.gmane.org writes: I agree - COMMENTing a subtree should automatically disable tangling of code blocks in the subtree. Would this something which could be introduced easily, as it seems there are quite a few who assumed that it would be doing it? This is now the case in master: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8e0b45 Does it work as well for the `:noexport:' tag? No. :noexport: is meaningful in the context of exporting, not in the context of tangling. -- Bastien
Re: [O] [babel] Commenting out src blocks for tangling
Bastien b...@altern.org writes: Rainer M Krug r.m.k...@gmail.com writes: I agree - COMMENTing a subtree should automatically disable tangling of code blocks in the subtree. Would this something which could be introduced easily, as it seems there are quite a few who assumed that it would be doing it? This is now the case in master: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8e0b45 Thanks! Brilliant! Many thanks. Works like a charm. -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1313-g7d4812
[O] [babel] Commenting out src blocks for tangling
Hello, I finally bit the bullet and converted by rather convoluted and long emacs startup code to an org file with emacs-lisp code blocks. I then tangle these into the actual code which is loaded by emacs at startup. So far, so good, and it does make it easier for me to navigate around my customisations. However, it has highlighted a feature which is missing (I think) but which would be great. I tangle all the code blocks to the same file. It would be great if I could have the =org-babel-tangle= command skip sections that are COMMENTed out (i.e. headline with COMMENT, as produced by =org-toggle-comment=). Alternatively, a :nobabel: or :notangle: tag to mark subtrees that should be excluded would be fine. If I have missed a way of doing this, please do let me know (politely ;-). If not, any suggestions on how to achieve this would be great. Thanks, eric -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1285-g6cc600
Re: [O] [babel] Commenting out src blocks for tangling
You should be able to set the “tangle” property of the headline to “no” to achieve this effect: see the following section of the manual: (org) Header arguments in Org mode properties It isn’t as easy to manipulate as a tag, perhaps. -- Aaron Ecay
Re: [O] [babel] Commenting out src blocks for tangling
Aaron Ecay aarone...@gmail.com writes: You should be able to set the “tangle” property of the headline to “no” to achieve this effect: see the following section of the manual: (org) Header arguments in Org mode properties It isn’t as easy to manipulate as a tag, perhaps. Thanks. This does work and is relatively straightforward. However, it provides no visual indication of excluded sections from my customisation file which is rather unfortunate. That's why I would prefer to be able to COMMENT or tag excluded sub-trees. I guess I can use column view to see what is excluded... In any case, I can manage what I want for the moment. Thanks again, eric -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1285-g6cc600
Re: [O] [babel] Commenting out src blocks for tangling
Eric S Fraga writes: Hello, I finally bit the bullet and converted by rather convoluted and long emacs startup code to an org file with emacs-lisp code blocks. I then tangle these into the actual code which is loaded by emacs at startup. So far, so good, and it does make it easier for me to navigate around my customisations. However, it has highlighted a feature which is missing (I think) but which would be great. I tangle all the code blocks to the same file. It would be great if I could have the =org-babel-tangle= command skip sections that are COMMENTed out (i.e. headline with COMMENT, as produced by =org-toggle-comment=). Alternatively, a :nobabel: or :notangle: tag to mark subtrees that should be excluded would be fine. If I have missed a way of doing this, please do let me know (politely ;-). If not, any suggestions on how to achieve this would be great. G'day Eric, If I understand your problem correctly, doesn't the property :tangle: do what you want? Cheers, Alan Thanks, eric -- Alan L Tyree http://www2.austlii.edu.au/~alan Tel: 04 2748 6206 sip:172...@iptel.org
Re: [O] [babel] Commenting out src blocks for tangling
Alan L Tyree alanty...@gmail.com writes: [...] G'day Eric, If I understand your problem correctly, doesn't the property :tangle: do what you want? Yes, thanks; Aaron Ecay has also pointed out to me. It works and does exactly what I said I needed. And you have both been very polite :-) -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1285-g6cc600
Re: [O] [babel] Commenting out src blocks for tangling
I also converted my Emacs configuration to an org-mode file a long time ago and I hit the same spot you did. As you, I initially assumed (wished) that the COMMENT marker would disable tangling of blocks in that subtree. After that I found out the tangle property, which solves the problem but has no visual indication as you mentioned. Nowadays I use both approaches. Whenever I set the tangle property to no I also set the COMMENT mark and vice-verse. It is just a very minor annoyance to do both things and I'm used to it now. -- Darlan At Wed, 27 Feb 2013 19:32:41 +, Eric S Fraga wrote: Alan L Tyree alanty...@gmail.com writes: [...] G'day Eric, If I understand your problem correctly, doesn't the property :tangle: do what you want? Yes, thanks; Aaron Ecay has also pointed out to me. It works and does exactly what I said I needed. And you have both been very polite :-) -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1285-g6cc600