ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Tad Ashlock" <taashlo@sandia.gov>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: How to Determine the Current File Name and Line Number in the ConTeXt Source?
Date: Tue, 7 Jul 2009 12:09:18 -0600	[thread overview]
Message-ID: <4A538F4E.1070600@sandia.gov> (raw)

Taco Hoekwater wrote:
> Tad Ashlock wrote:
> >
> > Looks like we're always getting the xstrdup() branch of the conditional.
>
> Probably because you are not reading from a file at that level,
> but from a token list. Do you want filename to be a file even
> if the current input is not directly from a file at all
> (doable, but less meaningful)?
>
> Best wishes,
> Taco

Hi Taco,

I'm far from an expert in this realm, but since you asked what *I* 
want... :)

My intention is to associate status.filename and status.linenumber 
together.  That is, I would read and save their values consecutively in 
the same Lua function so that they would refer to the ConTeXt source 
line currently being processed by the ConTeXt engine.

Now you say that ConTeXt may not be reading from a file at that level. 
That I can accept (being a non-expert), but status.linenumber always 
returns the correct line number for the ConTeXt file being processed 
(even if the file is being \input from another file).  It seems to me 
that if the line number within the source file is accurate, then the 
file's name should be accurate, too.

Thank you,
Tad



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


             reply	other threads:[~2009-07-07 18:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-07 18:09 Tad Ashlock [this message]
2009-07-08  8:27 ` Taco Hoekwater
  -- strict thread matches above, loose matches on Subject: below --
2009-07-03 14:22 Tad Ashlock
2009-07-03 15:23 ` Hans Hagen
2009-07-06 12:52 ` Taco Hoekwater
2009-07-01 11:01 Tad Ashlock
2009-07-01 14:26 ` Hans Hagen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A538F4E.1070600@sandia.gov \
    --to=taashlo@sandia.gov \
    --cc=ntg-context@ntg.nl \
    /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.
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 NNTP newsgroup(s).