From: aditya siram <aditya.siram@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Line numbers in tangled source
Date: Sat, 4 Sep 2010 14:51:22 -0500 [thread overview]
Message-ID: <AANLkTinf+ViY95ZeSAS6XraJKY=-spR5K-9TmD+aP+oD@mail.gmail.com> (raw)
In-Reply-To: <87y6bhczxj.fsf@gmail.com>
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 <schulte.eric@gmail.com> 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 <aditya.siram@gmail.com> 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
>
next prev parent reply other threads:[~2010-09-04 19:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-04 3:55 Line numbers in tangled source aditya siram
2010-09-04 13:21 ` Eric Schulte
2010-09-04 19:51 ` aditya siram [this message]
2010-09-05 21:17 ` Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTinf+ViY95ZeSAS6XraJKY=-spR5K-9TmD+aP+oD@mail.gmail.com' \
--to=aditya.siram@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=schulte.eric@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).