From mboxrd@z Thu Jan 1 00:00:00 1970 From: D Bro Subject: Re: :noweb-ref property inheritance failure? Date: Tue, 18 Apr 2017 21:47:00 -0500 Message-ID: <36A52436-D544-4991-BB73-496879AABBED@gmail.com> References: <65201F98-7A44-4521-938F-DB19D718C170@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_BBADE895-2EEB-4828-B021-C6B8D5AE6327" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0fe7-00044F-HK for emacs-orgmode@gnu.org; Tue, 18 Apr 2017 22:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0fe3-0000BT-KN for emacs-orgmode@gnu.org; Tue, 18 Apr 2017 22:47:07 -0400 Received: from mail-oi0-x244.google.com ([2607:f8b0:4003:c06::244]:33545) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0fe3-0000AW-Cw for emacs-orgmode@gnu.org; Tue, 18 Apr 2017 22:47:03 -0400 Received: by mail-oi0-x244.google.com with SMTP id a189so2217087oib.0 for ; Tue, 18 Apr 2017 19:47:02 -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: "Charles C. Berry" Cc: emacs-orgmode@gnu.org --Apple-Mail=_BBADE895-2EEB-4828-B021-C6B8D5AE6327 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Many thanks=E2=80=94especially for the quick response. Unfortunately, = no go. The headline was a copy and paste issue into the email =E2=80=94 my = org-lint only complains about the :classname (I didn=E2=80=99t even know = about org-lint, thank you!) Export to Ascii produces: =E2=80=A6=20 1 Create =3D=3D=3D=3D=3D=3D=3D=3D ,---- | <> `---- 1.1 Let's see what our code-weaving produces ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1.1.1 this is how we will assemble our code: -------------------------------------------- ,---- | public class Yo { | public static void main (Args[]) { `---- 1.1.2 body ---------- ,---- | return "The test worked!"; `---- 1.1.3 foot ---------- ,---- | // <> | }} `---- 1.1.4 weave together -------------------- - which will weave together the above blocks to produce this: ,---- | cat TestDemo2.java `=E2=80=94=E2=80=94 Ed > On Apr 18, 2017, at 9:04 PM, Charles C. Berry = wrote: >=20 > On Tue, 18 Apr 2017, D Bro wrote: >=20 >> Both 26.0 and 25.1 on OS X 10.12 via homebrew, using the Spacemacs = configuration. >>=20 >=20 >> I recently tried the weaving technique from = http://orgmode.org/manual/noweb_002dref.html#noweb_002dref = : >=20 > [snip] >=20 > Using M-x org-lint on your example gives >=20 > 3 high Unknown header argument ":classname" > 12 high Incorrect location for PROPERTIES drawer >=20 > The latter is because the drawer is not immediately after a headline = and is disregarded: >=20 >> **Let's see what our code-weaving produces >> :PROPERTIES: >> :header-args: :noweb-ref testdemo2 >> :END: >=20 > If you put a space between `**' and `L[...]' the line becomes a valid = headline. Then the TestDemo2 src block produces >=20 > ,---- > | public class Yo { > | public static void main (Args[]) { > | return "The test worked!"; > | // > | }} > | cat TestDemo2.java > `---- >=20 > on ASCII export. >=20 > You can ignore the message about :classname, which comes from ob-java = not defining it as a header-arg. >=20 > HTH, >=20 > Chuck --Apple-Mail=_BBADE895-2EEB-4828-B021-C6B8D5AE6327 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Many thanks=E2=80=94especially for the quick response. =  Unfortunately, no go.

  1. The headline was a = copy and paste issue into the email =E2=80=94 my org-lint only complains = about the :classname (I didn=E2=80=99t even know about org-lint, thank = you!)
  2. Export to Ascii produces:

=E2=80=A6 
1 Create
=3D=3D=3D=3D=3D=3D=3D=3D

  ,----
  = | <<testdemo2>>
  `----


1.1 Let's see what our code-weaving produces
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1.1.1 this is how we = will assemble our code:
--------------------------------------------

  ,----
  | public class Yo {
  | =   public static void main (Args[]) {
  = `----


1.1.2 body
----------

  ,----
  | return "The test = worked!";
  `----


1.1.3 foot
----------

  ,----
  | // <<test-foot>>
  | }}
  `----


1.1.4 weave together
--------------------

  - which will weave together the = above blocks to produce this:

    ,----
    | cat TestDemo2.java
  =   `=E2=80=94=E2=80=94

Ed

On Apr 18, 2017, at 9:04 PM, Charles C. Berry <ccberry@ucsd.edu> = wrote:

On Tue, 18 Apr 2017, D Bro wrote:

Both 26.0 and 25.1 on OS = X 10.12 via homebrew, using the Spacemacs configuration.

I recently tried the weaving technique from http://orgmode.org/manual/noweb_002dref.html#noweb_002dref = <http://orgmode.org/manual/noweb_002dref.html#noweb_002dref&= gt; :

[snip]

Using M-x org-lint on your example gives

    3 high  Unknown header argument = ":classname"
   12 high  Incorrect = location for PROPERTIES drawer

The latter = is because the drawer is not immediately after a headline and is = disregarded:

**Let's see what our code-weaving produces
:PROPERTIES:
:header-args: :noweb-ref = testdemo2
:END:

If= you put a space between `**' and `L[...]' the line becomes a valid = headline. Then the TestDemo2 src block produces

,----
 | public class Yo {
=  | public static void main (Args[]) {
 | return = "The test worked!";
 | //
 | = }}
 | cat TestDemo2.java
=  `----

on ASCII export.

You can ignore the message about :classname, = which comes from ob-java not defining it as a header-arg.

HTH,

Chuck

= --Apple-Mail=_BBADE895-2EEB-4828-B021-C6B8D5AE6327--