From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xebar Saram Subject: Re: Can one tangle only the current blocks under header ? Date: Tue, 2 Aug 2016 15:26:50 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11415106d4e40f053915d45f Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUYmd-0000qN-4C for emacs-orgmode@gnu.org; Tue, 02 Aug 2016 08:26:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUYma-0006PD-IU for emacs-orgmode@gnu.org; Tue, 02 Aug 2016 08:26:53 -0400 Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:34658) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUYma-0006P7-C3 for emacs-orgmode@gnu.org; Tue, 02 Aug 2016 08:26:52 -0400 Received: by mail-oi0-x22e.google.com with SMTP id l65so233684265oib.1 for ; Tue, 02 Aug 2016 05:26:51 -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: Grant Rettke Cc: Joon Ro , org mode --001a11415106d4e40f053915d45f Content-Type: text/plain; charset=UTF-8 thx so much Joon: thx this is great. one last question. suppose i have multiple code blocks under header like this: **** main i3 conf :PROPERTIES: :ID: f17b5518-2695-4484-a958-2fc7b8aa2479 :tangle: /home/zeltak/.i3/config :END: is there a way to issue a tangle just for all below the header blocks? best Z On Sun, Jul 31, 2016 at 5:34 PM, Grant Rettke wrote: > You can `:tangle no' on the source block to exclude it from tangling. > > You can even tangle one source block to a different or as many files > as you like during tangling. > Sincerely, > > Grant Rettke > > > On Sat, Jul 30, 2016 at 1:38 PM, Joon Ro wrote: > > can one tangle only the current blocks under header or can you only > tangle > > the whole file? > > the issue is again for dotfiles managed by org that these files are not > > proper org babel languages and look like this: > > > > #+BEGIN_SRC conf :mkdirp yes :tangle ~/.config/mpv/mpv.conf > > softvol-max=600 > > #+END_SRC > > > > the manual (http://orgmode.org/manual/Extracting-source-code.html) only > > shows how to tangle the whole file > > > > any ideas? > > > > > > If you read the help for org-babel-tangle: > > > > With one universal prefix argument, only tangle the block at point. > > When two universal prefix arguments, only tangle blocks for the > > tangle file of the block at point. > > > > > > So if you do c-u first before org-babel-tangle, it will only tangle the > code > > block at point. > > I use this a lot so I have the following in my init file: > > > > (defun org-babel-tangle-block() > > (interactive) > > (let ((current-prefix-arg '(4))) > > (call-interactively 'org-babel-tangle))) > > > > (eval-after-load "org" > > '(progn > > (define-key org-mode-map (kbd "C-c b") 'org-babel-tangle-block))) > > > > > > So I can just do C-c b and it will just tangle the code block at point. > > > > And I agree with you I with the manual > > (http://orgmode.org/manual/Extracting-source-code.html) has this > > information. > > > > Hope this helps, > > Joon > > > --001a11415106d4e40f053915d45f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
thx so much

Joon: thx this is great. on= e last question. suppose i have multiple code blocks under =C2=A0header lik= e this:

**** main i3 conf
=C2=A0 = =C2=A0 =C2=A0:PROPERTIES:
=C2=A0 =C2=A0 =C2=A0:ID: =C2=A0 =C2=A0 = =C2=A0 f17b5518-2695-4484-a958-2fc7b8aa2479
=C2=A0 =C2=A0 =C2=A0:= tangle: =C2=A0 /home/zeltak/.i3/config
=C2=A0 =C2=A0 =C2=A0:END:<= /div>
=C2=A0 =C2=A0


is th= ere a way to issue a tangle just for all below the header blocks?

best

Z
=
On Sun, Jul 31, 2016 at 5:34 PM, Grant Rettk= e <gcr@wisdomandwonder.com> wrote:
You can `:tangle no' on the source block to exclude it= from tangling.

You can even tangle one source block to a different or as many files
as you like during tangling.
Sincerely,

Grant Rettke


On Sat, Jul 30, 2016 at 1:38 PM, Joon Ro <joon.ro@outlook.com> wrote:
> can one tangle only the current blocks under header or=C2=A0 can you o= nly tangle
> the whole file?
> the issue is again for dotfiles managed by org that these files are no= t
> proper org babel languages and look like this:
>
> #+BEGIN_SRC conf :mkdirp yes :tangle ~/.config/mpv/mpv.conf
> softvol-max=3D600
> #+END_SRC
>
> the manual (http://orgmode.org/manual/Extr= acting-source-code.html) only
> shows how to tangle the whole file
>
> any ideas?
>
>
> If you read the help for org-babel-tangle:
>
> With one universal prefix argument, only tangle the block at point. > When two universal prefix arguments, only tangle blocks for the
> tangle file of the block at point.
>
>
> So if you do c-u first before org-babel-tangle, it will only tangle th= e code
> block at point.
> I use this a lot so I have the following in my init file:
>
> (defun org-babel-tangle-block()
>=C2=A0 =C2=A0(interactive)
>=C2=A0 =C2=A0(let ((current-prefix-arg '(4)))
>=C2=A0 =C2=A0 =C2=A0 (call-interactively 'org-babel-tangle)))
>
> (eval-after-load "org"
>=C2=A0 =C2=A0'(progn
>=C2=A0 =C2=A0 =C2=A0 (define-key org-mode-map (kbd "C-c b") &= #39;org-babel-tangle-block)))
>
>
> So I can just do C-c b and it will just tangle the code block at point= .
>
> And I agree with you I with the manual
> (http://orgmode.org/manual/Extracting-sour= ce-code.html) has this
> information.
>
> Hope this helps,
> Joon
>

--001a11415106d4e40f053915d45f--