emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* control tangling from section header
@ 2015-02-22 14:36 Ken Mankoff
  2015-02-22 14:49 ` Daniele Pizzolli
  0 siblings, 1 reply; 7+ messages in thread
From: Ken Mankoff @ 2015-02-22 14:36 UTC (permalink / raw)
  To: Org-mode


I'm working with my literate init file (emacs.org), and would like to
have certain sections not tangle. I currently do this with ":tangle no"
at the SRC block level. Is it possible to control tangling with tags at
the header level? It would make it much easier to disable/enable
sections, and see what sections are enabled/disabled, if the tangling
state were more clearly visible like tags are.

  -k.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: control tangling from section header
  2015-02-22 14:36 control tangling from section header Ken Mankoff
@ 2015-02-22 14:49 ` Daniele Pizzolli
  2015-02-23 14:39   ` Rainer M Krug
  2015-02-23 14:54   ` Rasmus
  0 siblings, 2 replies; 7+ messages in thread
From: Daniele Pizzolli @ 2015-02-22 14:49 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: Org-mode

Hello Ken,

Ken Mankoff writes:

> I'm working with my literate init file (emacs.org), and would like to
> have certain sections not tangle. I currently do this with ":tangle no"
> at the SRC block level. Is it possible to control tangling with tags at
> the header level?

Not with tag but with PROPERTIES:

* outline header
  :PROPERTIES:
  :header-args: :tangle no
  :END:

More at
http://orgmode.org/manual/Header-arguments-in-Org-mode-properties.html

> It would make it much easier to disable/enable sections, and see what
> sections are enabled/disabled, if the tangling state were more clearly
> visible like tags are.

I do not think that this is currently possible.

Best,
Daniele

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: control tangling from section header
  2015-02-22 14:49 ` Daniele Pizzolli
@ 2015-02-23 14:39   ` Rainer M Krug
  2015-02-23 14:47     ` Ken Mankoff
  2015-02-23 14:54   ` Rasmus
  1 sibling, 1 reply; 7+ messages in thread
From: Rainer M Krug @ 2015-02-23 14:39 UTC (permalink / raw)
  To: Daniele Pizzolli; +Cc: Org-mode, Ken Mankoff

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

Daniele Pizzolli <dan@toel.it> writes:

> Hello Ken,
>
> Ken Mankoff writes:
>
>> I'm working with my literate init file (emacs.org), and would like to
>> have certain sections not tangle. I currently do this with ":tangle no"
>> at the SRC block level. Is it possible to control tangling with tags at
>> the header level?
>
> Not with tag but with PROPERTIES:
>
> * outline header
>   :PROPERTIES:
>   :header-args: :tangle no
>   :END:
>
> More at
> http://orgmode.org/manual/Header-arguments-in-Org-mode-properties.html
>
>> It would make it much easier to disable/enable sections, and see what
>> sections are enabled/disabled, if the tangling state were more clearly
>> visible like tags are.
>
> I do not think that this is currently possible.

If I am not mistaken, you can mark the header as COMMENT and no code
blocks under this header are tangled.

Cheers,

Rainer

>
> Best,
> Daniele
>
>
>
>
>

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: control tangling from section header
  2015-02-23 14:39   ` Rainer M Krug
@ 2015-02-23 14:47     ` Ken Mankoff
  2015-02-23 15:03       ` Rainer M Krug
  0 siblings, 1 reply; 7+ messages in thread
From: Ken Mankoff @ 2015-02-23 14:47 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: Daniele Pizzolli, Org-mode

 
On 2015-02-23 at 09:39, Rainer M Krug <Rainer@krugs.de> wrote: 
>>> I'm working with my literate init file (emacs.org), and would 
>>> like to have certain sections not tangle. I currently do this 
>>> with ":tangle no" at the SRC block level. Is it possible to 
>>> control tangling with tags at the header level? 
> 
> If I am not mistaken, you can mark the header as COMMENT and no 
> code blocks under this header are tangled. 
> 

That would be a great solution, but it does not work on my system
(8.2.10)

  -k.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: control tangling from section header
  2015-02-22 14:49 ` Daniele Pizzolli
  2015-02-23 14:39   ` Rainer M Krug
@ 2015-02-23 14:54   ` Rasmus
  1 sibling, 0 replies; 7+ messages in thread
From: Rasmus @ 2015-02-23 14:54 UTC (permalink / raw)
  To: emacs-orgmode

Daniele Pizzolli <dan@toel.it> writes:

> Hello Ken,
>
> Ken Mankoff writes:
>
>> I'm working with my literate init file (emacs.org), and would like to
>> have certain sections not tangle. I currently do this with ":tangle no"
>> at the SRC block level. Is it possible to control tangling with tags at
>> the header level?
>
> Not with tag but with PROPERTIES:
>
> * outline header
>   :PROPERTIES:
>   :header-args: :tangle no
>   :END:
>
> More at
> http://orgmode.org/manual/Header-arguments-in-Org-mode-properties.html

This is what I would do as well.

>> It would make it much easier to disable/enable sections, and see what
>> sections are enabled/disabled, if the tangling state were more clearly
>> visible like tags are.
>
> I do not think that this is currently possible.

I haven't tried, but maybe one could use org-babel-pre-tangle-hook or
org-export-before-parsing-hook, depending on the context, to set/update
properties based on tags.  

For an init file the timing might matter.  I don't know how init.org
works, but presumably there's a "ignite.el" that starts the init process
using init.org?

—Rasmus

-- 
Need more coffee. . .

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: control tangling from section header
  2015-02-23 14:47     ` Ken Mankoff
@ 2015-02-23 15:03       ` Rainer M Krug
  2015-02-23 15:39         ` Ken Mankoff
  0 siblings, 1 reply; 7+ messages in thread
From: Rainer M Krug @ 2015-02-23 15:03 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: Daniele Pizzolli, Org-mode

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

Ken Mankoff <mankoff@gmail.com> writes:

> On 2015-02-23 at 09:39, Rainer M Krug <Rainer@krugs.de> wrote: 
>>>> I'm working with my literate init file (emacs.org), and would like
>>>> to have certain sections not tangle. I currently do this with
>>>> ":tangle no" at the SRC block level. Is it possible to control
>>>> tangling with tags at the header level? 
>>
>> If I am not mistaken, you can mark the header as COMMENT and no code
>> blocks under this header are tangled. 
>>
>
> That would be a great solution, but it does not work on my system
> (8.2.10)

Just confirmed here - works here:

Org-mode version 8.3beta (release_8.3beta-846-g38ab8b @/Users/rainerkrug/.emacs.d/org-mode/lisp/)

GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0, Carbon Version 157 AppKit 1343.16) of 2015-02-02 on Rainers-MacBook-Pro-4.local

Cheers,

Rainer

>
>  -k.
>
>

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: control tangling from section header
  2015-02-23 15:03       ` Rainer M Krug
@ 2015-02-23 15:39         ` Ken Mankoff
  0 siblings, 0 replies; 7+ messages in thread
From: Ken Mankoff @ 2015-02-23 15:39 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: Daniele Pizzolli, Org-mode


On 2015-02-23 at 10:03, Rainer M Krug <Rainer@krugs.de> wrote:
>
> Just confirmed here - works here:
>
> Org-mode version 8.3beta (release_8.3beta-846-g38ab8b 
> @/Users/rainerkrug/.emacs.d/org-mode/lisp/)
>

Yes it does. I've upgraded to 8.3 from git.

Thanks,

  -k.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-23 15:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-22 14:36 control tangling from section header Ken Mankoff
2015-02-22 14:49 ` Daniele Pizzolli
2015-02-23 14:39   ` Rainer M Krug
2015-02-23 14:47     ` Ken Mankoff
2015-02-23 15:03       ` Rainer M Krug
2015-02-23 15:39         ` Ken Mankoff
2015-02-23 14:54   ` Rasmus

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).