emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Line numbers in tangled source


From: aditya siram
Subject: Re: [Orgmode] Line numbers in tangled source
Date: Sat, 4 Sep 2010 14:51:22 -0500

Yes I am aware of the comments argument but it is not what I was
referring to. What I want is, if I had the following in a file called
"Haskell.org" :
* Root
Root comment
#+begin_src haskell :tangle Main.hs
  test = length
  main = print $ test [1,2,3]
#+end_src

I would like the following output in the tangled file Main.hs:

{-# LINE 4 "Haskell.org" #-}
test = length
main = print $ test [1,2,3]

The line that starts with {-# LINE ... #-} is a pragma that tells the
compiler that this line corresponds to line 4 in Haskell.org and if
there is an error it will point to that file and not to Main.hs.

Can I take it that this functionality doesn't yet exist?

-deech


On Sat, Sep 4, 2010 at 8:21 AM, Eric Schulte <address@hidden> wrote:
>
> Hi,
>
> You can use the :comments header argument to include comments around
> tangled code blocks indicating where the code block lives in the
> original Org file.
>
> See [1] for information on the :comment header argument, and see [2] for
> information on using header arguments in general.
>
> Best -- Eric
>
> aditya siram <address@hidden> writes:
>
> > Hi all,
> > How do I get the org file line numbers in the tangled source? This way error
> > messages point to the org file.
> >
> > thanks ...
> > -deech
>
> Footnotes:
> [1]  http://orgmode.org/manual/comments.html#comments
>
> [2]  
> http://orgmode.org/manual/Using-header-arguments.html#Using-header-arguments
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]