emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* BUG: coderef labels not stripped when tangling
@ 2013-01-23 13:05 Michael Alan Dorman
  2013-01-24  9:27 ` Sebastien Vauban
  2013-02-13 14:21 ` Bastien
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Alan Dorman @ 2013-01-23 13:05 UTC (permalink / raw)
  To: emacs-orgmode

Using Org-mode to write in a literate style is a lot of fun.  When I
read about coderef labels, they seemed likely to make it even better.

The only problem is that they aren't stripped during tangling. If you
tangle this:

#+BEGIN_SRC sh -n -r :noweb tangle :shebang #!/bin/sh :tangle tangle-test.sh
echo "Working" (ref:working) 
#+END_SRC

You end up with:

    #!/bin/sh

    echo "Working" (ref:working)

That seems like a bug.

Mike.

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

* Re: BUG: coderef labels not stripped when tangling
  2013-01-23 13:05 BUG: coderef labels not stripped when tangling Michael Alan Dorman
@ 2013-01-24  9:27 ` Sebastien Vauban
  2013-01-24 13:45   ` Michael Alan Dorman
  2013-02-13 14:21 ` Bastien
  1 sibling, 1 reply; 7+ messages in thread
From: Sebastien Vauban @ 2013-01-24  9:27 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello Michael,

Michael Alan Dorman wrote:
> Using Org-mode to write in a literate style is a lot of fun.  When I
> read about coderef labels, they seemed likely to make it even better.
>
> The only problem is that they aren't stripped during tangling. If you
> tangle this:
>
> #+BEGIN_SRC sh -n -r :noweb tangle :shebang #!/bin/sh :tangle tangle-test.sh
> echo "Working" (ref:working) 
> #+END_SRC
>
> You end up with:
>
>     #!/bin/sh
>
>     echo "Working" (ref:working)
>
> That seems like a bug.

Or a feature, with the consequence that you should put those refs as comments
(with the appropriate syntax in your language).

But, yes, those comments stay as well in your tangled code, which you may not
like.

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: BUG: coderef labels not stripped when tangling
  2013-01-24  9:27 ` Sebastien Vauban
@ 2013-01-24 13:45   ` Michael Alan Dorman
  2013-01-24 15:19     ` Sebastien Vauban
  2013-01-24 15:49     ` Bastien
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Alan Dorman @ 2013-01-24 13:45 UTC (permalink / raw)
  To: emacs-orgmode

Hi, Sebastien,

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:
> Or a feature, with the consequence that you should put those refs as comments
> (with the appropriate syntax in your language).

That is an excellent suggestion for resolving my immediate issue that
had not occured to me at all.  It believe it does mean that the
presentation of the code ends up with seemingly empty comments where the
coderefs were, but that's a relatively minor thing.

> But, yes, those comments stay as well in your tangled code, which you may not
> like.

It seems counter-intuitive to me that text that is regarded as
meta-information when rendering for presentation is not treated
similarly when tangling---a needless mismatch between the two processes.

But thanks for your workaround suggestion, I will definitely take
advantage of it.

Mike.

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

* Re: BUG: coderef labels not stripped when tangling
  2013-01-24 13:45   ` Michael Alan Dorman
@ 2013-01-24 15:19     ` Sebastien Vauban
  2013-01-24 15:49     ` Bastien
  1 sibling, 0 replies; 7+ messages in thread
From: Sebastien Vauban @ 2013-01-24 15:19 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Michael,

Michael Alan Dorman wrote:
> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> Or a feature, with the consequence that you should put those refs as comments
>> (with the appropriate syntax in your language).
>
> That is an excellent suggestion for resolving my immediate issue that
> had not occured to me at all.  It believe it does mean that the
> presentation of the code ends up with seemingly empty comments where the
> coderefs were, but that's a relatively minor thing.

Glad it helped!

>> But, yes, those comments stay as well in your tangled code, which you may not
>> like.
>
> It seems counter-intuitive to me that text that is regarded as
> meta-information when rendering for presentation is not treated
> similarly when tangling---a needless mismatch between the two processes.

I'll let Eric answer on this...

> But thanks for your workaround suggestion, I will definitely take
> advantage of it.

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: BUG: coderef labels not stripped when tangling
  2013-01-24 13:45   ` Michael Alan Dorman
  2013-01-24 15:19     ` Sebastien Vauban
@ 2013-01-24 15:49     ` Bastien
  1 sibling, 0 replies; 7+ messages in thread
From: Bastien @ 2013-01-24 15:49 UTC (permalink / raw)
  To: Michael Alan Dorman; +Cc: emacs-orgmode

Hi Michael,

Michael Alan Dorman <mdorman@ironicdesign.com> writes:

> It seems counter-intuitive to me that text that is regarded as
> meta-information when rendering for presentation is not treated
> similarly when tangling---a needless mismatch between the two
> processes.

I agree this is a bug, and a pretty ugly one I'd say.

I'll have a look in the next days or so, but perhaps
(hopefully!) Eric will beat me up.

Thanks for reporting this!

-- 
 Bastien

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

* Re: BUG: coderef labels not stripped when tangling
  2013-01-23 13:05 BUG: coderef labels not stripped when tangling Michael Alan Dorman
  2013-01-24  9:27 ` Sebastien Vauban
@ 2013-02-13 14:21 ` Bastien
  2013-02-13 16:26   ` Michael Alan Dorman
  1 sibling, 1 reply; 7+ messages in thread
From: Bastien @ 2013-02-13 14:21 UTC (permalink / raw)
  To: Michael Alan Dorman; +Cc: emacs-orgmode

Hi Michael,

Michael Alan Dorman <mdorman@ironicdesign.com> writes:

> Using Org-mode to write in a literate style is a lot of fun.  When I
> read about coderef labels, they seemed likely to make it even better.
>
> The only problem is that they aren't stripped during tangling. If you
> tangle this:
>
> #+BEGIN_SRC sh -n -r :noweb tangle :shebang #!/bin/sh :tangle tangle-test.sh
> echo "Working" (ref:working) 
> #+END_SRC
>
> You end up with:
>
>     #!/bin/sh
>
>     echo "Working" (ref:working)
>
> That seems like a bug.

Indeed.  This show now be fixed (both in maint and master).
Please let us know if not.

Thanks a lot for reporting this nasty bug!

-- 
 Bastien

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

* Re: BUG: coderef labels not stripped when tangling
  2013-02-13 14:21 ` Bastien
@ 2013-02-13 16:26   ` Michael Alan Dorman
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Alan Dorman @ 2013-02-13 16:26 UTC (permalink / raw)
  To: emacs-orgmode

Bastien,

> Indeed.  This show now be fixed (both in maint and master).
> Please let us know if not.

Thanks so much for this and all the work you do on org.  I've finally
taken the plunge to learn emacs lisp, so perhaps before long I'll be
able to contribute as well. ;)

Mike.

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

end of thread, other threads:[~2013-02-13 16:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23 13:05 BUG: coderef labels not stripped when tangling Michael Alan Dorman
2013-01-24  9:27 ` Sebastien Vauban
2013-01-24 13:45   ` Michael Alan Dorman
2013-01-24 15:19     ` Sebastien Vauban
2013-01-24 15:49     ` Bastien
2013-02-13 14:21 ` Bastien
2013-02-13 16:26   ` Michael Alan Dorman

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